]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
cloud: Fix #8265 Do not re-open part.1 during truncate
authorNorbert Bizet <norbert.bizet@baculasystems.com>
Wed, 3 Nov 2021 13:30:10 +0000 (09:30 -0400)
committerEric Bollengier <eric@baculasystems.com>
Thu, 24 Mar 2022 08:03:04 +0000 (09:03 +0100)
Whem using glacier, if we re-open the part.1 after the truncate,
bacula might have to wait 3 days to get the part.1 from the cloud
to finally truncate it as well. During this call, the SD is locked
and all jobs are blocked.

bacula/src/stored/cloud_dev.c

index c403a4f28c2aaa8b471c6281d692bf6c5130b920..c892cf83399180fe0823491e0a8ee8c77cfbf6c1 100644 (file)
@@ -1792,16 +1792,6 @@ bool cloud_dev::truncate(DCR *dcr)
    dcr->VolCatInfo.VolLastPartBytes = 0;
    dcr->VolCatInfo.VolCatCloudParts = 0;
 
-   openmode = CREATE_READ_WRITE;
-   if (!open_next_part(dcr)) {
-      goto get_out;
-   }
-
-   /* check if the current volume is present in the proxy */
-   if (!probe_cloud_proxy(dcr, getVolCatName())) {
-      goto get_out;
-   }
-
    /* wrap the uploads in a parts ilist */
    transfer *tpkt;
    foreach_alist(tpkt, dcr->uploads) {