https://bugzilla.wikimedia.org/show_bug.cgi?id=37225

--- Comment #11 from Aaron Schulz <[email protected]> 2012-06-07 22:02:14 
UTC ---
It looks like WikiPage::loadPageData(), which calls loadFromRow(), does not
clear mLastRevision, which includes a process cache of the revision text. So,
AFAIK, if I do something like:
----
$wp = WikiPage::factory( $title );
$text1 = $wp->getRawText(); // loads text from slave
...wait...
$wp->loadPageData( 'fromdbmaster' ); // loads `page` row from master
$text2 = $wp->getRawText(); // returns same value cached in mLastRevision
----
$text2 will equal $text1 even if an edit was done in the meantime.

WikiPage::doEdit() relies on this not being the case. Otherwise, "$oldid =
$this->getLatest();" will get the true latest rev ID but "$oldtext =
$this->getRawText();" will be stale, so $changed could be erroneously true,
causing a new revision insertion. The updateRevisionOn() race check will not
detect any races because $oldid *is* the latest and not some stale value.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to