π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Fix migration issue
laurenspriem159dd57f0cb5
diff --git a/mobile/apps/photos/lib/db/ml/db.dart b/mobile/apps/photos/lib/db/ml/db.dartindex 31cf942fbc..322b73fdc8 100644--- a/mobile/apps/photos/lib/db/ml/db.dart+++ b/mobile/apps/photos/lib/db/ml/db.dart@@ -1338,12 +1338,8 @@ class MLDataDB with SqlDbBase implements IMLDataDB<int> {_logger.info("All embeddings migrated, breaking out of while loop");break;}- _logger.info("Clearing out embeddings and fileIDs");- embeddings.clear();- fileIDs.clear();- results.clear();// Allow some time for any GC to finish- _logger.info("Waiting for 100ms for GC to finish");+ _logger.info("Waiting for 100ms out of precaution, for GC to finish");await Future.delayed(const Duration(milliseconds: 100));}_logger.info(@@ -1351,10 +1347,11 @@ class MLDataDB with SqlDbBase implements IMLDataDB<int> {);await ClipVectorDB.instance.setMigrationDone();_logger.info("ClipVectorDB migration done, flag file created");- } catch (e) {+ } catch (e, s) {_logger.severe("Error migrating ClipVectorDB after ${stopwatch.elapsed.inMilliseconds} ms, clearing out DB again",e,+ s,);await clipVectorDB.deleteAllEmbeddings();rethrow;