Merged in fix/redis-adjust-batch-settings (pull request #2374)
fix: adjust batch size and remove timeout between delete-calls * fix: adjust batch size and remove timeout between delete-calls * chore: adjust scaling Approved-by: Linus Flood
This commit is contained in:
@@ -112,7 +112,7 @@ function validateKey(key: string) {
|
||||
|
||||
async function deleteWithPattern(pattern: string) {
|
||||
let cursor = "0";
|
||||
const SCAN_SIZE = 500;
|
||||
const SCAN_SIZE = 1000;
|
||||
|
||||
let totalDeleteCount = 0;
|
||||
|
||||
@@ -134,8 +134,6 @@ async function deleteWithPattern(pattern: string) {
|
||||
|
||||
cacheRouteLogger.info(`Deleted ${deleteCount} keys in this batch.`);
|
||||
totalDeleteCount += deleteCount;
|
||||
|
||||
await timeout(10);
|
||||
} while (cursor !== "0");
|
||||
|
||||
return totalDeleteCount;
|
||||
|
||||
Reference in New Issue
Block a user