Skip to content

HIVE-29517: Make schema upgrade scripts idempotent and rerunnable#6383

Draft
soumyakanti3578 wants to merge 3 commits intoapache:masterfrom
soumyakanti3578:HIVE-29517
Draft

HIVE-29517: Make schema upgrade scripts idempotent and rerunnable#6383
soumyakanti3578 wants to merge 3 commits intoapache:masterfrom
soumyakanti3578:HIVE-29517

Conversation

@soumyakanti3578
Copy link
Contributor

What changes were proposed in this pull request?

https://issues.apache.org/jira/browse/HIVE-29517

Make upgrade scripts idempotent by letting DDLs silently fail if the DDL is retrying statements which were already executed.
For example, if the upgrade script creates a table, and then fails later, when we re-run it we can allow it to silently fail on the "CREATE" statement again and just move on to the next statement.

Why are the changes needed?

This makes it upgrades easier. If a script fails we can re-run it without having to manually clean up tables.

Does this PR introduce any user-facing change?

No

How was this patch tested?

mvn test -pl standalone-metastore/metastore-server -Dtest.groups= -Dtest="TestSchemaToolForMetastore#testIdempotent*"

@sonarqubecloud
Copy link

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants