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

   ### What changes were proposed in this pull request?
   
   Make the MySQL, PostgreSQL, and H2 1.3.0-to-2.0.0 upgrade scripts retryable 
after partial execution. Guard column additions, index 
creation/deletion/renaming, and primary-key conversion while preserving 
existing data and reporting unexpected schema errors.
   
   Add tests for repeated upgrades and retries after each persistent structural 
change or data update. Earlier upgrade scripts are unchanged.
   
   ### Why are the changes needed?
   
   A failed upgrade can leave committed changes behind. Re-running the current 
scripts then fails on already-applied operations, preventing recovery through a 
normal retry.
   
   Related to #12516. This overlaps the 1.3.0-to-2.0.0 index-creation changes 
in #12968 and extends retry handling to the rest of that migration.
   
   ### Does this PR introduce _any_ user-facing change?
   
   Users can retry a partially completed 1.3.0-to-2.0.0 upgrade. No API or 
configuration changes.
   
   ### How was this patch tested?
   
   - Full `TestSQLScripts` suite: 18 tests passed across H2, MySQL, and 
PostgreSQL.
   - Re-ran the two new tests after final test refinements: 6 tests passed, 
covering 107 partial-execution checkpoints and preservation of existing data 
and indexes.
   - Executed the MySQL upgrade script three times using the native client 
without `--force`.
   - Core Spotless checks passed.
   
   ```sh
   ./gradlew :core:test --tests org.apache.gravitino.storage.TestSQLScripts 
-PskipITs -PskipDockerTests=false -PskipWeb=true
   ```
   


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