smengcl commented on code in PR #10321:
URL: https://github.com/apache/ozone/pull/10321#discussion_r3336626755
##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/tasks/NSSummaryTaskDbEventHandler.java:
##########
@@ -43,6 +45,14 @@ public class NSSummaryTaskDbEventHandler {
private ReconNamespaceSummaryManager reconNamespaceSummaryManager;
private ReconOMMetadataManager reconOMMetadataManager;
+ // Bucket layout never changes for an existing bucket, so cache OmBucketInfo
+ // lookups across process() calls. Each delta loop hits at most a few
buckets;
+ // without this cache, every event pays a RocksDB point read in the Legacy
and
+ // OBS sub-tasks.
+ //
+ // Single-thread access only (one dispatcher thread per task). HashMap is
fine.
+ private final Map<String, OmBucketInfo> bucketInfoCache = new HashMap<>();
Review Comment:
Thanks @devmadhuu . Cache entry will now be invalidated when bucket delete
event is processed.
--
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]