Tune mismatch logging
This commit is contained in:
parent
5b25e38e41
commit
72a0c1be0f
|
@ -21,7 +21,6 @@ import io.micrometer.core.instrument.Metrics;
|
|||
import io.micrometer.core.instrument.Tags;
|
||||
import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
import java.util.UUID;
|
||||
|
@ -32,7 +31,6 @@ import java.util.function.Consumer;
|
|||
import java.util.function.Function;
|
||||
import java.util.function.Supplier;
|
||||
import java.util.stream.Collectors;
|
||||
import net.logstash.logback.argument.StructuredArguments;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
@ -742,17 +740,6 @@ public class AccountsManager {
|
|||
.isPostCheckMismatches()) {
|
||||
mismatchedAccounts.put(uuid);
|
||||
}
|
||||
|
||||
if (dynamicConfigurationManager.getConfiguration().getAccountsDynamoDbMigrationConfiguration()
|
||||
.isLogMismatches()) {
|
||||
final String abbreviatedCallChain = getAbbreviatedCallChain(new RuntimeException().getStackTrace());
|
||||
|
||||
logger.info("Mismatched account data: {}", StructuredArguments.entries(Map.of(
|
||||
"type", mismatchDescription,
|
||||
"uuid", uuid,
|
||||
"callChain", abbreviatedCallChain
|
||||
)));
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
|
@ -13,9 +13,11 @@ import java.io.IOException;
|
|||
import java.time.Duration;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.ScheduledExecutorService;
|
||||
import net.logstash.logback.argument.StructuredArguments;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.whispersystems.textsecuregcm.redis.FaultTolerantRedisCluster;
|
||||
|
@ -89,7 +91,9 @@ public class MigrationMismatchedAccountsTableCrawler extends ManagedPeriodicWork
|
|||
|
||||
if (dynamicConfigurationManager.getConfiguration().getAccountsDynamoDbMigrationConfiguration()
|
||||
.isLogMismatches()) {
|
||||
logger.info("Mismatch: {} - {}", uuid, mismatchType);
|
||||
logger.info("Mismatch: {}", StructuredArguments.entries(Map.of(
|
||||
"type", mismatchType,
|
||||
"uuid", uuid)));
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue