Cyrill commented on code in PR #6135:
URL: https://github.com/apache/ozone/pull/6135#discussion_r1477904954


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/SstFilteringService.java:
##########
@@ -147,10 +147,9 @@ private void markSSTFilteredFlagForSnapshot(String volume, 
String bucket,
     @Override
     public BackgroundTaskResult call() throws Exception {
 
-      Optional<SnapshotCache> snapshotCache = Optional.ofNullable(ozoneManager)
-          .map(OzoneManager::getOmSnapshotManager)
-          .map(OmSnapshotManager::getSnapshotCache);
-      if (!snapshotCache.isPresent()) {
+      Optional<OmSnapshotManager> snapshotManager = 
Optional.ofNullable(ozoneManager)
+          .map(OzoneManager::getOmSnapshotManager);
+      if (!snapshotManager.isPresent()) {

Review Comment:
   I wonder how it is possible that snapshotCache is null if it is a final var 
initialized in the constructor.
   On the other hand `OzoneManager.omSnapshotManager` is not final and gets 
initialized in `OzoneManager.instantiateServices`.



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