[pbs-devel] applied: [PATCH proxmox-backup v3] datastore: remove datastore from internal cache based on maintenance mode

Thomas Lamprecht t.lamprecht at proxmox.com
Mon Mar 25 16:15:06 CET 2024


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 at 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!




More information about the pbs-devel mailing list