hubgeter opened a new pull request, #69703:
URL: https://github.com/apache/doris/pull/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 label


-- 
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]

Reply via email to