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: Reduce likelihood of race condition in Matching #1157

Merged
merged 1 commit into from
Nov 6, 2024

Conversation

Jonasdoubleyou
Copy link
Member

In case two users are matched at the same time (e.g. through a Match run + manual matching) there is a certain likelihood that they are matched twice. By refetching the openMatchRequestCount right before creating the match, the likelihood of that happening is reduced.

There might also be a bug in the new matching that creates duplicate matches, I hope if there is one, we will find it with this change.

In case two users are matched at the same time (e.g. through a Match run + manual matching) there is a certain likelihood that they are matched twice.
By refetching the openMatchRequestCount right before creating the match, the likelihood of that happening is reduced.

There might also be a bug in the new matching that creates duplicate matches, I hope if there is one, we will find it with this change.
@realmayus realmayus temporarily deployed to backend-fix-match-race--os1dfa November 6, 2024 10:39 Inactive
@Jonasdoubleyou Jonasdoubleyou merged commit 73436b4 into master Nov 6, 2024
2 checks passed
@Jonasdoubleyou Jonasdoubleyou deleted the fix/match-race-condition branch November 6, 2024 11:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants