deardeng commented on PR #64167:
URL: https://github.com/apache/doris/pull/64167#issuecomment-5041637652

   Please double-check whether the following points are issues. @hqx871 
   
   1. Incorrect bucket-shuffle destinations for slave-first plans
   When the first scan node is a slave table with more buckets than the master 
group, bucket-shuffle uses the slave’s physical bucket count instead of the 
colocate group bucket count. Only the folded group buckets have real receiver 
instances, so the remaining destinations become dummy receivers. This may cause 
query failures or incorrect results.
   
   2. Failed ALTER can leave unjournaled in-memory metadata
   Adding an empty table to a new tenant-level colocate group may produce a 
null backend bucket sequence. The code updates the in-memory colocate index 
before checking it for null and before writing the edit log. Therefore, a 
failed ALTER can leave the in-memory metadata inconsistent with replayed 
metadata after restart.
   
   3. Checker cannot handle slave partitions with different bucket counts
   The slave checker builds the backend bucket sequence using the table’s 
default bucket count and reuses it for every partition. However, slave 
partitions are allowed to use different bucket counts as long as they are 
multiples of the master bucket count. Such partitions trigger the size 
assertion, causing the group to be skipped on every checker cycle.
   
   4. Race condition when removing the last master table
   Removing master membership, checking slave references, and deleting group 
metadata are performed in separate lock sections. A slave may join between the 
check and deletion, leaving a dangling slave reference. Concurrent removal of 
the last master tables may also delete the same group twice and cause a 
null-pointer exception.
   
   5. Folded bucket scan bytes are overwritten
   When multiple slave buckets are folded into one colocate bucket, their scan 
bytes are stored using put(). This overwrites previous values instead of 
accumulating them, underestimating the bucket workload and potentially causing 
unbalanced worker selection. It should use merge(..., Long::sum).


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