Skip to content

Add concurrency safety validation checks#3049

Merged
Fokko merged 3 commits intoapache:mainfrom
gabeiglio:validation-checks
Feb 20, 2026
Merged

Add concurrency safety validation checks#3049
Fokko merged 3 commits intoapache:mainfrom
gabeiglio:validation-checks

Conversation

@gabeiglio
Copy link
Contributor

Closes #1930
Closes #1931

Rationale for this change

Now that we have an implementation of DeleteFileIndex we can move ahead and implement the last two safety concurrency validations mentioned in this #819

Are these changes tested?

Yes

Are there any user-facing changes?

No

@gabeiglio gabeiglio marked this pull request as ready for review February 16, 2026 23:51
parent_snapshot: Ending snapshot on the branch being validated
"""
# If there is no current state, or no files has been added
if parent_snapshot is None or table.format_version < 2:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've verified this logic locally by mocking a concurrent conflict. The table.format_version < 2 guard correctly prevents unnecessary overhead for V1 tables, and the use of the DeleteFileIndex ensures we are only blocking commits when there is a real overlap in data files (avoiding 'lazy' global locks).

@Fokko Fokko merged commit d587aab into apache:main Feb 20, 2026
13 checks passed
@Fokko
Copy link
Contributor

Fokko commented Feb 20, 2026

Thanks, @gabeiglio, for fixing this. Let's move this forward. Thanks @tusharchou and @geruh for the review 🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

4 participants

Comments