* [pbs-devel] [PATCH backup] verify: print number of chunks failing verification
@ 2025-04-14 8:28 Maximiliano Sandoval
2025-04-15 10:25 ` Fabian Grünbichler
2025-04-15 11:32 ` Wolfgang Bumiller
0 siblings, 2 replies; 4+ messages in thread
From: Maximiliano Sandoval @ 2025-04-14 8:28 UTC (permalink / raw)
To: pbs-devel
We also re-use the error_count variable defined right above.
Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
---
src/backup/verify.rs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backup/verify.rs b/src/backup/verify.rs
index 3d2cba8ac..1344b3b22 100644
--- a/src/backup/verify.rs
+++ b/src/backup/verify.rs
@@ -231,8 +231,8 @@ fn verify_index_chunks(
" verified {read_bytes_mib:.2}/{decoded_bytes_mib:.2} MiB in {elapsed:.2} seconds, speed {read_speed:.2}/{decode_speed:.2} MiB/s ({error_count} errors)"
);
- if errors.load(Ordering::SeqCst) > 0 {
- bail!("chunks could not be verified");
+ if error_count > 0 {
+ bail!("{error_count} chunks could not be verified");
}
Ok(())
--
2.39.5
_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [pbs-devel] [PATCH backup] verify: print number of chunks failing verification
2025-04-14 8:28 [pbs-devel] [PATCH backup] verify: print number of chunks failing verification Maximiliano Sandoval
@ 2025-04-15 10:25 ` Fabian Grünbichler
2025-04-15 11:13 ` Maximiliano Sandoval
2025-04-15 11:32 ` Wolfgang Bumiller
1 sibling, 1 reply; 4+ messages in thread
From: Fabian Grünbichler @ 2025-04-15 10:25 UTC (permalink / raw)
To: Proxmox Backup Server development discussion
On April 14, 2025 10:28 am, Maximiliano Sandoval wrote:
> We also re-use the error_count variable defined right above.
>
> Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
> ---
> src/backup/verify.rs | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/backup/verify.rs b/src/backup/verify.rs
> index 3d2cba8ac..1344b3b22 100644
> --- a/src/backup/verify.rs
> +++ b/src/backup/verify.rs
> @@ -231,8 +231,8 @@ fn verify_index_chunks(
> " verified {read_bytes_mib:.2}/{decoded_bytes_mib:.2} MiB in {elapsed:.2} seconds, speed {read_speed:.2}/{decode_speed:.2} MiB/s ({error_count} errors)"
> );
>
> - if errors.load(Ordering::SeqCst) > 0 {
> - bail!("chunks could not be verified");
> + if error_count > 0 {
> + bail!("{error_count} chunks could not be verified");
but the error count is already included in the log message right before
it?
if we do this, then the message before it should be changed to just
indicate success/failure, logging the error count twice doesn't make
much sense..
> }
>
> Ok(())
> --
> 2.39.5
>
>
>
> _______________________________________________
> pbs-devel mailing list
> pbs-devel@lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
>
>
>
_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [pbs-devel] [PATCH backup] verify: print number of chunks failing verification
2025-04-15 10:25 ` Fabian Grünbichler
@ 2025-04-15 11:13 ` Maximiliano Sandoval
0 siblings, 0 replies; 4+ messages in thread
From: Maximiliano Sandoval @ 2025-04-15 11:13 UTC (permalink / raw)
To: Proxmox Backup Server development discussion
Fabian Grünbichler <f.gruenbichler@proxmox.com> writes:
> On April 14, 2025 10:28 am, Maximiliano Sandoval wrote:
>> We also re-use the error_count variable defined right above.
>>
>> Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
>> ---
>> src/backup/verify.rs | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/src/backup/verify.rs b/src/backup/verify.rs
>> index 3d2cba8ac..1344b3b22 100644
>> --- a/src/backup/verify.rs
>> +++ b/src/backup/verify.rs
>> @@ -231,8 +231,8 @@ fn verify_index_chunks(
>> " verified {read_bytes_mib:.2}/{decoded_bytes_mib:.2} MiB in {elapsed:.2} seconds, speed {read_speed:.2}/{decode_speed:.2} MiB/s ({error_count} errors)"
>> );
>>
>> - if errors.load(Ordering::SeqCst) > 0 {
>> - bail!("chunks could not be verified");
>> + if error_count > 0 {
>> + bail!("{error_count} chunks could not be verified");
>
> but the error count is already included in the log message right before
> it?
You are right, would it make more sense to print it here? The "number of
errors" is a bit unclear and that line is already a bit too long.
It is not clear that "errors" in this context means how many chunks were
not verified.
> if we do this, then the message before it should be changed to just
> indicate success/failure, logging the error count twice doesn't make
> much sense..
>
>> }
>>
>> Ok(())
>> --
>> 2.39.5
>>
>>
>>
>> _______________________________________________
>> pbs-devel mailing list
>> pbs-devel@lists.proxmox.com
>> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
>>
>>
>>
>
>
> _______________________________________________
> pbs-devel mailing list
> pbs-devel@lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [pbs-devel] [PATCH backup] verify: print number of chunks failing verification
2025-04-14 8:28 [pbs-devel] [PATCH backup] verify: print number of chunks failing verification Maximiliano Sandoval
2025-04-15 10:25 ` Fabian Grünbichler
@ 2025-04-15 11:32 ` Wolfgang Bumiller
1 sibling, 0 replies; 4+ messages in thread
From: Wolfgang Bumiller @ 2025-04-15 11:32 UTC (permalink / raw)
To: Maximiliano Sandoval; +Cc: pbs-devel
On Mon, Apr 14, 2025 at 10:28:45AM +0200, Maximiliano Sandoval wrote:
> We also re-use the error_count variable defined right above.
>
> Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
> ---
> src/backup/verify.rs | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/backup/verify.rs b/src/backup/verify.rs
> index 3d2cba8ac..1344b3b22 100644
> --- a/src/backup/verify.rs
> +++ b/src/backup/verify.rs
> @@ -231,8 +231,8 @@ fn verify_index_chunks(
> " verified {read_bytes_mib:.2}/{decoded_bytes_mib:.2} MiB in {elapsed:.2} seconds, speed {read_speed:.2}/{decode_speed:.2} MiB/s ({error_count} errors)"
> );
>
> - if errors.load(Ordering::SeqCst) > 0 {
> - bail!("chunks could not be verified");
> + if error_count > 0 {
> + bail!("{error_count} chunks could not be verified");
The message could also be interpreted as "we couldn't perform the
verification for arbitrary reasons", rather than "this many chunks are
broken". That's a bit odd.
Also, I'm not convinced the number is accurate.
The `decoder_pool` seems to count a case where the encryption mode is
not the expected one in *addition* to failed verifications.
If we want to count the actual chunks, we'd need an additional variable
whose name should also reflect that it is meant to count failed chunks,
not generic errors.
> }
>
> Ok(())
> --
> 2.39.5
_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-04-15 11:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-14 8:28 [pbs-devel] [PATCH backup] verify: print number of chunks failing verification Maximiliano Sandoval
2025-04-15 10:25 ` Fabian Grünbichler
2025-04-15 11:13 ` Maximiliano Sandoval
2025-04-15 11:32 ` Wolfgang Bumiller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal