jenkins-bot has submitted this change and it was merged.
Change subject: Fix broken wincache merge() implementation
......................................................................
Fix broken wincache merge() implementation
Bug: T145664
Change-Id: I2f841779108df281e24003c586775b71aa176909
---
M includes/libs/objectcache/WinCacheBagOStuff.php
1 file changed, 8 insertions(+), 1 deletion(-)
Approvals:
Legoktm: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/libs/objectcache/WinCacheBagOStuff.php
b/includes/libs/objectcache/WinCacheBagOStuff.php
index 19cc66a..6996ce5 100644
--- a/includes/libs/objectcache/WinCacheBagOStuff.php
+++ b/includes/libs/objectcache/WinCacheBagOStuff.php
@@ -65,6 +65,13 @@
}
public function merge( $key, callable $callback, $exptime = 0,
$attempts = 10, $flags = 0 ) {
- return $this->mergeViaCas( $key, $callback, $exptime, $attempts
);
+ if ( wincache_lock( $key ) ) { // optimize with FIFO lock
+ $ok = $this->mergeViaLock( $key, $callback, $exptime,
$attempts, $flags );
+ wincache_unlock( $key );
+ } else {
+ $ok = false;
+ }
+
+ return $ok;
}
}
--
To view, visit https://gerrit.wikimedia.org/r/310809
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I2f841779108df281e24003c586775b71aa176909
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits