Page MenuHomePhabricator

Fix an issue where repository message counts would never reset
ClosedPublic

Authored by epriestley on Sep 28 2016, 9:55 PM.
Tags
None
Referenced Files
F15437058: D16623.diff
Tue, Mar 25, 5:16 PM
F15434978: D16623.id.diff
Tue, Mar 25, 6:14 AM
F15396864: D16623.id40020.diff
Sun, Mar 16, 4:42 PM
F15386633: D16623.id40019.diff
Mar 15 2025, 12:59 AM
F15317194: D16623.diff
Mar 6 2025, 7:21 PM
Unknown Object (File)
Feb 24 2025, 9:06 PM
Unknown Object (File)
Feb 24 2025, 4:35 AM
Unknown Object (File)
Feb 23 2025, 7:32 PM
Subscribers
None

Details

Summary

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

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
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.