jojochuang commented on code in PR #9810:
URL: https://github.com/apache/ozone/pull/9810#discussion_r2843637698


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/response/snapshot/OMSnapshotCreateResponse.java:
##########
@@ -75,5 +76,9 @@ public void addToDBBatch(OMMetadataManager omMetadataManager,
     // Create the snapshot checkpoint. Also cleans up some tables.
     OmSnapshotManager.createOmSnapshotCheckpoint(omMetadataManager,
         snapshotInfo, batchOperation);
+
+    // Add entries to snapshotIdToTableKey in case of Raft replay
+    ((OmMetadataManagerImpl) omMetadataManager).getSnapshotChainManager()
+        .addSnapshotToTableKey(snapshotInfo.getSnapshotId(), 
snapshotInfo.getTableKey());

Review Comment:
   should it use SnapshotChainManager.addSnapshot() instead?
   
   it looks to me raft reply would also miss the entry in globalSnapshotChain



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