public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Hannes Laimer <h.laimer@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] superseded: [PATCH proxmox-backup] task tracking: improve pruning of reused-PID stale entries
Date: Thu, 20 Nov 2025 07:05:06 +0100	[thread overview]
Message-ID: <9feaa727-e0c4-4e73-b706-8722677360c8@proxmox.com> (raw)
In-Reply-To: <20251117085813.11797-1-h.laimer@proxmox.com>

superseded-by: 
https://lore.proxmox.com/pbs-devel/20251120060245.21828-1-h.laimer@proxmox.com/T/#u

On 11/17/25 09:57, Hannes Laimer wrote:
> Keep entries only when check_process_running(pid) reports a
> starttime equal to the stored one. This improves pruning of stale
> entries for all PIDs (not just the current one) and aligns update
> with the read path. Counting behavior and semantics are unchanged.
> 
> Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
> ---
> noticed while looking through recent proposed changes to the tracking
> logic. this isn't a problem, but should keep the tracking file cleaner
> and remove a match arm in the code
> 
>   pbs-datastore/src/task_tracking.rs | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/pbs-datastore/src/task_tracking.rs b/pbs-datastore/src/task_tracking.rs
> index 44a4522d..4fcbbaa4 100644
> --- a/pbs-datastore/src/task_tracking.rs
> +++ b/pbs-datastore/src/task_tracking.rs
> @@ -114,8 +114,7 @@ pub fn update_active_operations(
>               .iter_mut()
>               .filter_map(
>                   |task| match procfs::check_process_running(task.pid as pid_t) {
> -                    Some(stat) if pid == task.pid && stat.starttime != task.starttime => None,
> -                    Some(_) => {
> +                    Some(stat) if stat.starttime == task.starttime => {
>                           if pid == task.pid {
>                               found_entry = true;
>                               match operation {



_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel


      parent reply	other threads:[~2025-11-20  6:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-17  8:58 [pbs-devel] " Hannes Laimer
2025-11-17  9:30 ` Fabian Grünbichler
2025-11-17  9:47   ` Hannes Laimer
2025-11-17 12:07     ` Fabian Grünbichler
2025-11-20  6:05 ` Hannes Laimer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9feaa727-e0c4-4e73-b706-8722677360c8@proxmox.com \
    --to=h.laimer@proxmox.com \
    --cc=pbs-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal