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

[#4812] fix(core): Make ensure the schema exists before creating tables and topics #4826

Merged
merged 1 commit into from
Aug 30, 2024

Conversation

jerqi
Copy link
Collaborator

@jerqi jerqi commented Aug 30, 2024

What changes were proposed in this pull request? If the schema is not created by Gravitino, the Gravitino will lack the metadata in the backend storage.

If we create a table in this schema, the storage won't contain the metadata. So it will fail to set owner. Because the storage won't store the table. Because the storage won't contain schema id.

This won't bring too much performance cost. Because loadSchema will use read lock after first loading. If we have cache, we could be more quick.

Why are the changes needed?

Fix: #4812

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Added a ut.

…g tables and topics (apache#4818)

### What changes were proposed in this pull request?
If the schema is not created by Gravitino, the Gravitino will lack the
metadata in the backend storage.
If we create a table in this schema, the storage won't contain the
metadata. So it will fail to set owner. Because the storage won't store
the table. Because the storage won't contain schema id.

This won't bring too much performance cost. Because loadSchema will use
read lock after first loading. If we have cache, we could be more quick.

### Why are the changes needed?

Fix: apache#4812

### Does this PR introduce _any_ user-facing change?

No.

### How was this patch tested?

Added a ut.
@jerqi jerqi closed this Aug 30, 2024
@jerqi jerqi reopened this Aug 30, 2024
@jerryshao jerryshao merged commit 9a3759f into apache:branch-0.6 Aug 30, 2024
58 of 78 checks passed
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