From 3bed5969bfa8df7a22abb58e1868c5ed39d50adb Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Mon, 3 Sep 2018 10:27:00 +0200 Subject: [PATCH] remove count logging, approach confirmed to work and be according to idb spec --- src/store/indexeddb-local-backend.js | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/store/indexeddb-local-backend.js b/src/store/indexeddb-local-backend.js index 4df9dc0af..4bcbbe6e2 100644 --- a/src/store/indexeddb-local-backend.js +++ b/src/store/indexeddb-local-backend.js @@ -317,8 +317,6 @@ LocalIndexedDBStoreBackend.prototype = { const roomIndex = store.index("room"); const roomRange = IDBKeyRange.only(roomId); - const indexCount = (await reqAsPromise(roomIndex.count(roomRange))).result; - const minStateKeyProm = reqAsCursorPromise( roomIndex.openKeyCursor(roomRange, "next"), ).then((cursor) => cursor && cursor.primaryKey[1]); @@ -336,17 +334,8 @@ LocalIndexedDBStoreBackend.prototype = { [roomId, minStateKey], [roomId, maxStateKey], ); - const count = - (await reqAsPromise(writeStore.count(membersKeyRange))).result; - // Leaving this for now to make sure - if (count !== indexCount) { - console.error(`not deleting all members, ` + - `oob_membership_events and its index room ` + - `dont seem to have the same key order`); - } - - console.log(`LL: Deleting ${count} users + marker for ` + + console.log(`LL: Deleting all users + marker in storage for ` + `room ${roomId}, with key range:`, [roomId, minStateKey], [roomId, maxStateKey]); await reqAsPromise(writeStore.delete(membersKeyRange));