duongkame commented on code in PR #5625:
URL: https://github.com/apache/ozone/pull/5625#discussion_r1406603177


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/ScmClient.java:
##########
@@ -111,7 +112,14 @@ public Map<Long, Pipeline> 
getContainerLocations(Iterable<Long> containerIds,
       containerLocationCache.invalidateAll(containerIds);
     }
     try {
-      return containerLocationCache.getAll(containerIds);
+      Map<Long, Pipeline> result = containerLocationCache.getAll(containerIds);
+      // Don't keep empty pipelines in the cache.
+      List<Long> emptyPipelines = result.entrySet().stream()

Review Comment:
   It's simply linear to the number of blocks the key has. E.g. a key with 10 
blocks can span 10 containers. Anyway, the cost is contained by the number of 
blocks, just like before. 



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