gavinchou commented on PR #64167: URL: https://github.com/apache/doris/pull/64167#issuecomment-4849866827
Potential planner state propagation issue: `mergePlanFragment()` preserves the colocate flag but drops tenant-level `colocateData`. `PhysicalPlanTranslator` sets both `hasColocatePlanNode` and `colocateData` when a tenant-level colocate join is recognized. Later, `PlanTranslatorContext#mergePlanFragment()` only ORs `hasColocatePlanNode`; it does not merge/copy `srcFragment.getColocateData()`. After that, `LoadBalanceScanWorkerSelector` sees `hasColocatePlanNode=true` and enters the colocate/bucket path, but `fragment.getColocateData()` may be empty, so the tag-specific colocate bucket mapping is lost. Relevant code paths: - colocate flag and data are set here: https://github.com/apache/doris/blob/cde59482ce5a548a2652c3aead57096a9c832f22/fe/fe-core/src/main/java/org/apache/doris/nereids/glue/translator/PhysicalPlanTranslator.java#L1697-L1703 - merge only preserves the flag: https://github.com/apache/doris/blob/cde59482ce5a548a2652c3aead57096a9c832f22/fe/fe-core/src/main/java/org/apache/doris/nereids/glue/translator/PlanTranslatorContext.java#L262-L267 - worker selection depends on `colocateData`: https://github.com/apache/doris/blob/cde59482ce5a548a2652c3aead57096a9c832f22/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/distribute/worker/LoadBalanceScanWorkerSelector.java#L136-L150 Can we merge/copy non-empty `colocateData` when fragments are merged, or recompute it deterministically before distribution planning? -- 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]
