You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-28 05:03:59 +03:00
remove count logging, approach confirmed to work and be according to idb spec
This commit is contained in:
@@ -317,8 +317,6 @@ LocalIndexedDBStoreBackend.prototype = {
|
|||||||
const roomIndex = store.index("room");
|
const roomIndex = store.index("room");
|
||||||
const roomRange = IDBKeyRange.only(roomId);
|
const roomRange = IDBKeyRange.only(roomId);
|
||||||
|
|
||||||
const indexCount = (await reqAsPromise(roomIndex.count(roomRange))).result;
|
|
||||||
|
|
||||||
const minStateKeyProm = reqAsCursorPromise(
|
const minStateKeyProm = reqAsCursorPromise(
|
||||||
roomIndex.openKeyCursor(roomRange, "next"),
|
roomIndex.openKeyCursor(roomRange, "next"),
|
||||||
).then((cursor) => cursor && cursor.primaryKey[1]);
|
).then((cursor) => cursor && cursor.primaryKey[1]);
|
||||||
@@ -336,17 +334,8 @@ LocalIndexedDBStoreBackend.prototype = {
|
|||||||
[roomId, minStateKey],
|
[roomId, minStateKey],
|
||||||
[roomId, maxStateKey],
|
[roomId, maxStateKey],
|
||||||
);
|
);
|
||||||
const count =
|
|
||||||
(await reqAsPromise(writeStore.count(membersKeyRange))).result;
|
|
||||||
|
|
||||||
// Leaving this for now to make sure
|
console.log(`LL: Deleting all users + marker in storage for ` +
|
||||||
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 ` +
|
|
||||||
`room ${roomId}, with key range:`,
|
`room ${roomId}, with key range:`,
|
||||||
[roomId, minStateKey], [roomId, maxStateKey]);
|
[roomId, minStateKey], [roomId, maxStateKey]);
|
||||||
await reqAsPromise(writeStore.delete(membersKeyRange));
|
await reqAsPromise(writeStore.delete(membersKeyRange));
|
||||||
|
|||||||
Reference in New Issue
Block a user