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


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java:
##########
@@ -3632,7 +3633,7 @@ TermIndex installCheckpoint(String leaderId, Path 
checkpointLocation,
       keyManager.stop();
       stopSecretManager();
       stopTrashEmptier();
-
+      omSnapshotManager.getSnapshotCache().invalidateAll();

Review Comment:
   Had a offline discussion and problem is that in case of reloading 
OmMetadataManager, previous 
[snapshotCache](https://github.com/apache/ozone/blob/5a6f08ce48eb7053894596a7bb2d3993072f8c8a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OmSnapshotManager.java#L116)
 object may/may not get GC'ed and new snapshotCache object get created. If 
previous snapshotCache is not GC'ed and has opened RocksDB instance, it will 
keep deleting file because of RocksDB async delete (delete command was executed 
by previous SSTFilteringService run). New cache will try to open RocksDB 
instance based on new manifest and will fail because file is missing. 
   
   Based on logs: On followed node,
   1. File 000077.sst was deleted by SSTFilteringService 
attestInstallIncrementalSnapshot.log line 20972
   1. File 000077.sst was copied from candidate dir to snapshot db dir at 
testInstallIncrementalSnapshot.log line 30871
   1. Background services including SSTFilteringService get started at 
testInstallIncrementalSnapshot.log line 31062
   1. Later SSTFilteringService run fails because file doesn't exist. at 
testInstallIncrementalSnapshot.log line 31111-31112
   Which fails the overall `testInstallIncrementalSnapshot`.
   
   Attached the log file for details: 
[testInstallIncrementalSnapshot.log](https://github.com/apache/ozone/files/12033026/testInstallIncrementalSnapshot.log)
   
   So based on above explanation, we need to invalidate the case in both the 
cases when OmMetadataManager is stopped or not stopped. 
   



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