dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(from parent 1:
2ea8113
)
Merge "Try to reduce stale cache updates in User::saveSettings()"
author
jenkins-bot
<jenkins-bot@gerrit.wikimedia.org>
Thu, 16 Apr 2015 16:40:02 +0000
(16:40 +0000)
committer
Gerrit Code Review
<gerrit@wikimedia.org>
Thu, 16 Apr 2015 16:40:02 +0000
(16:40 +0000)
includes/User.php
patch
|
blob
|
history
diff --git
a/includes/User.php
b/includes/User.php
index
f862953
..
59d5c03
100644
(file)
--- a/
includes/User.php
+++ b/
includes/User.php
@@
-3647,6
+3647,14
@@
class User implements IDBAccessObject {
Hooks::run( 'UserSaveSettings', array( $this ) );
$this->clearSharedCache();
$this->getUserPage()->invalidateCache();
+
+ // T95839: clear the cache again post-commit to reduce race conditions
+ // where stale values are written back to the cache by other threads.
+ // Note: this *still* doesn't deal with REPEATABLE-READ snapshot lag...
+ $that = $this;
+ $dbw->onTransactionIdle( function() use ( $that ) {
+ $that->clearSharedCache();
+ } );
}
/**