[pbs-devel] [PATCH backup] fix #3336: cleanup when deleting last snapshot

Thomas Lamprecht t.lamprecht at proxmox.com
Tue Mar 11 11:40:45 CET 2025


On 11/03/2025 10:52, Shannon Sterz wrote:
>> That's what the flag is for, touch it on upgrade before the new daemon
>> starts, in the new daemon set an internal global OnceLock (or the like)
>> guarded flag and use that to determine if old or new locking needs to be
>> used. On the next reboot the flag won't be there anymore and thus new
>> locking mode is used.
> hm since this was sparked by the group removal bug (the one that leaves
> the owner file in place), that would mean we can only fix that once we
> are sure that the new locking mechanism is used? or do we build in that
> contingency there too?
At least the global flag could be checked there too and one could select
behavior based on that, if sensible.

While the overhead on our (dev) side is slightly higher, it's not that
high with rust. And FWIW dropping it again should be relatively easy,
one can just remove the flag and then clean up all compile errors that
are caused by that removal, rinse and repeat style.

I do not want to set that solution in stone, but IMO our maintenance
cost amplification will be relatively low while the one for users won't
be, just by the fact that we got a few orders of magnitudes more users
than devs, so if above is really feasible (it has been a while since
we thought this through and tbh. I did not recheck if that was the
exact same solution we came up last time) then it should be worth the
small hassle we have do deal with for one major release.

> can send a v7 that adds the locking strategy switch later today
> probably.

Could be worth to wait on Fabian having a solid objection here, or
discuss that directly – given you both are desk neighbours ^^ – to
avoid potential extra work.




More information about the pbs-devel mailing list