aswinshakil commented on code in PR #5554:
URL: https://github.com/apache/ozone/pull/5554#discussion_r1386850362
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/snapshot/SnapshotUtils.java:
##########
@@ -143,23 +144,33 @@ public static void checkSnapshotActive(SnapshotInfo
snapInfo,
public static SnapshotInfo getNextActiveSnapshot(SnapshotInfo snapInfo,
SnapshotChainManager chainManager, OmSnapshotManager omSnapshotManager)
throws IOException {
- while (chainManager.hasNextPathSnapshot(snapInfo.getSnapshotPath(),
- snapInfo.getSnapshotId())) {
- UUID nextPathSnapshot =
- chainManager.nextPathSnapshot(
- snapInfo.getSnapshotPath(), snapInfo.getSnapshotId());
+ // If the snapshot is deleted in the previous run, then the in-memory
+ // SnapshotChainManager might throw NoSuchElementException as the snapshot
+ // is removed in-memory but OMDoubleBuffer has not flushed yet.
+ try {
+ while (chainManager.hasNextPathSnapshot(snapInfo.getSnapshotPath(),
+ snapInfo.getSnapshotId())) {
- String tableKey = chainManager.getTableKey(nextPathSnapshot);
- SnapshotInfo nextSnapshotInfo =
- omSnapshotManager.getSnapshotInfo(tableKey);
+ UUID nextPathSnapshot =
Review Comment:
This is called when the current snapshot is deleted. This is to set the deep
clean flag.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]