Home GnuPG

Fix an issue where repository message counts would never reset
5d1359d78f66Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

Fix an issue where repository message counts would never reset

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.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11705

Differential Revision: https://secure.phabricator.com/D16623

Details

Provenance
epriestley <git@epriestley.com>Authored on Sep 28 2016, 11:49 PM
Parents
rPHAB360597d8eea5: Link user name in People log view to user page
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHAB5d1359d78f66: Fix an issue where repository message counts would never reset (authored by epriestley <git@epriestley.com>).Sep 29 2016, 12:02 AM