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

Fix dead lock in SessionPool #826

Merged
merged 1 commit into from
Oct 18, 2023
Merged

Fix dead lock in SessionPool #826

merged 1 commit into from
Oct 18, 2023

Conversation

XAMPPRocky
Copy link
Collaborator

The problem was that in dashmap we were occasionally getting unlucky and having sessions sometimes end up in the same shard, which would cause a deadlock since one would be trying to insert into a shard while we still hold a reference to one.

Fortunately this is a pretty simple fix of not returning a reference at all and instead just returning the socket, since that was the only thing that was used out of the session struct.

The problem was that in dashmap we were occasionally getting unlucky and
having sessions sometimes end up in the same shard, which would cause a
deadlock since one would be trying to insert into a shard while we still
hold a reference to one.

Fortunately this is a pretty simple fix of not returning a reference at
all and instead just returning the socket, since that was the only thing
that was used out of the session struct.
@XAMPPRocky XAMPPRocky enabled auto-merge (squash) October 18, 2023 07:14
@XAMPPRocky XAMPPRocky merged commit 2bc41a5 into main Oct 18, 2023
3 checks passed
@quilkin-bot
Copy link
Collaborator

Build Succeeded 🥳

Build Id: d8571138-b3ea-48b5-be1b-05a669a4c55b

The following development images have been built, and will exist for the next 30 days:

To build this version:

git fetch git@github.com:googleforgames/quilkin.git pull/826/head:pr_826 && git checkout pr_826
cargo build

@XAMPPRocky XAMPPRocky deleted the ep/fix-deadlock branch October 18, 2023 07:32
@markmandel markmandel added the kind/bug Something isn't working label Oct 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working size/m
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants