You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit a747ee5
Browse filesBrowse the repository at this point in the historyBrowse files
s_logger.debug("the snapshot has child, can't delete it on the storage");
139
-
break;
140
-
}
141
-
s_logger.debug("Snapshot: " + snapshot.getId() + " doesn't have children, so it's ok to delete it and its parents");
142
-
SnapshotInfoparent = snapshot.getParent();
143
-
booleandeleted = false;
144
-
if (parent != null) {
145
-
if (parent.getPath() != null && parent.getPath().equalsIgnoreCase(snapshot.getPath())) {
146
-
//NOTE: if both snapshots share the same path, it's for xenserver's empty delta snapshot. We can't delete the snapshot on the backend, as parent snapshot still reference to it
147
-
//Instead, mark it as destroyed in the db.
148
-
s_logger.debug("for empty delta snapshot, only mark it as destroyed in db");
149
-
snapshot.processEvent(Event.DestroyRequested);
150
-
snapshot.processEvent(Event.OperationSuccessed);
151
-
deleted = true;
139
+
if (child != null) {
140
+
s_logger.debug("the snapshot has child, can't delete it on the storage");
141
+
break;
152
142
}
143
+
s_logger.debug("Snapshot: " + snapshot.getId() + " doesn't have children, so it's ok to delete it and its parents");
144
+
SnapshotInfoparent = snapshot.getParent();
145
+
booleandeleted = false;
146
+
if (parent != null) {
147
+
if (parent.getPath() != null && parent.getPath().equalsIgnoreCase(snapshot.getPath())) {
148
+
//NOTE: if both snapshots share the same path, it's for xenserver's empty delta snapshot. We can't delete the snapshot on the backend, as parent snapshot still reference to it
149
+
//Instead, mark it as destroyed in the db.
150
+
s_logger.debug("for empty delta snapshot, only mark it as destroyed in db");
0 commit comments