github-actions[bot] commented on code in PR #65219:
URL: https://github.com/apache/doris/pull/65219#discussion_r3578155489
##########
fe/fe-core/src/main/java/org/apache/doris/clone/DynamicPartitionScheduler.java:
##########
@@ -372,23 +407,30 @@ 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.
+ // convertToUtcTimestamp (called inside) is a no-op for
non-TIMESTAMPTZ
+ // 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, partitionColumn, borderTimeZone);
if (StringUtils.isNotEmpty(storagePolicyName)) {
- setStoragePolicyProperty(partitionProperties,
dynamicPartitionProperty, now, idx, storagePolicyName);
+ setStoragePolicyProperty(partitionProperties,
dynamicPartitionProperty, now, idx,
+ storagePolicyName, partitionColumn, borderTimeZone);
}
String partitionName = dynamicPartitionProperty.getPrefix()
- +
DynamicPartitionUtil.getFormattedPartitionName(dynamicPartitionProperty.getTimeZone(),
+ +
DynamicPartitionUtil.getFormattedPartitionName(borderTimeZone,
Review Comment:
`prevBorderForName` is now computed from `timeCtx.now` and formatted with
`borderTimeZone`, which is UTC for TIMESTAMPTZ. That makes
`dynamic_partition.time_zone` stop controlling TIMESTAMPTZ partition names: for
a daily table with `time_zone='Asia/Shanghai'` at `2026-07-05 16:30:00Z`, the
configured-zone day is `2026-07-06`, but this code generates `p20260705`. The
PR description says naming should remain compatible and only the stored bounds
need UTC midnight alignment; the new `currentUtcBorder` range comparison can
handle auto-bucket current-partition detection without changing user-visible
names. Please keep a configured-zone clock/border for partition names and use
the UTC context only for stored bounds, drop cutoffs, and lifecycle instants.
--
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]