Bsitu has uploaded a new change for review.

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


Change subject: Use read database to re-generate count on user setting change
......................................................................

Use read database to re-generate count on user setting change

We can just use read database to re-generate the count, we should only use the 
master database to avoid replication delay, for example, re-generating the 
count after a new notification.

Change-Id: I10d84a40da8e46cc4ce546ea98dd89438929623d
---
M Hooks.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo 
refs/changes/32/59932/1

diff --git a/Hooks.php b/Hooks.php
index e351429..18772ed 100644
--- a/Hooks.php
+++ b/Hooks.php
@@ -712,7 +712,7 @@
                // Reset the notification count since it may have changed due 
to user
                // option changes. This covers both explicit changes in the 
preferences
                // and changes made through the options API (since both call 
this hook).
-               EchoNotificationController::resetNotificationCount( $user, 
DB_MASTER );
+               EchoNotificationController::resetNotificationCount( $user, 
DB_SLAVE );
                return true;
        }
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/59932
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I10d84a40da8e46cc4ce546ea98dd89438929623d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Bsitu <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to