-
Notifications
You must be signed in to change notification settings - Fork 645
Decrement view subscriber count on disconnect #3547
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Centril
previously requested changes
Oct 31, 2025
It would be good to have separate datastore-only tests as well to check the logic of the methods you've added to the datastore here. |
87acafb to
0a4e9f5
Compare
a3987a4 to
3d7a395
Compare
45626e6 to
d58ac9f
Compare
Shubham8287
approved these changes
Nov 6, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of Changes
Refactored
st_view_clientand renamed itst_view_subwhich tracks the number of clients subscribed to a view. On disconnect, we decrement thenum_subscriberscolumn in the appropriate rows. An async task will be in charge of cleaning up views (and their read sets) whose subscriber count has gone to zero (not in this patch).On module init, we clear the entirety of each view table.
API and ABI breaking changes
None. Technically this updates the schema of a system table, but the system table was added and modified between releases.
Expected complexity level and risk
~2
Need to make sure we cover all cases so that we don't leave dangling data. Making these tables ephemeral in the future should simplify this.
Testing
Will add tests once we can subscribe to views