From 81f5dd20ca09fb2dbb356e33dcdf65bd5b4ec0ad Mon Sep 17 00:00:00 2001 From: jmsperu Date: Tue, 17 Mar 2026 22:33:45 +0300 Subject: [PATCH] Allow parallel execution of backup and delete commands MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change executeInSequence() to return false for TakeBackupCommand and DeleteBackupCommand, allowing the KVM agent to process multiple backup/delete operations concurrently via its worker thread pool. Previously, all backup commands were serialized — a large VM backup (e.g. 100+ GB taking 2+ hours) would block all other backup and delete operations on the same host. Since each backup mounts its own temporary NFS directory and operates on independent VM disks, there is no shared state requiring serialization. Restore and PrepareForBackupRestoration commands remain sequential as they modify VM state that should not be concurrent. Co-Authored-By: Claude Opus 4.6 --- .../java/org/apache/cloudstack/backup/DeleteBackupCommand.java | 2 +- .../java/org/apache/cloudstack/backup/TakeBackupCommand.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/org/apache/cloudstack/backup/DeleteBackupCommand.java b/core/src/main/java/org/apache/cloudstack/backup/DeleteBackupCommand.java index 16c611af998e..7a37463f7da4 100644 --- a/core/src/main/java/org/apache/cloudstack/backup/DeleteBackupCommand.java +++ b/core/src/main/java/org/apache/cloudstack/backup/DeleteBackupCommand.java @@ -71,6 +71,6 @@ public void setMountOptions(String mountOptions) { @Override public boolean executeInSequence() { - return true; + return false; } } diff --git a/core/src/main/java/org/apache/cloudstack/backup/TakeBackupCommand.java b/core/src/main/java/org/apache/cloudstack/backup/TakeBackupCommand.java index 93855ea17211..7ad08dbafae9 100644 --- a/core/src/main/java/org/apache/cloudstack/backup/TakeBackupCommand.java +++ b/core/src/main/java/org/apache/cloudstack/backup/TakeBackupCommand.java @@ -89,6 +89,6 @@ public void setVolumePaths(List volumePaths) { @Override public boolean executeInSequence() { - return true; + return false; } }