r79012 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r79011‎ | r79012 | r79013 >
Date:23:23, 25 December 2010
Author:platonides
Status:resolved
Tags:
Comment:
Make a loop to keep them really deleted.
Entries in hewiki are hard to kill.
Modified paths:
  • /trunk/phase3/maintenance/purgeStaleMemcachedText.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/purgeStaleMemcachedText.php
@@ -15,7 +15,18 @@
1616
1717 for ( $i = $latestReplicatedTextId; $i < $maxTextId; $i++ ) {
1818 $key = wfMemcKey( 'revisiontext', 'textid', $i );
19 - $wgMemc->delete( $key );
 19+
 20+ while (1) {
 21+ if (! $wgMemc->delete( $key ) ) {
 22+ echo "Memcache delete for $key returned false\n";
 23+ }
 24+ if ( $wgMemc->get( $key ) ) {
 25+ echo "There's still content in $key!\n";
 26+ } else {
 27+ break;
 28+ }
 29+ }
 30+
2031 }
2132 }
2233

Status & tagging log