Add segmented GVL reference data maintenance

Dieser Commit ist enthalten in:
2026-06-10 20:35:27 +02:00
Ursprung d0dc1978e4
Commit 61a20c424c
6 geänderte Dateien mit 180 neuen und 22 gelöschten Zeilen
+26
Datei anzeigen
@@ -89,6 +89,32 @@ async function purgeUnlockedEvidenceRecords(db) {
});
}
function purgeGvlReferenceData(db) {
return new Promise((resolve, reject) => {
const clearedStores = {};
const tx = db.transaction(VENDORGET_GVL_REFERENCE_STORE_NAMES, "readwrite");
tx.onerror = () => reject(tx.error);
tx.onabort = () => reject(tx.error);
tx.oncomplete = () => {
resolve({
success: true,
clearedStores
});
};
for (const storeName of VENDORGET_GVL_REFERENCE_STORE_NAMES) {
const objectStore = tx.objectStore(storeName);
const countRequest = objectStore.count();
countRequest.onsuccess = () => {
clearedStores[storeName] = countRequest.result;
objectStore.clear();
};
}
});
}
function buildGvlWorkspaceProtectionIndex(db) {
return new Promise((resolve, reject) => {
const protectedSnapshotSha256 = new Set();