shwstppr commented on code in PR #9447:
URL: https://github.com/apache/cloudstack/pull/9447#discussion_r1692658041


##########
engine/storage/snapshot/src/main/java/org/apache/cloudstack/storage/snapshot/DefaultSnapshotStrategy.java:
##########
@@ -199,9 +201,8 @@ protected boolean deleteSnapshotChain(SnapshotInfo 
snapshot, String storageToStr
 
         boolean result = false;
         boolean resultIsSet = false;
-        final List<Snapshot.State> snapshotStatesAbleToDeleteSnapshot = 
Arrays.asList(Snapshot.State.BackedUp, Snapshot.State.Destroying, 
Snapshot.State.Destroyed, Snapshot.State.Error);

Review Comment:
   I seem to have made a mistake here. `Snapshot.State.BackedUp` was added to 
allow the deletion of snapshot copies. Using do-while should allow the deletion 
of the first snapshot entry irrespective of the state



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to