github-actions[bot] commented on code in PR #65219:
URL: https://github.com/apache/doris/pull/65219#discussion_r3628790297
##########
fe/fe-core/src/test/java/org/apache/doris/common/PropertyAnalyzerTest.java:
##########
@@ -45,10 +45,13 @@
import java.time.Instant;
import java.time.ZoneId;
+import java.time.ZoneOffset;
+import java.time.ZonedDateTime;
import java.time.format.DateTimeFormatter;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import java.util.TimeZone;
Review Comment:
[P1] Restore the mandatory FE style gate
The current head's FE Code Style Checker fails on this changed import block:
`Set` must sort before `TimeZone` under `CustomImportOrder` (run 29899581802,
job 88857103272). Please swap those imports and rerun the gate; until then the
FE validation cannot pass.
##########
fe/fe-core/src/main/java/org/apache/doris/clone/DynamicPartitionScheduler.java:
##########
@@ -372,23 +457,29 @@ private ArrayList<AddPartitionOp>
getAddPartitionOp(Database db, OlapTable olapT
dynamicPartitionProperty.getReplicaAllocation().toCreateStmt());
}
- // set storage_medium and storage_cooldown_time based on
dynamic_partition.hot_partition_num
- setStorageMediumProperty(partitionProperties,
dynamicPartitionProperty, now, hotPartitionNum, idx);
+ // set storage_medium and storage_cooldown_time based on
dynamic_partition.hot_partition_num.
+ // Use `now` (UTC-based for TIMESTAMPTZ) so the cooldown boundary
+ // aligns with the partition's UTC range, not the configured
timezone.
+ // columns; for TIMESTAMPTZ it appends a +00:00 suffix so
PropertyAnalyzer
+ // can detect this as an unambiguous UTC instant.
+ setStorageMediumProperty(partitionProperties,
dynamicPartitionProperty, now,
+ hotPartitionNum, idx);
if (StringUtils.isNotEmpty(storagePolicyName)) {
- setStoragePolicyProperty(partitionProperties,
dynamicPartitionProperty, now, idx, storagePolicyName);
+ setStoragePolicyProperty(partitionProperties,
dynamicPartitionProperty, now, idx,
+ storagePolicyName);
}
String partitionName = dynamicPartitionProperty.getPrefix()
- +
DynamicPartitionUtil.getFormattedPartitionName(dynamicPartitionProperty.getTimeZone(),
- prevBorderForName, dynamicPartitionProperty.getTimeUnit());
+ +
DynamicPartitionUtil.getFormattedPartitionName(borderTimeZone,
Review Comment:
[P1] Avoid reusing retained legacy HOUR names
Existing integral-offset TIMESTAMPTZ HOUR tables already have UTC-aligned
ranges, but their retained partitions are named with the configured-zone hour.
After this line switches names to UTC, a new nonoverlapping range can reuse an
old name. For example, on a long-running Asia/Shanghai table with `start=-10`,
`end=1`, and `create_history_partition=false`, legacy `p2026072014` can still
cover `[06:00Z,07:00Z)` when the scheduler tries to add new `p2026072014` for
`[14:00Z,15:00Z)`. The range check passes, but `SinglePartitionDesc(true, ...)`
makes `InternalCatalog.addPartition()` silently no-op on the duplicate name.
The following UTC hours collide in turn, and because no-history scheduling
never revisits past ranges, `[14:00Z,22:00Z)` remains permanently uncovered.
Please preserve or migrate legacy names, or reject same-name/different-range
no-ops, and add an upgrade test that advances this retained window.
--
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]