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


##########
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:
   Actually you are right, it will be only null when snapshot feature is 
disabled. The original check is kind of confusing and hides when it is actually 
there.
   https://github.com/apache/ozone/pull/5008/files#r1258733466
   
   You can leave it as it is in the patch or change it to actual use feature 
flag. I'm fine either way.



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