From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id 05B901FF0E1 for ; Mon, 13 Jul 2026 11:50:21 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 14CDA2144B; Mon, 13 Jul 2026 11:50:19 +0200 (CEST) From: Lukas Wagner To: pdm-devel@lists.proxmox.com Subject: [PATCH datacenter-manager v2 03/15] task cache: refresh task: don't apply journal if the archive was rotated Date: Mon, 13 Jul 2026 11:49:25 +0200 Message-ID: <20260713094937.151838-4-l.wagner@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260713094937.151838-1-l.wagner@proxmox.com> References: <20260713094937.151838-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: 1783936168898 X-SPAM-LEVEL: Spam detection results: 0 AWL -0.023 Adjusted score from AWL reputation of From: address 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: 4HJ4RUU7TJ2OZAK5RKBQJR2KC3V3DJMJ X-Message-ID-Hash: 4HJ4RUU7TJ2OZAK5RKBQJR2KC3V3DJMJ 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