Revert "SpecialContributions: Avoid using 'contributions' slave for getParentLengths"
authorAaron Schulz <aschulz@wikimedia.org>
Tue, 14 Jan 2014 22:57:44 +0000 (22:57 +0000)
committerOri.livneh <ori@wikimedia.org>
Wed, 15 Jan 2014 01:26:02 +0000 (01:26 +0000)
Actually this won't work, as the LB will see an already open slave and just reuse the same connection.

This reverts commit fdf4b7cbd934f7f8d76de4564c4d4f83d60d8e4d.

Change-Id: I790f5b303fa264ecc36793b8650c79daae367e70

includes/specials/SpecialContributions.php

index 0a24661..6b56c2f 100644 (file)
@@ -856,8 +856,7 @@ class ContribsPager extends ReverseChronologicalPager {
                                $batch->add( $row->page_namespace, $row->page_title );
                        }
                }
-               # Bug 59987: avoid using 'contributions' db connection
-               $this->mParentLens = Revision::getParentLengths( wfGetDB( DB_SLAVE ), $revIds );
+               $this->mParentLens = Revision::getParentLengths( $this->getDatabase(), $revIds );
                $batch->execute();
                $this->mResult->seek( 0 );
        }