Aaron Schulz has submitted this change and it was merged. Change subject: [Database] Fixed case where trx idle callbacks might be lost. ......................................................................
[Database] Fixed case where trx idle callbacks might be lost. * (bug 41656) LoadBalancer always commits if there are callbacks pending. This works by checking a new DatabaseBase::writesOrCallbacksPending() function. * Made transaction idle callbacks run in autocommit mode. Generally callers already want autocommit mode or do quick begin()/commit() calls anyway. The docs already state that callbacks should close any connections they start, but this makes it harder for people to forget about implicit transactions. Since the callbacks often may happen in commitMasterChanges(), if transactions are left open, they might not get committed by anything afterwards. * Added sanity exceptions and warnings if callbacks get lost for some reason. * Renamed trxIdleCallbacks -> mTrxIdleCallbacks for consistency. Change-Id: I00e1e0fcdd7deeee1fbac6d0f295160479cb8962 --- M includes/db/Database.php M includes/db/LoadBalancer.php 2 files changed, 35 insertions(+), 8 deletions(-) Approvals: Aaron Schulz: Looks good to me, approved jenkins-bot: Verified -- To view, visit https://gerrit.wikimedia.org/r/33818 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I00e1e0fcdd7deeee1fbac6d0f295160479cb8962 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: REL1_20 Gerrit-Owner: Reedy <re...@wikimedia.org> Gerrit-Reviewer: Aaron Schulz <asch...@wikimedia.org> Gerrit-Reviewer: jenkins-bot _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits