swamirishi commented on code in PR #6443:
URL: https://github.com/apache/ozone/pull/6443#discussion_r1539860449


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/response/snapshot/OMSnapshotPurgeResponse.java:
##########
@@ -96,8 +97,9 @@ protected void addToDBBatch(OMMetadataManager 
omMetadataManager,
 
       // Delete Snapshot checkpoint directory.
       deleteCheckpointDirectory(omMetadataManager, snapshotInfo);
-      omMetadataManager.getSnapshotInfoTable().deleteWithBatch(batchOperation,
-          dbKey);
+      omMetadataManager.getSnapshotInfoTable().deleteWithBatch(batchOperation, 
dbKey);
+      ((OmMetadataManagerImpl) omMetadataManager).getSnapshotChainManager()
+          
.deleteSnapshotFromSnapshotIdToTableKey(snapshotInfo.getSnapshotId());

Review Comment:
   I guess we should be removing the snapshot from the snapshot chain as soon 
as we remove from the cache. This operation I believe needs to go in 
OMSnapshotPurgeRequest.



##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/response/snapshot/OMSnapshotPurgeResponse.java:
##########
@@ -96,8 +97,9 @@ protected void addToDBBatch(OMMetadataManager 
omMetadataManager,
 
       // Delete Snapshot checkpoint directory.
       deleteCheckpointDirectory(omMetadataManager, snapshotInfo);
-      omMetadataManager.getSnapshotInfoTable().deleteWithBatch(batchOperation,
-          dbKey);
+      omMetadataManager.getSnapshotInfoTable().deleteWithBatch(batchOperation, 
dbKey);
+      ((OmMetadataManagerImpl) omMetadataManager).getSnapshotChainManager()
+          
.deleteSnapshotFromSnapshotIdToTableKey(snapshotInfo.getSnapshotId());

Review Comment:
   The validateAndUpdateCache method should be removing from snapshot chain



-- 
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]

Reply via email to