From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: Proxmox Backup Server development discussion
<pbs-devel@lists.proxmox.com>,
Hannes Laimer <h.laimer@proxmox.com>
Subject: [pbs-devel] applied: [PATCH proxmox-backup v3] datastore: remove datastore from internal cache based on maintenance mode
Date: Mon, 25 Mar 2024 16:15:06 +0100 [thread overview]
Message-ID: <fcdf217d-0fe0-44de-add6-4b83b544b399@proxmox.com> (raw)
In-Reply-To: <20240304132618.91099-1-h.laimer@proxmox.com>
Am 04/03/2024 um 14:26 schrieb Hannes Laimer:
> We keep a DataStore cache, so ChunkStore's and lock files are kept by
> the proxy process and don't have to be reopened every time. However, for
> specific maintenance modes, e.g. 'offline', our process should not keep
> file in that datastore open. This clears the cache entry of a datastore
> if it is in a specific maintanance mode and the last task finished, which
> also drops any files still open by the process.
>
> Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
> ---
>
> v3, thanks @Thomas:
> - pass ds name through command socket -> don't have to loop through all
> on proxy
> - fn clear_from_cache -> fn is_offline
> - add note that describes that the cache entry removal is done by the
> drop handler
>
> v2, thanks @Gabriel:
> - improve comments
> - remove not needed &'s and .clone()'s
>
> pbs-api-types/src/maintenance.rs | 6 +++++
> pbs-datastore/src/datastore.rs | 40 ++++++++++++++++++++++++++++--
> pbs-datastore/src/task_tracking.rs | 23 ++++++++++-------
> src/api2/config/datastore.rs | 21 ++++++++++++++++
> src/bin/proxmox-backup-proxy.rs | 10 ++++++++
> 5 files changed, 89 insertions(+), 11 deletions(-)
>
>
applied, with Gabriel's R-b and T-b tags, thanks!
prev parent reply other threads:[~2024-03-25 15:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-04 13:26 [pbs-devel] " Hannes Laimer
2024-03-22 13:52 ` Gabriel Goller
2024-03-25 15:15 ` Thomas Lamprecht [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=fcdf217d-0fe0-44de-add6-4b83b544b399@proxmox.com \
--to=t.lamprecht@proxmox.com \
--cc=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