public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pbs-devel] [PATCH backup] fix #2909: handle missing chunks gracefully in garbage collection
@ 2020-08-04 14:01 Oguz Bektas
  2020-08-05  4:50 ` Dietmar Maurer
  0 siblings, 1 reply; 4+ messages in thread
From: Oguz Bektas @ 2020-08-04 14:01 UTC (permalink / raw)
  To: pbs-devel

instead of bailing and stopping the entire GC process, log the missing
chunk errors and continue.

Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
---
 src/backup/datastore.rs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/backup/datastore.rs b/src/backup/datastore.rs
index ffd64b81..063fba53 100644
--- a/src/backup/datastore.rs
+++ b/src/backup/datastore.rs
@@ -436,8 +436,8 @@ impl DataStore {
             tools::fail_on_shutdown()?;
             let digest = index.index_digest(pos).unwrap();
             if let Err(err) = self.chunk_store.touch_chunk(digest) {
-                bail!("unable to access chunk {}, required by {:?} - {}",
-                      proxmox::tools::digest_to_hex(digest), file_name, err);
+                worker.log(&format!("warning: unable to access chunk {}, required by {:?} - {}",
+                      proxmox::tools::digest_to_hex(digest), file_name, err));
             }
         }
         Ok(())
-- 
2.20.1




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [pbs-devel] [PATCH backup] fix #2909: handle missing chunks gracefully in garbage collection
  2020-08-04 14:01 [pbs-devel] [PATCH backup] fix #2909: handle missing chunks gracefully in garbage collection Oguz Bektas
@ 2020-08-05  4:50 ` Dietmar Maurer
  2020-08-05 10:11   ` Fabian Grünbichler
  0 siblings, 1 reply; 4+ messages in thread
From: Dietmar Maurer @ 2020-08-05  4:50 UTC (permalink / raw)
  To: Proxmox Backup Server development discussion, Oguz Bektas

But now the task finish with status Ok?

IMHO, this is a serious problem...

> On 08/04/2020 4:01 PM Oguz Bektas <o.bektas@proxmox.com> wrote:
> 
>  
> instead of bailing and stopping the entire GC process, log the missing
> chunk errors and continue.
> 
> Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
> ---
>  src/backup/datastore.rs | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/src/backup/datastore.rs b/src/backup/datastore.rs
> index ffd64b81..063fba53 100644
> --- a/src/backup/datastore.rs
> +++ b/src/backup/datastore.rs
> @@ -436,8 +436,8 @@ impl DataStore {
>              tools::fail_on_shutdown()?;
>              let digest = index.index_digest(pos).unwrap();
>              if let Err(err) = self.chunk_store.touch_chunk(digest) {
> -                bail!("unable to access chunk {}, required by {:?} - {}",
> -                      proxmox::tools::digest_to_hex(digest), file_name, err);
> +                worker.log(&format!("warning: unable to access chunk {}, required by {:?} - {}",
> +                      proxmox::tools::digest_to_hex(digest), file_name, err));
>              }
>          }
>          Ok(())
> -- 
> 2.20.1
> 
> 
> _______________________________________________
> 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] fix #2909: handle missing chunks gracefully in garbage collection
  2020-08-05  4:50 ` Dietmar Maurer
@ 2020-08-05 10:11   ` Fabian Grünbichler
  2020-08-05 10:15     ` Oguz Bektas
  0 siblings, 1 reply; 4+ messages in thread
From: Fabian Grünbichler @ 2020-08-05 10:11 UTC (permalink / raw)
  To: Oguz Bektas, Proxmox Backup Server development discussion

On August 5, 2020 6:50 am, Dietmar Maurer wrote:
> But now the task finish with status Ok?
> 
> IMHO, this is a serious problem...
>

for verify this should cause the task to fail, but for GC I am not so 
sure. the garbage collection itself is fine (by definition, any missing 
chunk the GC encounters is one that should not be garbage collected), it 
just found an unrelated problem?

