swamirishi commented on code in PR #9380:
URL: https://github.com/apache/ozone/pull/9380#discussion_r2566513232
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/snapshot/defrag/SnapshotDefragService.java:
##########
@@ -613,10 +613,10 @@ private boolean
checkAndDefragSnapshot(SnapshotChainManager chainManager, UUID s
checkpointMetadataManager = null;
// Switch the snapshot DB location to the new version.
previousVersion = atomicSwitchSnapshotDB(snapshotId,
checkpointLocation);
+ omSnapshotManager.deleteSnapshotCheckpointDirectories(snapshotId,
previousVersion);
Review Comment:
No we don't need SnapshotContentLock in purge as the snapshot is already
going to deleted. DeleteSnapshotCheckpointDirectories would acquire snapshot db
lock and ensure all handles for existing db and evict the instance from the
cache altogether. This would ensure before another thread picks up the snapshot
for writing we always pick the newest instance that we have moved.
--
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]