morrySnow commented on code in PR #64795:
URL: https://github.com/apache/doris/pull/64795#discussion_r3489173535


##########
fe/fe-core/src/main/java/org/apache/doris/clone/DynamicPartitionScheduler.java:
##########
@@ -483,9 +493,28 @@ private void setStoragePolicyProperty(HashMap<String, 
String> partitionPropertie
         partitionProperties.put(PropertyAnalyzer.PROPERTIES_DATA_BASE_TIME, 
baseTime);
     }

Review Comment:
   ## Dynamic Partition Upgrade Compatibility
   
   For existing tables with `TIMESTAMPTZ` partition column and dynamic 
partitioning, the old code interpreted border strings (e.g., "2024-06-15 
00:00:00") using `ConnectContext.get().getSessionVariable().timeZone`, which 
could differ from the partition's configured `dynamic_partition.time_zone`.
   
   After this PR, `convertToUtcTimestamp()` explicitly uses the configured 
timezone. This means:
   
   1. **New partitions** created after upgrade will have boundaries aligned to 
UTC midnight according to the configured timezone (correct behavior)
   2. **Existing partitions** (created before upgrade) may have boundaries 
computed with a different timezone
   
   This could cause gaps or overlaps between old and new partition ranges.
   
   **Recommendation:**
   - Document this behavioral change in the release notes
   - Consider adding a check or warning when the scheduler detects a mismatch 
between old and new partition boundary alignment
   - Alternatively, validate during the first dynamic partition run after 
upgrade and auto-fix if needed



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