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

Remote backfill bug #30

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

jackuoll
Copy link

@jackuoll jackuoll commented Jun 23, 2023

This fixes a nasty bug where a player can be removed during the time where you are fetching the remote backfill ticket.

If the result is assigned to m_LocalBackfillTicket without checking if the data became dirty during the task, then your server will be in an invalid state until it shuts down.

Strangely, if the backfill ticket says that a particular userId is on the backfill ticket, that same userId will be placed in a different match should they queue again, instead of being placed on the same server again. This can lead to a user causing many or ALL servers to be allocated by their userId. This feels like a bug with the matchmaker itself as IMO a user who is already part of a backfill ticket should be assigned to the same match they're "already in", instead of allocating new servers for that player. Alternatively, the matchmaker should update the ticket to reflect the reality of the situation and let the individual server decide whether to kick the player out if they are truly currently in 2 matches.

@Oakfather
Copy link

Nice Catch! Posting to hopefully grab more attention and integrate this.

@WoodsFiend
Copy link

I had what I thought was the same issue and was hoping this would solve but it didn't seem to, maybe you have run into it?

When a user starts and then cancels matchmaking, a server is allocated and the backfill ticket is pre-populated with their userId, then when they try to matchmake again they spin up a new server instead of connecting to the one that's already running.

I agree this seems to be an issue with how matchmaking works. It should either automatically match the user to the server that their id is already in, or not pre-populate the backfill until the user is actually added by server logic.

I am going to try clearing all users from the backfill ticket as soon as a server is allocated and let my add user logic handle adding them back once they actually connect.

@jackuoll
Copy link
Author

jackuoll commented Nov 17, 2024

I am going to try clearing all users from the backfill ticket as soon as a server is allocated and let my add user logic handle adding them back once they actually connect.

The problem with this logic is that servers will over-fill as the matchmaker will no longer know about players that are in progress to join the match. If 20 players simultaneously queued and your server cap was 10, all 20 players would be assigned to the same server since your logic removes them from the ticket the moment they are assigned. Once connected, you would need additional logic to re-queue the players for a different match, which would be a very suboptimal user experience. IMO this really is a bug on the matchmaker side and there's not much as users we can do to handle this.

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