sarvekshayr opened a new pull request, #9147: URL: https://github.com/apache/ozone/pull/9147
## What changes were proposed in this pull request? In a datanode environment with 900k containers, frequent operations like `ContainerController.getContainerCount(HddsVolume)` and iterating through containers per volume were extremely slow. Looping 1k times took 2.5 minutes. Added two new data structures to `ContainerSet`: - `volumeToContainersMap`: ConcurrentHashMap<String, ConcurrentSkipListSet<Long>> Maps volume UUID -> sorted set of container IDs on that volume Updated on every `addContainer()` and `removeContainer()`. - `volumeContainerCountCache`: ConcurrentHashMap<String, AtomicLong> Caches the count of containers per volume ## What is the link to the Apache JIRA https://issues.apache.org/jira/browse/HDDS-13639 ## How was this patch tested? Added `testContainerCountPerVolume` and `testContainerIteratorPerVolume` in `TestContainerSet`. -- 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]
