-
Notifications
You must be signed in to change notification settings - Fork 587
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(subscription): fix drop subscription not clear cursor #17232
Conversation
b25d898
to
0c98e65
Compare
.catalog_writer()? | ||
.list_change_log_epochs(table_id, seek_timestamp, 2) | ||
.list_change_log_epochs(table_id.table_id(), seek_timestamp, 2) |
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.
I have several questions related to list_change_log_epochs
:
- Why do we put
list_change_log_epochs
incatalog_writer
? It is a read-only operation. - Why do we have
list_change_log_epochs
in SessionImpl but unused? - What will
list_change_log_epochs
return if the requested table_id is dropped? Should changelist_change_log_epochs
to make it return an error when the table_id is not found to handle the case when subscription is dropped instead of adding a new method to check existence of a subscription?
if let Cursor::Subscription(cursor) = v { | ||
!matches!(cursor.state, State::Invalid) | ||
} else { | ||
true |
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.
I wonder whether we have similar issue for query cursor. I suspect that query cursor also suffer from the same issue of being valid after the table is dropped.
I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
The current behavior is that after deleting the sub, the cursor will still consume cached data, but the next pull will report an error
invalid cursors will be deleted when creating a new cursor
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.