>> On 08/04/2020 4:01 PM Oguz Bektas <o.bektas@proxmox.com> wrote:
>> 
>>  
>> instead of bailing and stopping the entire GC process, log the missing
>> chunk errors and continue.
>> 
>> Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
>> ---
>>  src/backup/datastore.rs | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>> 
>> diff --git a/src/backup/datastore.rs b/src/backup/datastore.rs
>> index ffd64b81..063fba53 100644
>> --- a/src/backup/datastore.rs
>> +++ b/src/backup/datastore.rs
>> @@ -436,8 +436,8 @@ impl DataStore {
>>              tools::fail_on_shutdown()?;
>>              let digest = index.index_digest(pos).unwrap();
>>              if let Err(err) = self.chunk_store.touch_chunk(digest) {
>> -                bail!("unable to access chunk {}, required by {:?} - {}",
>> -                      proxmox::tools::digest_to_hex(digest), file_name, err);
>> +                worker.log(&format!("warning: unable to access chunk {}, required by {:?} - {}",
>> +                      proxmox::tools::digest_to_hex(digest), file_name, err));
>>              }
>>          }
>>          Ok(())
>> -- 
>> 2.20.1
>> 
>> 
>> _______________________________________________
>> 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] fix #2909: handle missing chunks gracefully in garbage collection
  2020-08-05 10:11   ` Fabian Grünbichler
@ 2020-08-05 10:15     ` Oguz Bektas
  0 siblings, 0 replies; 4+ messages in thread
From: Oguz Bektas @ 2020-08-05 10:15 UTC (permalink / raw)
  To: Fabian Grünbichler; +Cc: Proxmox Backup Server development discussion

On Wed, Aug 05, 2020 at 12:11:37PM +0200, Fabian Grünbichler wrote:
> On August 5, 2020 6:50 am, Dietmar Maurer wrote:
> > But now the task finish with status Ok?
> > 
> > IMHO, this is a serious problem...
> >
> 
> for verify this should cause the task to fail, but for GC I am not so 
> sure. the garbage collection itself is fine (by definition, any missing 
> chunk the GC encounters is one that should not be garbage collected), it 
> just found an unrelated problem?

i was thinking the same.

but i'm sending a new version soon

using worker.warn instead of worker.log should make it continue with a
warning status.

> 
> >> On 08/04/2020 4:01 PM Oguz Bektas <o.bektas@proxmox.com> wrote:
> >> 
> >>  
> >> instead of bailing and stopping the entire GC process, log the missing
> >> chunk errors and continue.
> >> 
> >> Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
> >> ---
> >>  src/backup/datastore.rs | 4 ++--
> >>  1 file changed, 2 insertions(+), 2 deletions(-)
> >> 
> >> diff --git a/src/backup/datastore.rs b/src/backup/datastore.rs
> >> index ffd64b81..063fba53 100644
> >> --- a/src/backup/datastore.rs
> >> +++ b/src/backup/datastore.rs
> >> @@ -436,8 +436,8 @@ impl DataStore {
> >>              tools::fail_on_shutdown()?;
> >>              let digest = index.index_digest(pos).unwrap();
> >>              if let Err(err) = self.chunk_store.touch_chunk(digest) {
> >> -                bail!("unable to access chunk {}, required by {:?} - {}",
> >> -                      proxmox::tools::digest_to_hex(digest), file_name, err);
> >> +                worker.log(&format!("warning: unable to access chunk {}, required by {:?} - {}",
> >> +                      proxmox::tools::digest_to_hex(digest), file_name, err));
> >>              }
> >>          }
> >>          Ok(())
> >> -- 
> >> 2.20.1
> >> 
> >> 
> >> _______________________________________________
> >> 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

end of thread, other threads:[~2020-08-05 10:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-04 14:01 [pbs-devel] [PATCH backup] fix #2909: handle missing chunks gracefully in garbage collection Oguz Bektas
2020-08-05  4:50 ` Dietmar Maurer
2020-08-05 10:11   ` Fabian Grünbichler
2020-08-05 10:15     ` Oguz Bektas

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