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

Disconnect dangling clients #1132

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

kim
Copy link
Contributor

@kim kim commented Apr 22, 2024

When replaying the commitlog, keep track of unpaired connect/disconnect calls and call disconnect when instantiating the module.

Expected complexity level and risk

2

Testing

I do not (yet) know how this could be tested properly.

@kim kim force-pushed the kim/commitlog2/auto-disconnect branch 2 times, most recently from 31b332d to e683699 Compare April 22, 2024 13:10
@bfops bfops added the release-any To be landed in any release window label Apr 22, 2024
Copy link
Contributor

@gefjon gefjon left a comment

Choose a reason for hiding this comment

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

Looks good. Minor suggestions for doc comments.

I hate to do this to you after you implemented this functionality, but I think we should seriously consider an st_connected_clients system table rather than this strategy because of the interaction with snapshotting.

crates/core/src/db/relational_db.rs Show resolved Hide resolved
crates/core/src/db/relational_db.rs Show resolved Hide resolved
crates/core/src/db/relational_db.rs Show resolved Hide resolved
@bfops
Copy link
Contributor

bfops commented Apr 30, 2024

Fixes #1178

@kim
Copy link
Contributor Author

kim commented May 2, 2024

we should seriously consider an st_connected_clients system table

I'm not opposed to this, but it will be a breaking change. If that's ok, or we're willing to delay this change until it is ok, we can go the other route np.

When replaying the commitlog, keep track of unpaired connect/disconnect
calls and call disconnect when instantiating the module.
@kim kim force-pushed the kim/commitlog2/auto-disconnect branch from e683699 to 1183d26 Compare May 2, 2024 06:41
@gefjon
Copy link
Contributor

gefjon commented May 2, 2024

we should seriously consider an st_connected_clients system table

I'm not opposed to this, but it will be a breaking change. If that's ok, or we're willing to delay this change until it is ok, we can go the other route np.

I think certainly we're fine with breaking changes at this stage. I don't know to what extent we're willing to delay this PR; that's a question for @cloutiertyler .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-any To be landed in any release window
Projects
None yet
3 participants