hemantk-12 commented on code in PR #5008:
URL: https://github.com/apache/ozone/pull/5008#discussion_r1248333834
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/SstFilteringService.java:
##########
@@ -113,8 +116,16 @@ private class SstFilteringTask implements BackgroundTask {
@Override
public BackgroundTaskResult call() throws Exception {
+ Optional<SnapshotCache> snapshotCache = Optional.ofNullable(ozoneManager)
+ .map(OzoneManager::getOmSnapshotManager)
+ .map(OmSnapshotManager::getSnapshotCache);
+ if (!snapshotCache.isPresent()) {
Review Comment:
If that's the case, I think we should throw an exception if snapshot is
enabled and cache is not available otherwise filtering service will not be
doing any cleanup. But not having cache implies that snapshot is disabled, then
it is fine. Tho I believe it should be explicit.
--
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]