@@ -361,14 +361,42 @@ public void deleteSnapshot(SnapshotId snapshotId) {
361361 final String snapshotName = snapshotId .getName ();
362362 // Delete snapshot file first so we wouldn't end up with partially deleted snapshot that looks OK
363363 if (snapshot != null ) {
364- snapshotFormat (snapshot .version ()).delete (snapshotsBlobContainer , blobId (snapshotId ));
365- globalMetaDataFormat (snapshot .version ()).delete (snapshotsBlobContainer , snapshotName );
364+ try {
365+ snapshotFormat (snapshot .version ()).delete (snapshotsBlobContainer , blobId (snapshotId ));
366+ } catch (IOException e ) {
367+ logger .debug ("snapshotFormat failed to delete snapshot [{}]" , snapshotId );
368+ }
369+
370+ try {
371+ globalMetaDataFormat (snapshot .version ()).delete (snapshotsBlobContainer , snapshotName );
372+ } catch (IOException e ) {
373+ logger .debug ("gloalMetaDataFormat failed to delete snapshot [{}]" );
374+ }
366375 } else {
367376 // We don't know which version was the snapshot created with - try deleting both current and legacy formats
368- snapshotFormat .delete (snapshotsBlobContainer , blobId (snapshotId ));
369- snapshotLegacyFormat .delete (snapshotsBlobContainer , snapshotName );
370- globalMetaDataLegacyFormat .delete (snapshotsBlobContainer , snapshotName );
371- globalMetaDataFormat .delete (snapshotsBlobContainer , snapshotName );
377+ try {
378+ snapshotFormat .delete (snapshotsBlobContainer , blobId (snapshotId ));
379+ } catch (IOException e ) {
380+ logger .debug ("snapshotFormat failed to delete snapshot [{}]" );
381+ }
382+
383+ try {
384+ snapshotLegacyFormat .delete (snapshotsBlobContainer , snapshotName );
385+ } catch (IOException e ) {
386+ logger .debug ("snapshotLegacyFormat failed to delete snapshot [{}]" );
387+ }
388+
389+ try {
390+ globalMetaDataLegacyFormat .delete (snapshotsBlobContainer , snapshotName );
391+ } catch (IOException e ) {
392+ logger .debug ("globalMetaDataLegacyFormat failed to delete snapshot [{}]" );
393+ }
394+
395+ try {
396+ globalMetaDataFormat .delete (snapshotsBlobContainer , snapshotName );
397+ } catch (IOException e ) {
398+ logger .debug ("globalMetaDataFormat failed to delete snapshot [{}]" );
399+ }
372400 }
373401 // Delete snapshot from the snapshot list
374402 List <SnapshotId > snapshotIds = getSnapshots ().stream ().filter (id -> snapshotId .equals (id ) == false ).collect (Collectors .toList ());
0 commit comments