Skip to content

Add concurrency safety validation checks#3049

Open
gabeiglio wants to merge 3 commits intoapache:mainfrom
gabeiglio:validation-checks
Open

Add concurrency safety validation checks#3049
gabeiglio wants to merge 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).

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