Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix disappearance issue of renamed schema in File metastore #13309

Merged
merged 1 commit into from
Aug 3, 2022

Conversation

ebyhr
Copy link
Member

@ebyhr ebyhr commented Jul 22, 2022

Description

Fix disappearance issue of renamed schema in File metastore
Fixes #13306

Documentation

(x) No documentation is needed.

Release notes

(x) No release notes entries required.

@findinpath findinpath self-requested a review July 22, 2022 11:09
@findinpath
Copy link
Contributor

Build is red.

try {
if (!metadataFileSystem.rename(getDatabaseMetadataDirectory(databaseName), getDatabaseMetadataDirectory(newDatabaseName))) {
writeSchemaFile(DATABASE, newDatabaseMetadataDirectory, databaseCodec, new DatabaseMetadata(currentVersion, database), false);
deleteSchemaFile(DATABASE, oldDatabaseMetadataDirectory);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not rename?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@findepi Changed to rename.

Additionally, verify renamed schema existence in BaseConnectorTest.testRenameSchema.
@ebyhr
Copy link
Member Author

ebyhr commented Aug 3, 2022

CI hit #12405

@ebyhr ebyhr merged commit 362f691 into trinodb:master Aug 3, 2022
@ebyhr ebyhr deleted the ebi/hive-rename-schema branch August 3, 2022 09:06
@github-actions github-actions bot added this to the 393 milestone Aug 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

Renamed schema disappears in file metastore
3 participants