gavinchou commented on code in PR #60543:
URL: https://github.com/apache/doris/pull/60543#discussion_r2789352634
##########
fe/fe-core/src/main/java/org/apache/doris/catalog/CloudTabletStatMgr.java:
##########
@@ -60,11 +101,42 @@ public CloudTabletStatMgr() {
@Override
protected void runAfterCatalogReady() {
LOG.info("cloud tablet stat begin");
- List<Long> dbIds = getAllTabletStats();
+ // get stats for active tablets
+ Set<Long> copiedTablets;
+ synchronized (activeTablets) {
+ copiedTablets = new HashSet<>(activeTablets);
Review Comment:
better using algorithm like `swap` to get rid of copy, e.g. just new an
instance of `activeTablets`, because `addActiveTablet()` may be blocked for
long if there are millions of tablets.
--
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]