Correct a comment about updateRevisionOn
authorAdam Roses Wight <awight@wikimedia.org>
Wed, 21 May 2014 08:01:36 +0000 (01:01 -0700)
committerIAlex <codereview@emsenhuber.ch>
Sat, 24 May 2014 05:22:13 +0000 (05:22 +0000)
to reflect its compare-and-swap semantics.

Change-Id: I6a68e673195e0b6688f6fbc9199a8355b20c0da0

includes/WikiPage.php

index 5722af2..8fe948b 100644 (file)
@@ -1838,11 +1838,7 @@ class WikiPage implements Page, IDBAccessObject {
 
                                        // Update page
                                        //
-                                       // Note that we use $this->mLatest instead of fetching a value from the master DB
-                                       // during the course of this function. This makes sure that EditPage can detect
-                                       // edit conflicts reliably, either by $ok here, or by $article->getTimestamp()
-                                       // before this function is called. A previous function used a separate query, this
-                                       // creates a window where concurrent edits can cause an ignored edit conflict.
+                                       // We check for conflicts by comparing $oldid with the current latest revision ID.
                                        $ok = $this->updateRevisionOn( $dbw, $revision, $oldid, $oldIsRedirect );
 
                                        if ( !$ok ) {