yuqi1129 opened a new pull request, #12656: URL: https://github.com/apache/gravitino/pull/12656
### What changes were proposed in this pull request? - Use `current_version` as the OCC token for fileset alter and direct delete. - Advance the version and write a complete fileset snapshot for every successful alter. - Execute the root fileset CAS before version and dependent-row writes in one transaction. - Distinguish concurrent version changes from deleted, renamed, or moved filesets. - Keep versions monotonic during overwrite and use the persisted fileset identity for version rows. - Add comments explaining transaction ordering, CAS checks, and conflict classification. - Add service and SQL provider tests for the OCC behavior. This is a subtask of #12166 and follows the table OCC implementation in #12551. ### Why are the changes needed? Concurrent fileset writes could overwrite the winning version metadata, while a stale delete could remove data belonging to a newer fileset version. Overwrite could also reset the OCC version. Fix: #12650 ### Does this PR introduce _any_ user-facing change? Stale fileset writes now fail with the existing optimistic-lock or not-found response instead of overwriting newer metadata. No API or property is added. ### How was this patch tested? - Ran the Fileset service, converter, and SQL provider tests on H2. - Ran `:core:check -PskipITs -PskipDockerTests=true`. - Ran Spotless and `git diff --check`. - MySQL and PostgreSQL execution was attempted, but the local database containers failed during connection setup before the test cases ran. -- 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]
