JingsongLi commented on code in PR #11232:
URL: https://github.com/apache/paimon/pull/11232#discussion_r4624047893
##########
paimon-core/src/main/java/org/apache/paimon/append/cluster/HistoryPartitionCluster.java:
##########
@@ -129,12 +128,7 @@ public Map<BinaryRow, CompactUnit>
pickForHistoryPartitions() {
@VisibleForTesting
public Map<BinaryRow, List<LevelSortedRun>>
constructLevelsForHistoryPartitions() {
- long historyMilli =
- LocalDateTime.now()
- .minus(historyPartitionIdleTime)
- .atZone(ZoneId.systemDefault())
- .toInstant()
- .toEpochMilli();
+ long historyMilli =
Instant.now().minus(historyPartitionIdleTime).toEpochMilli();
Review Comment:
[P2] Avoid early clustering for files created during the repeated hour
The new cutoff is an instant, but `DataFileMeta` persists a local date-time,
and `creationTimeEpochMillis()` resolves an ambiguous time to the earlier
offset. In a real partition test for `America/New_York`, I wrote the history
file at `2026-11-01T06:15:00Z` (the second 01:15) and planned at `07:45Z` with
a two-hour threshold. The stored timestamp is read back as `05:15Z`. Master
excluded the 90-minute-old partition. This head selected it because the new
cutoff is `05:45Z`. Please handle the overlap when translating existing file
timestamps or use unambiguous creation metadata, and add a case with file
creation inside the second occurrence of the hour.
--
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]