-
Notifications
You must be signed in to change notification settings - Fork 590
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(meta): make drop streaming job catalog and notify frontend transactional #17578
Conversation
IIUC, meta always notify catalog changes to FE while persisting catalog in metastore, which is mutually exclusive with the read of snapshot for subscribe. 🤔 And we always |
Yes it is exclusive originally. But after #17484, we can have:
|
I don't mind keeping it, but haven't thought of a better way to solve this problem yet, since deleting a catalog in meta and FE receiving and processing the notification is not transactional. |
Does it caused by non-transactional of
If so, can we make it transactional like |
Actually yes, that could work. |
c6f365d
to
b84b69e
Compare
src/meta/src/manager/catalog/mod.rs
Outdated
@@ -1295,7 +1295,7 @@ impl CatalogManager { | |||
table_id: TableId, | |||
internal_table_ids: Vec<TableId>, | |||
) -> MetaResult<bool> { | |||
let (table, internal_tables) = { | |||
let table = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need to call self.core.lock()
two times separately in cancel_create_materialized_view_procedure
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm not sure either. I just tried unifying it in one block let's see if the tests pass.
It works. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
As mentioned: #17576 (comment).
The following sequence of events can occur:
The solution is just to make sure drop streaming job catalog and fe notify happens at the same time.
Checklist
./risedev check
(or alias,./risedev c
)Documentation
Release note
If this PR includes changes that directly affect users or other significant modifications relevant to the community, kindly draft a release note to provide a concise summary of these changes. Please prioritize highlighting the impact these changes will have on users.