xBis7 commented on code in PR #5625:
URL: https://github.com/apache/ozone/pull/5625#discussion_r1406623287
##########
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:
What about a background thread that checks and removes empty pipelines from
cache, every 10 or 20 mins? After looking at
`KeyManagerImpl#refreshPipelineFromCache()`, it's getting the containerIds for
a list of Keys. The number of container pipelines can be too much to iterate on
every request.
--
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]