From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 92F491FF165 for ; Thu, 9 Oct 2025 11:20:22 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 1C64A1A528; Thu, 9 Oct 2025 11:20:28 +0200 (CEST) From: Christian Ebner To: pbs-devel@lists.proxmox.com Date: Thu, 9 Oct 2025 11:20:10 +0200 Message-ID: <20251009092010.199878-1-c.ebner@proxmox.com> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1760001592665 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.043 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pbs-devel] [PATCH proxmox-backup] sync job: pull: avoid blocking future during thread pool completion X-BeenThere: pbs-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Backup Server development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox Backup Server development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pbs-devel-bounces@lists.proxmox.com Sender: "pbs-devel" Chunk insertion during a pull sync job is performed via a thread pool to increase performance. The caller waits for all threads to be completed at the end, relying on the respective associated threads to return from `std::thread::JoinHandle::join`. Insertion into the chunk store can however take time, especially for chunks being uploaded to the object store for datastores with S3 backend. To avoid blocking the async runtime, spawn a dedicated task to await the thread pool completion. Signed-off-by: Christian Ebner --- Encountered while looking for possible causes of proxy hangs as reported in https://forum.proxmox.com/threads/171422/post-807098 src/server/pull.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/pull.rs b/src/server/pull.rs index 08e6e6b64..53f1a570d 100644 --- a/src/server/pull.rs +++ b/src/server/pull.rs @@ -232,7 +232,7 @@ async fn pull_index_chunks( drop(verify_and_write_channel); - verify_pool.complete()?; + let _ = tokio::task::spawn_blocking(|| verify_pool.complete()).await?; let elapsed = start_time.elapsed()?; -- 2.47.3 _______________________________________________ pbs-devel mailing list pbs-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel