diff --git a/Signal/Signal-Info.plist b/Signal/Signal-Info.plist
index cf1883b41..39b598fbb 100644
--- a/Signal/Signal-Info.plist
+++ b/Signal/Signal-Info.plist
@@ -38,7 +38,7 @@
CFBundleVersion
- 2.4.1.0
+ 2.4.1.1
ITSAppUsesNonExemptEncryption
LOGS_EMAIL
diff --git a/Signal/src/environment/VersionMigrations.m b/Signal/src/environment/VersionMigrations.m
index f7b2b749a..f20f62dce 100644
--- a/Signal/src/environment/VersionMigrations.m
+++ b/Signal/src/environment/VersionMigrations.m
@@ -64,8 +64,14 @@
}
if ([self isVersion:previousVersion atLeast:@"2.0.0" andLessThan:@"2.4.1"] && [TSAccountManager isRegistered]) {
- DDLogInfo(@"Running migration: removing orphaned data.");
- [[OWSOrphanedDataCleaner new] removeOrphanedData];
+ // Cleaning orphaned data can take a while, so let's run it in the background.
+ // This means this migration is not resiliant to failures - we'll only run it once
+ // regardless of its success.
+ dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
+ DDLogInfo(@"OWSMigration: beginning removing orphaned data.");
+ [[OWSOrphanedDataCleaner new] removeOrphanedData];
+ DDLogInfo(@"OWSMigration: completed removing orphaned data.");
+ });
}
[Environment.preferences setAndGetCurrentVersion];