Skip to content

Skip remove-properties commits that change nothing - #4545

Open
tomron wants to merge 1 commit into
apache:mainfrom
tomron:fix/skip-noop-remove-properties
Open

tomron wants to merge 1 commit into
apache:mainfrom
tomron:fix/skip-noop-remove-properties

Conversation

@tomron

@tomron tomron commented Dec 1, 2026

Copy link
Copy Markdown

Closes #4538

Rationale for this change

Removing property keys that aren't set still recorded the update, so update_table_metadata bumped last_updated_ms and defeated the catalogs' skip-commit check. A repeated remove_properties, or one that loses a race to a concurrent removal, wrote a new metadata JSON, added a metadata-log entry and swapped the catalog pointer for a commit that changes nothing. The update is now recorded only when at least one key was removed, matching the set-properties and upgrade-format-version handlers.

Are these changes tested?

Yes. New tests in test_catalog_behaviors.py and test_glue.py check that the metadata location is unchanged, plus an integration test for a removal that races a concurrent commit. test_init.py is updated to expect no metadata change.

Are there any user-facing changes?

No API changes. Removing only unset properties no longer writes a new metadata version.

Removing property keys that aren't set still recorded the update, so
update_table_metadata bumped last_updated_ms and defeated the catalogs'
skip-commit check: a repeated remove_properties, or one that loses a race
to a concurrent removal, wrote a new metadata JSON, added a metadata-log
entry and swapped the catalog pointer for a commit that changes nothing.

Record the update only when at least one key was removed, the same way
the set-properties and upgrade-format-version handlers return early.

Closes apache#4538

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Removing properties that aren't set still writes a new metadata version

1 participant