Page MenuHomePhabricator

Fix an issue where repository message counts would never reset

Authored by epriestley on Sep 28 2016, 9:55 PM.
Referenced Files
Unknown Object (File)
Tue, Jun 28, 1:43 AM
Unknown Object (File)
Tue, Jun 21, 2:33 PM
Unknown Object (File)
Sat, Jun 18, 8:08 PM
Unknown Object (File)
Sat, Jun 18, 12:00 AM
Unknown Object (File)
Thu, Jun 9, 5:59 PM
Unknown Object (File)
Wed, Jun 8, 9:16 AM
Unknown Object (File)
May 30 2022, 2:21 PM
Unknown Object (File)
May 27 2022, 7:02 PM



Fixes T11705. I did not realize that ON DUPLICATE KEY UPDATE was order-dependent, so the "reset" clause of this IF(...) never actually worked.

Reorder it so we check if we're changing the message type first, then actually change the message type.

This makes the count reset properly when a failing repository succeeds, or a working repository fails.

Test Plan
  • On master, forced a working repository to fail a bin/repository update, saw the message change types (expected) but keep the old count (wrong!).
  • With this patch, repeated the process and saw the count reset properly.
  • Ran the patch, verified counts reset to 0.

Diff Detail

rP Phabricator
Lint Not Applicable
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Fix an issue where repository message counts would never reset.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.
chad edited edge metadata.
This revision is now accepted and ready to land.Sep 28 2016, 10:02 PM
This revision was automatically updated to reflect the committed changes.