hemantk-12 commented on code in PR #5091:
URL: https://github.com/apache/ozone/pull/5091#discussion_r1268764752


##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/freon/TestOMSnapshotDAG.java:
##########
@@ -284,6 +284,7 @@ public void testDAGReconstruction()
     snapDB1.close();
     snapDB2.close();
     snapDB3.close();
+    ozoneManager.getOmSnapshotManager().getSnapshotCache().invalidateAll();

Review Comment:
   Why do you need to explicitly invalidate the cache? OM stop should do that 
for you when you restart the cluster in next line.
   
    
[OzoneManager#stop()](https://github.com/apache/ozone/blob/e057eed29fe320685114670ceb7620d9367e0baa/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java#L2194)
 calls 
[omSnapshotManager.close()](https://github.com/apache/ozone/blob/e057eed29fe320685114670ceb7620d9367e0baa/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java#L2235)
 which [invalidates the 
cache](https://github.com/apache/ozone/blob/c4d9456120868aedf0635aac6e6d82b92a0bbe37/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OmSnapshotManager.java#L961).
    
   cluster.restartOzoneManager() -> ozoneManager.stop() -> 
omSnapshotManager.close() -> snapshotCache.invalidateAll().



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