You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Removing properties that aren't set still writes a new metadata version #4538
Since #4522, removing a property key that isn't set no longer raises KeyError, which matches Java. But when none of the keys exist, RemovePropertiesUpdate still calls context.add_update(update). update_table_metadata then sees a change and bumps last_updated_ms.
The Hive, Glue and SQL catalogs skip the commit when the staged metadata equals the current metadata (hive.py:598, glue.py:709, sql.py:513). The bumped last_updated_ms defeats that check. So a repeated remove_properties("a"), or one that loses a race to a concurrent removal, writes a new metadata JSON, adds a metadata-log entry and swaps the catalog pointer for a commit that changes nothing.
Proposed fix:
Only record the update when at least one key was removed, the same way the SetPropertiesUpdate and UpgradeFormatVersionUpdate handlers return early.
Add the concurrent-removal test to tests/integration/test_catalog.py so it runs against every catalog, including Hive and REST. Today it's only in tests/catalog/test_catalog_behaviors.py, which covers just InMemory and SQL. Glue isn't in the integration suite, so it would still need a moto-based case in tests/catalog/test_glue.py.
Activity