Compare commits

...

2 Commits

Author SHA1 Message Date
Danil Uzlov b4523d9370
Merge 79ce55a4f4 into 8193b689ed 2025-05-14 17:17:17 +07:00
Danil Uzlov 79ce55a4f4 client drivers cleanup: stop background snapshot checks 2025-05-14 10:17:10 +00:00
1 changed files with 11 additions and 3 deletions

View File

@ -113,19 +113,27 @@ class ControllerClientCommonDriver extends CsiBaseDriver {
}
}
if (this.ctx.args.csiMode.includes("controller")) {
setInterval(() => {
if (this.ctx.args.csiMode.includes("controller") && !options.disableBackgroundSnapshotChecks) {
let cutCheckIndex = setInterval(() => {
if (SNAPSHOTS_CUT_IN_FLIGHT.size == 0) {
return;
}
this.ctx.logger.info("snapshots cut in flight", {
names: [...SNAPSHOTS_CUT_IN_FLIGHT],
count: SNAPSHOTS_CUT_IN_FLIGHT.size,
});
}, 30 * 1000);
setInterval(() => {
this.cleanup.push(() => clearInterval(cutCheckIndex));
let restoreCheckIndex = setInterval(() => {
if (SNAPSHOTS_RESTORE_IN_FLIGHT.size == 0) {
return;
}
this.ctx.logger.info("snapshots restore in flight", {
names: [...SNAPSHOTS_RESTORE_IN_FLIGHT],
count: SNAPSHOTS_RESTORE_IN_FLIGHT.size,
});
}, 30 * 1000);
this.cleanup.push(() => clearInterval(restoreCheckIndex));
}
}