Start pruning the diff

This commit is contained in:
Manav Rathi
2024-07-16 15:03:46 +05:30
parent 8abd541519
commit f6715ad9c2

View File

@@ -1,3 +1,4 @@
import { removeKV } from "@/next/kv";
import log from "@/next/log";
import localForage from "@ente/shared/storage/localForage";
import { deleteDB, openDB, type DBSchema } from "idb";
@@ -151,6 +152,17 @@ const deleteLegacyDB = () => {
localForage.removeItem("onnx-clip-embedding_sync_time"),
localForage.removeItem("file-ml-clip-face-embedding_sync_time"),
]);
// Delete keys for the legacy diff based sync.
//
// This code was added July 2024 (v1.7.3-beta). These keys were never
// enabled outside of the nightly builds, so this cleanup is not a hard
// need. Either ways, it can be removed at some point when most clients have
// migrated (tag: Migration).
void Promise.all([
removeKV("embeddingSyncTime:onnx-clip"),
removeKV("embeddingSyncTime:file-ml-clip-face"),
]);
};
/**