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
Unknown Object (File)
Wed, Apr 17, 4:11 PM
Unknown Object (File)
Mon, Apr 8, 3:18 AM
Unknown Object (File)
Fri, Mar 29, 7:39 AM
Unknown Object (File)
Mar 10 2024, 8:29 AM
Unknown Object (File)
Feb 16 2024, 1:38 PM
Unknown Object (File)
Feb 16 2024, 4:01 AM
Unknown Object (File)
Jan 31 2024, 8:48 AM
Unknown Object (File)
Jan 27 2024, 12:13 AM
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
Branch
eorder1
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 13907
Build 18003: Run Core Tests
Build 18002: arc lint + arc unit

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.