jenkins-bot has submitted this change and it was merged. Change subject: Make sure getScopedLockAndFlush() commits before unlocking ......................................................................
Make sure getScopedLockAndFlush() commits before unlocking This is necessary for callers to see changes from prior callers Change-Id: I5e05215541e641b5b5a4bc55c91d6ec8ef774ca1 --- M includes/db/Database.php M includes/db/IDatabase.php 2 files changed, 2 insertions(+), 1 deletion(-) Approvals: Addshore: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/db/Database.php b/includes/db/Database.php index dc1570e..1836feb 100644 --- a/includes/db/Database.php +++ b/includes/db/Database.php @@ -3174,6 +3174,7 @@ $that = $this; $unlocker = new ScopedCallback( function () use ( $that, $lockKey, $fname ) { + $that->commit( __METHOD__, 'flush' ); $that->unlock( $lockKey, $fname ); } ); diff --git a/includes/db/IDatabase.php b/includes/db/IDatabase.php index 1a6e779..1e728d8 100644 --- a/includes/db/IDatabase.php +++ b/includes/db/IDatabase.php @@ -1519,7 +1519,7 @@ * This is suitiable for transactions that need to be serialized using cooperative locks, * where each transaction can see each others' changes. Any transaction is flushed to clear * out stale REPEATABLE-READ snapshot data. Once the returned object falls out of PHP scope, - * the lock will be released. + * any transaction will be committed and the lock will be released. * * If the lock acquisition failed, then no transaction flush happens, and null is returned. * -- To view, visit https://gerrit.wikimedia.org/r/267450 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5e05215541e641b5b5a4bc55c91d6ec8ef774ca1 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron Schulz <asch...@wikimedia.org> Gerrit-Reviewer: Addshore <addshorew...@gmail.com> Gerrit-Reviewer: Parent5446 <tylerro...@gmail.com> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits