From f6235b8c08569ac34be42b62f74d22b114d64f0d Mon Sep 17 00:00:00 2001 From: Jon Chambers Date: Wed, 25 May 2022 15:07:53 -0400 Subject: [PATCH] Check for newly-expired accounts before previously-expired accounts for metric accuracy --- .../textsecuregcm/storage/AccountCleaner.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/service/src/main/java/org/whispersystems/textsecuregcm/storage/AccountCleaner.java b/service/src/main/java/org/whispersystems/textsecuregcm/storage/AccountCleaner.java index c400acad6..b5fd726cd 100644 --- a/service/src/main/java/org/whispersystems/textsecuregcm/storage/AccountCleaner.java +++ b/service/src/main/java/org/whispersystems/textsecuregcm/storage/AccountCleaner.java @@ -50,10 +50,10 @@ public class AccountCleaner extends AccountDatabaseCrawlerListener { if (isExpired(account) || needsExplicitRemoval(account)) { final Tag deletionReason; - if (isExpired(account)) { - deletionReason = Tag.of(DELETION_REASON_TAG_NAME, "previouslyExpired"); - } else { + if (needsExplicitRemoval(account)) { deletionReason = Tag.of(DELETION_REASON_TAG_NAME, "newlyExpired"); + } else { + deletionReason = Tag.of(DELETION_REASON_TAG_NAME, "previouslyExpired"); } if (accountUpdateCount < MAX_ACCOUNT_DELETIONS_PER_CHUNK) {