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


##########
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);

Review Comment:
   这里table2Tablets.size()应该返回的是table的个数么?不是之前的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]

Reply via email to