From: Gabriel Goller <g.goller@proxmox.com>
To: Thomas Lamprecht <t.lamprecht@proxmox.com>,
Proxmox Backup Server development discussion
<pbs-devel@lists.proxmox.com>
Subject: Re: [pbs-devel] applied: [PATCH proxmox-backup] fix #4895: jobs: ignore task log not found error
Date: Thu, 28 Sep 2023 09:32:28 +0200 [thread overview]
Message-ID: <47c83e8c-9f53-1002-ab12-5d53e18bfbed@proxmox.com> (raw)
In-Reply-To: <a17afc2b-9322-45f1-adaf-d1307d83d110@proxmox.com>
On 9/27/23 17:41, Thomas Lamprecht wrote:
> [..]
> applied, thanks!
>
> IMO it might be worth doing this more centrally, e.g., catch a ENOENT in
> the upid_read_status's `File::open(path)` call and return either
> `TaskState::Unknown { endtime: upid.startime }`, which is also the
> default of upid_read_status on other (parsing) errors, or add a new
> `TaskState::NotFound` state to differ between a unknown result and this
> situation, and make it more likely that call-sites handle this
> explicitly.
>
> What do you think?
Could make sense because we do quite often:
```
upid_read_status(&info.upid).unwrap_or(TaskState::Unknown { endtime: now });
```
The problem is that we use different endtimes (mostly either 0 or 'now')
on every
call. So we would have to convert this to a match statement matching
`TaskState::Unknown`
and changing the endtime AFAICT.
prev parent reply other threads:[~2023-09-28 7:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-20 14:11 [pbs-devel] " Gabriel Goller
2023-09-27 15:41 ` [pbs-devel] applied: " Thomas Lamprecht
2023-09-28 7:32 ` Gabriel Goller [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=47c83e8c-9f53-1002-ab12-5d53e18bfbed@proxmox.com \
--to=g.goller@proxmox.com \
--cc=pbs-devel@lists.proxmox.com \
--cc=t.lamprecht@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal