hqx871 commented on code in PR #64167:
URL: https://github.com/apache/doris/pull/64167#discussion_r3373082070


##########
fe/fe-core/src/main/java/org/apache/doris/clone/Rebalancer.java:
##########
@@ -119,13 +120,15 @@ protected boolean canBalanceTablet(TabletMeta tabletMeta) 
{
         // Clone ut mocked env, but CatalogRecycleBin is not mockable (it 
extends from Thread)
         // so in clone ut recycleBin need to set to null.
         ColocateTableIndex colocateTableIndex = Env.getCurrentColocateIndex();
+        TenantLevelColocateTableIndex colocateTableTenantLevelIndex = 
Env.getCurrentTenantLevelColocateIndex();
         CatalogRecycleBin recycleBin = null;
         if (!FeConstants.runningUnitTest) {
             recycleBin = Env.getCurrentRecycleBin();
         }
         return tabletMeta != null
                 && !alterTableIds.contains(tabletMeta.getTableId())
-                && (canBalanceColocateTable || 
!colocateTableIndex.isColocateTable(tabletMeta.getTableId()))
+                && (canBalanceColocateTable || 
!colocateTableIndex.isColocateTable(tabletMeta.getTableId())
+                || 
!colocateTableTenantLevelIndex.isColocateTable(tabletMeta.getTableId()))

Review Comment:
   updated



##########
fe/fe-core/src/main/java/org/apache/doris/qe/Coordinator.java:
##########
@@ -2263,23 +2282,32 @@ private void computeScanRangeAssignmentByColocate(
             fragmentIdTobucketSeqToScanRangeMap.put(scanNode.getFragmentId(), 
new BucketSeqToScanRange());
 
             // Same as bucket shuffle.
-            int bucketNum = scanNode.getBucketNum();
-            scanNode.getFragment().setBucketNum(bucketNum);
+            PlanFragment fragment = scanNode.getFragment();
+            if (!fragment.getColocateData().isEmpty()) {
+                fragment.setBucketNum(fragment.getColocateData().size());

Review Comment:
   updated



-- 
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