]> git.proxmox.com Git - proxmox-backup.git/commit
do_verification_job: fix "never-reverify" and refactor/comment
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 28 Oct 2020 14:33:04 +0000 (15:33 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 28 Oct 2020 15:12:09 +0000 (16:12 +0100)
commitb4b14dc16e4469e1210c9177d7efe1a6c682b61f
treee88d1183c9ea15b2efd6d743fb26e9e8493609bd
parentc4a45ec744f8e304e8f404e7c9923559689c483c
do_verification_job: fix "never-reverify" and refactor/comment

commit a4915dfc2bc7bef03354f97f5bbce9fe2df4e0d6 made a wrong fix, as
it did not observed that the last expressions was done under the
invariant that we had a last verification result, because if none
could be loaded we already returned true (include).

It thus broke the case for "never re-verify", which is important when
using multiple schedules, a more high frequent one for new,
unverified snapshots, and a low frequency to re-verify older snapshots,
e.g., monthly.

Fix this case again, rework the code to avoid this easy to oversee
invariant. Use a nested match to better express the implication of
each setting, and add some comments.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/backup/verify.rs
src/server/verify_job.rs