IcebreakerSA opened a new pull request, #13014:
URL: https://github.com/apache/gravitino/pull/13014

   ### What changes were proposed in this pull request?
   
   Reload the complete Lance table repair observation after an optimistic lock 
conflict instead of retrying with previously read schema data. Before updating 
metadata, verify that the observed table ID, location, and Lance version still 
match the current table, and verify that the dataset version remains stable 
while its schema is read.
   
   Add deterministic tests for dataset version changes during schema reads, 
concurrent metadata updates, and table replacement.
   
   ### Why are the changes needed?
   
   A schema repair can read an older Lance dataset version and later overwrite 
metadata that already points to a newer version. A version check alone is also 
insufficient when a table is replaced or its location changes.
   
   Fix: #12957
   
   ### Does this PR introduce _any_ user-facing change?
   
   No API or property changes. Lance schema repair no longer writes schema 
metadata from a stale table or dataset observation.
   
   ### How was this patch tested?
   
   - Reproduced the regression against the original implementation, where a 
version 8 observation overwrote metadata at version 9.
   - Ran `./gradlew :catalogs:catalog-lakehouse-generic:check -PskipITs 
-PskipDockerTests=true` on Linux, including the new regression tests: 
https://github.com/IcebreakerSA/gravitino/actions/runs/34237716338
   - Ran compile, Spotless/static checks, and the JNI-independent observation 
validation test locally with JDK 17.
   


-- 
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]

Reply via email to