diff --git a/service/src/main/java/org/whispersystems/textsecuregcm/WhisperServerService.java b/service/src/main/java/org/whispersystems/textsecuregcm/WhisperServerService.java index b48ecaeeb..c41ff2136 100644 --- a/service/src/main/java/org/whispersystems/textsecuregcm/WhisperServerService.java +++ b/service/src/main/java/org/whispersystems/textsecuregcm/WhisperServerService.java @@ -435,8 +435,6 @@ public class WhisperServerService extends Application dynamicConfigurationManager; private final ObjectMapper mapper; - private final Executor migrationExperimentExecutor; private final Experiment migrationExperiment = new Experiment("profileMigration"); public ProfilesManager(final Profiles profiles, final ProfilesDynamoDb profilesDynamoDb, final FaultTolerantRedisCluster cacheCluster, - final DynamicConfigurationManager dynamicConfigurationManager, - final Executor migrationExperimentExecutor) { + final DynamicConfigurationManager dynamicConfigurationManager) { this.profiles = profiles; this.profilesDynamoDb = profilesDynamoDb; this.cacheCluster = cacheCluster; this.dynamicConfigurationManager = dynamicConfigurationManager; - this.migrationExperimentExecutor = migrationExperimentExecutor; this.mapper = SystemMapper.getMapper(); } @@ -76,7 +72,13 @@ public class ProfilesManager { profile = profiles.get(uuid, version); if (dynamicConfigurationManager.getConfiguration().getProfileMigrationConfiguration().isDynamoDbReadForComparisonEnabled()) { - migrationExperiment.compareSupplierResultAsync(profile, () -> profilesDynamoDb.get(uuid, version), migrationExperimentExecutor); + final Optional dynamoProfile = profilesDynamoDb.get(uuid, version); + migrationExperiment.compareSupplierResult(profile, () -> dynamoProfile); + + if (profile.isEmpty() && dynamoProfile.isPresent() && + dynamicConfigurationManager.getConfiguration().getProfileMigrationConfiguration().isLogMismatches()) { + logger.info("Profile {}/{} absent from relational database, but present in DynamoDB", uuid, version); + } } } diff --git a/service/src/main/java/org/whispersystems/textsecuregcm/workers/DeleteUserCommand.java b/service/src/main/java/org/whispersystems/textsecuregcm/workers/DeleteUserCommand.java index a0c305a77..8d5055d3d 100644 --- a/service/src/main/java/org/whispersystems/textsecuregcm/workers/DeleteUserCommand.java +++ b/service/src/main/java/org/whispersystems/textsecuregcm/workers/DeleteUserCommand.java @@ -212,7 +212,7 @@ public class DeleteUserCommand extends EnvironmentCommand