Commit 4a89fde
committed
fix: compare timestamps for partitions metadata last_updated_at
`InspectTable._update_partitions_map_from_manifest_entry` aggregates
per-partition stats over manifest entries, which are iterated in manifest
order rather than chronologically. The guard that keeps the most recently
committed snapshot per partition compared the stored `last_updated_snapshot_id`
(a snapshot id) against `snapshot.timestamp_ms` (a commit timestamp). Snapshot
ids are large positive 63-bit integers, so `id < timestamp_ms` is effectively
always false and the row keeps whichever entry was visited first instead of the
newest one, reporting the wrong `last_updated_at` / `last_updated_snapshot_id`
for any partition touched by more than one snapshot.
Compare the stored `last_updated_at` timestamp against the incoming
`snapshot.timestamp_ms`, matching the Java `PartitionsTable.Partition.update`
which uses `snapshotCommitTime > this.lastUpdatedAt`.1 parent 9d36e23 commit 4a89fde
2 files changed
Lines changed: 29 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
352 | 352 | | |
353 | 353 | | |
354 | 354 | | |
355 | | - | |
| 355 | + | |
356 | 356 | | |
357 | 357 | | |
358 | 358 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| 25 | + | |
24 | 26 | | |
25 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
26 | 30 | | |
27 | 31 | | |
28 | 32 | | |
| |||
68 | 72 | | |
69 | 73 | | |
70 | 74 | | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
0 commit comments