Repository navigation
Commit 62e3d81
authored
[fix](iceberg) Refresh table before classifying expired files (#69703)
### What problem does this PR solve?
Issue Number: N/A
Related PR: #69551
Problem Summary:
`expire_snapshots` built its delete-file kind map from a table handle
that could predate delete files committed by another writer. Iceberg
refreshes table metadata during expiration, so the callback could
receive an unmapped position or equality delete file and count it as a
data file.
Refresh the table before building the file-kind map so classification
and expiration operate on the same metadata generation. Add regression
coverage for position and equality delete files committed after the
table was loaded.
Before the fix, both cases returned `[1, 0, 0, 2, 3, 0]`. After the fix,
position deletes return `[0, 1, 0, 2, 3, 0]` and equality deletes return
`[0, 0, 1, 2, 3, 0]`.
### Release note
Fix `expire_snapshots` misreporting position and equality delete files
as data files after concurrent metadata commits.
### Check List (For Author)
- Test
- [ ] Regression test
- [x] Unit Test
- [ ] Manual test (add detailed scripts or steps below)
- [ ] No need to test or manual test. Explain why:
- [ ] This is a refactor/code format and no logic has been changed.
- [ ] Previous test can cover this change.
- [ ] No code files have been changed.
- [ ] Other reason
Validated on latest `apache/master`: `IcebergExpireSnapshotsActionTest`,
15 tests passed. The full `fe-connector-iceberg` suite previously passed
1739 tests with 14 skipped.
- Behavior changed:
- [ ] No.
- [x] Yes. The reported position/equality delete counters are corrected.
- Does this need documentation?
- [x] No.
- [ ] Yes.
### Check List (For Reviewer who merge this PR)
- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm document
- [ ] Add branch pick label1 parent a47d461 commit 62e3d81
2 files changed
Lines changed: 51 additions & 0 deletions
File tree
- fe/fe-connector/fe-connector-iceberg/src
- main/java/org/apache/doris/connector/iceberg/action
- test/java/org/apache/doris/connector/iceberg/action
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
192 | 196 | | |
193 | 197 | | |
194 | 198 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
32 | 33 | | |
| 34 | + | |
33 | 35 | | |
34 | 36 | | |
35 | 37 | | |
| |||
330 | 332 | | |
331 | 333 | | |
332 | 334 | | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
333 | 380 | | |
334 | 381 | | |
335 | 382 | | |
| |||
0 commit comments