aswinshakil commented on code in PR #7045:
URL: https://github.com/apache/ozone/pull/7045#discussion_r1731794340


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/snapshot/OMSnapshotPurgeRequest.java:
##########
@@ -145,7 +145,6 @@ private void updateSnapshotInfoAndCache(SnapshotInfo 
snapInfo,
       // Update table cache first
       omMetadataManager.getSnapshotInfoTable().addCacheEntry(new 
CacheKey<>(snapInfo.getTableKey()),
           CacheValue.get(trxnLogIndex, snapInfo));
-      updatedSnapInfos.put(snapInfo.getTableKey(), snapInfo);

Review Comment:
   We need to add this as well. Because `updateSnapshotInfoAndCache` is being 
called by 
   
https://github.com/apache/ozone/blob/ab343da40d1dedb7a71a47946ce4eda79015a0dd/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/snapshot/OMSnapshotPurgeRequest.java#L108-L112
   
   This `nextSnapshot` should also be added to `updatedSnapshotInfos` because 
we are not using `getUpdatedSnapshotInfo` when getting this snapshot so it 
won't be added to the cache. 



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