question

justin-1 avatar image
justin-1 asked

CancelMatchmakingTicket sometimes succeeds, but a match is still made with it

Our users are reporting matchmaking bans after canceling a matchmaking ticket, because the cancellation of matchmaking tickets sometimes succeeds, but a match is still being created with the ticket directly after canceling. This causes the player to never connect to the game, because the game assumed the matchmaking was correctly canceled. Even calling GetMatchmakingTicket after canceling still shows "CancellationReasonString": "Requested" and no MatchId.

This is our matchmaking flow:
1. Player calls CreateMatchmakingTicket. We store the TicketId of the response and use it for the next calls.
2. We call GetMatchmakingTicket every 6.1 seconds. We check the CancellationReasonString to see if we should stop matchmaking. If the MatchId is not empty, we retrieve the match with GetMatch and use our multiplayer engine to join the game.
3. During the polling of GetMatchmakingTicket, the player is able to cancel the matchmaking with CancelMatchmakingTicket. If this is causing a MatchmakingTicketAlreadyCompleted error, the player will still join the game during the next poll of GetMatchmakingTicket. If it's not causing an error, matchmaking is canceled.

Matches should never be made with canceled tickets. This has to be a bug in PlayFab.

I'm hoping you can look into this issue as soon as possible.

Matchmaking
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Xiao Zha avatar image
Xiao Zha answered

What does " the cancellation of matchmaking tickets sometimes succeeds, but a match is still being created with the ticket directly after canceling" mean? If the ticket has been successfully cancelled, the MatchId cannot be obtained from the cancelled ticket. So, how do you know that the match is still being created with canceled tickets?

Additionally, from what I understand, If the ticket has been successfully cancelled, client should not go to the next step (connect to the server), since there is no server info returned. And client can start next matchmaking process when they want to.

Matchmaking service doesn’t provide the feature to connect to the server, so the ticket’s status won’t affect the connection to server. Client just needs the IP and Port info to connect to the server. So, what do you mean by “This causes the player to never connect to the game, because the game assumed the matchmaking was correctly canceled”?

1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

justin-1 avatar image justin-1 commented ·

To answer your question, let me describe a test environment I've setup.

  • I'm the only one using the matchmaking queue name.
  • I play with two machines.
  • I start matchmaking on both machines.
  • I cancel matchmaking on machine 2 after about 3 seconds. This returns a success. (So I would assume no match will be made with this machine.)
  • Machine 1 does get a MatchId a couple seconds later, and GetMatch is returning machine 2 as a player. (This must be a bug.)

This means that the cancellation of the ticket of machine 2 didn't actually happen, because machine 2 was still included in the match of machine 1. If it was actually canceled, machine 1 would not find a match, because it was the only active ticket.

Because of this, machine 2 thinks that the matchmaking was correctly canceled and should not be in a game. But the PlayFab matchmaking has already started a server for both machine 1 and 2. Machine 2 will of course never join this server, thus the server will give machine 2 a matchmaking penalty after a while (this is our own system).

So in short: the main issue is that a successfully canceled ticket is sometimes still included in a match by PlayFab matchmaking.

0 Likes 0 ·
Xiao Zha avatar image
Xiao Zha answered

Since I cannot reproduce your issue, could you provide your matchmaking code snippet(include the cancel matchmaking part) and your debug info include two ticket ID and successful cancelled info(with ticket Id) and GetMatch result for us to research.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.