deardeng commented on code in PR #41126:
URL: https://github.com/apache/doris/pull/41126#discussion_r1806371611


##########
fe/fe-core/src/main/java/org/apache/doris/master/ReportHandler.java:
##########
@@ -691,141 +692,166 @@ private static void sync(Map<Long, TTablet> 
backendTablets, ListMultimap<Long, L
             if (db == null) {
                 continue;
             }
+
             int syncCounter = 0;
-            List<Long> tabletIds = tabletSyncMap.get(dbId);
+            ListMultimap<Long, Long> table2Tablets = tabletSyncMap.get(dbId);
+            List<Table> tables = 
db.getTablesOnIdOrderIfExist(Lists.newArrayList(table2Tablets.keySet()));
+
             LOG.info("before sync tablets in db[{}]. report num: {}. 
backend[{}]",
-                    dbId, tabletIds.size(), backendId);
-            List<TabletMeta> tabletMetaList = 
invertedIndex.getTabletMetaList(tabletIds);
-            for (int i = 0; i < tabletMetaList.size(); i++) {
-                TabletMeta tabletMeta = tabletMetaList.get(i);
-                if (tabletMeta == TabletInvertedIndex.NOT_EXIST_TABLET_META) {
-                    continue;
-                }
-                long tabletId = tabletIds.get(i);
-                long tableId = tabletMeta.getTableId();
-                OlapTable olapTable = (OlapTable) db.getTableNullable(tableId);
-                if (olapTable == null || !olapTable.writeLockIfExist()) {
-                    continue;
-                }
+                    dbId, table2Tablets.size(), backendId);
 
+            int batchTableSize = Config.handle_report_table_batch_size;

Review Comment:
   对config 传入的做个防御,>0,<某值



-- 
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: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to