Page MenuHomePhabricator

Simplify Database::ping() and avoid calling it from pendingWriteQueryDuration()
Closed, ResolvedPublic

Description

This method is old, complex, and confusing. It is also called by pendingWriteQueryDuration(), via TransactionProfiler, which might trigger the ping query...which seems overly complex and needlessly prone to degenerate situations during errors.

$lastRoundTripEstimate should be set via open() and have a method to just plainly return the value. Alternately, pendingWriteQueryDuration() could just not have $type (e.g. ESTIMATE_TOTAL).

Event Timeline

Change 859651 had a related patch set uploaded (by Aaron Schulz; author: Aaron Schulz):

[mediawiki/core@master] rdbms: remove $rtt parameter from Database::ping()

https://gerrit.wikimedia.org/r/859651

Change 859651 merged by jenkins-bot:

[mediawiki/core@master] rdbms: remove $rtt parameter from Database::ping()

https://gerrit.wikimedia.org/r/859651

Krinkle triaged this task as Medium priority.