Add more estimation modes to pendingWriteQueryDuration()
[lhc/web/wiklou.git] / includes / db / loadbalancer / LoadBalancer.php
index 65cd3b3..32729dd 100644 (file)
@@ -1101,7 +1101,7 @@ class LoadBalancer {
                        }
                        // Assert that the time to replicate the transaction will be sane.
                        // If this fails, then all DB transactions will be rollback back together.
-                       $time = $conn->pendingWriteQueryDuration();
+                       $time = $conn->pendingWriteQueryDuration( $conn::ESTIMATE_DB_APPLY );
                        if ( $limit > 0 && $time > $limit ) {
                                throw new DBTransactionError(
                                        $conn,