jenkins-bot has submitted this change and it was merged.

Change subject: Add debug logging for when the thank-you-edit code detects a 
race condition
......................................................................


Add debug logging for when the thank-you-edit code detects a race condition

We seem to be discarding *all* thank-you-edit notifications as
race conditions now.

Bug: T128249
Change-Id: I1f284bd13e89fe2205c4c87a6c0f4a7dfe1c8bd1
(cherry picked from commit e85c3832bbf5f482f240c35e0f526211a37f9e6a)
---
M Hooks.php
1 file changed, 10 insertions(+), 0 deletions(-)

Approvals:
  MaxSem: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/Hooks.php b/Hooks.php
index b326795..59ada97 100644
--- a/Hooks.php
+++ b/Hooks.php
@@ -467,6 +467,16 @@
                                        $user = User::newFromId( $id );
                                        if ( $user->getEditCount() !== 
$editCount ) {
                                                // Race condition with multiple 
simultaneous requests, skip
+                                               LoggerFactory::getInstance( 
'Echo' )->debug(
+                                                       'thank-you-edit race 
condition detected: {user} (id: {id}) should ' .
+                                                       'have had 
{expectedCount} edits but has {actualCount}',
+                                                       array(
+                                                               'user' => 
$user->getName(),
+                                                               'id' => 
$user->getId(),
+                                                               'expectedCount' 
=> $editCount,
+                                                               'actualCount' 
=> $user->getEditCount(),
+                                                       )
+                                               );
                                                return;
                                        }
                                        LoggerFactory::getInstance( 'Echo' 
)->debug(

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1f284bd13e89fe2205c4c87a6c0f4a7dfe1c8bd1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: wmf/1.27.0-wmf.15
Gerrit-Owner: Catrope <roan.katt...@gmail.com>
Gerrit-Reviewer: MaxSem <maxsem.w...@gmail.com>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to