From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id D85591FF135 for ; Thu, 02 Jul 2026 11:23:48 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id A89E221448; Thu, 02 Jul 2026 11:23:48 +0200 (CEST) From: Lukas Wagner To: pdm-devel@lists.proxmox.com Subject: [PATCH datacenter-manager 03/15] task cache: refresh task: don't apply journal if the archive was rotated Date: Thu, 2 Jul 2026 11:22:46 +0200 Message-ID: <20260702092258.174740-4-l.wagner@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260702092258.174740-1-l.wagner@proxmox.com> References: <20260702092258.174740-1-l.wagner@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1782984189589 X-SPAM-LEVEL: Spam detection results: 0 DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: XMV6V3ODNYTWQEODIW4IVKL5GCZ4OSM6 X-Message-ID-Hash: XMV6V3ODNYTWQEODIW4IVKL5GCZ4OSM6 X-MailFrom: l.wagner@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox Datacenter Manager development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Task cache rotation already applies the journal, so there is no need to do this a second time. This also avoids duplicate notices about applied task cache journal entries, such as applying task cache journal committed 470 tasks in 0.008.s to task cache archive rotated remote task archive applying task cache journal committed 0 tasks in 0.000.s to task cache archive Signed-off-by: Lukas Wagner --- server/src/remote_tasks/refresh_task.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server/src/remote_tasks/refresh_task.rs b/server/src/remote_tasks/refresh_task.rs index 632b7d52..68ef5a25 100644 --- a/server/src/remote_tasks/refresh_task.rs +++ b/server/src/remote_tasks/refresh_task.rs @@ -128,6 +128,9 @@ pub async fn handle_timer_tick(task_state: &mut TaskState) -> Result<(), Error> log::debug!("checking if remote task archive should be rotated"); if rotate_cache(cache.clone()).await? { log::info!("rotated remote task archive"); + + // rotation always applies the journal as well + task_state.reset_journal_apply(); } task_state.reset_rotate_check(); -- 2.47.3