Avoid logging query in wasDeletedSinceLastEdit() if the page still exists
authorAaron Schulz <aschulz@wikimedia.org>
Mon, 20 Jul 2015 22:15:53 +0000 (15:15 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Mon, 20 Jul 2015 22:15:53 +0000 (15:15 -0700)
* This avoids hitting a long tail of logging table queries that
  cannot easily use the buffer pool all the time.

Change-Id: Id2ad6b9699f1a8c579ebb1c3c0319183772af1bd

includes/EditPage.php

index bf322ae..0233b11 100644 (file)
@@ -3445,7 +3445,7 @@ HTML
 
                $this->deletedSinceEdit = false;
 
-               if ( $this->mTitle->isDeletedQuick() ) {
+               if ( !$this->mTitle->exists() && $this->mTitle->isDeletedQuick() ) {
                        $this->lastDelete = $this->getLastDelete();
                        if ( $this->lastDelete ) {
                                $deleteTime = wfTimestamp( TS_MW, $this->lastDelete->log_timestamp );