ctm / mb2-doc

Mb2, poker software
https://devctm.com
7 stars 2 forks source link

Late registratant taken to incorrect table #1285

Closed ctm closed 6 months ago

ctm commented 6 months ago

Figure out what happened in this evening's game.

FYI: I just late registered and was taken to the wrong table.

I should be able to figure this one out just from the logs.

ctm commented 6 months ago

FWIW, the table numbers were 5598 and 5599.

ctm commented 6 months ago

I see nothing in the logs to suggest that this player was taken to the wrong table. If he actually saw the wrong players, then I suspect that he had the wrong table open as an observer and he got confused. For the record, here are some of the things I checked.

The second table was created two minutes and sixteen seconds after the first:

mb2=> select id, created_at at time zone 'america/denver' from tables where id in (5598, 5599) order by id;
  id  |          timezone          
------+----------------------------
 5598 | 2024-01-19 18:05:00.580148
 5599 | 2024-01-19 18:07:16.590707
(2 rows)

The player's table session, which is created with the table that the player is initially sat at was 5599, and was created well after the second table was already running:

mb2=> select id, created_at at time zone 'america/denver', event_id, table_id, player_id from table_sessions where player_id = 6 order by created_at desc limit 5;
         id          |          timezone          | event_id | table_id | player_id 
---------------------+----------------------------+----------+----------+-----------
 1277202748327202127 | 2024-01-19 18:24:17.709158 |     5067 |     5599 |         6
   84598445262077437 | 2024-01-16 18:13:11.407746 |     5059 |     5591 |         6
...

I can see where the player had his table window recreated about eighteen seconds after having been seated the first time:

mb2=> select id, received_at at time zone 'america/denver', message from private_lobby_messages where player_id = 6 and variant = 5 order by received_at desc limit 5;
   id   |          timezone          |                           message                            
--------+----------------------------+--------------------------------------------------------------
 461998 | 2024-01-19 18:24:46.27487  | {"SitAt": [{"EventPlayer": [5067, 6]}, 1277202748327202127]}
 461991 | 2024-01-19 18:24:45.999354 | {"SitAt": [{"EventPlayer": [5067, 6]}, 1277202748327202127]}
 461990 | 2024-01-19 18:24:17.719716 | {"SitAt": [{"EventPlayer": [5067, 6]}, 1277202748327202127]}
...

All the initial private table messages to that player were on table 5599. I checked that via select id, received_at at time zone 'america/denver', table_id, hand_id, message from private_table_messages where player_id = 6 and table_id in (5598, 5599) order by received_at;, but I don't want to put private table messages in this publicly visible comment.

The player doesn't show up in a NewPlayersAdded, MovedTo or MovedFrom message until he shows up in NewPlayersAdded on table 5599:

mb2=> select id, received_at at time zone 'america/denver', table_id, player_id, message, hand_id from public_table_messages where table_id in (5598, 5599) and variant in (11, 51, 52) order by received_at;
    id    |          timezone          | table_id | player_id |                           message                            | hand_id 
----------+----------------------------+----------+-----------+--------------------------------------------------------------+---------
...
 10363740 | 2024-01-19 18:24:17.715141 |     5599 |           | {"NewPlayersAdded": [5067, [6]]}                             |  389438
 10363753 | 2024-01-19 18:24:19.208597 |     5599 |         6 | {"NewPlayersAdded": [5067, [6]]}                             |        
 10363793 | 2024-01-19 18:24:47.370444 |     5599 |         6 | {"NewPlayersAdded": [5067, [6]]}                             |        
...
 10365853 | 2024-01-19 18:46:48.79429  |     5598 |           | {"MovedFrom": [6, 5599, "smalltalkdan", null]}               |  389504
 10365854 | 2024-01-19 18:46:48.79855  |     5599 |           | {"MovedTo": [6, 5598]}                                       |  389505
(35 rows)

My emacs *db* buffer contains the results of some other queries, but there is absolutely no trace of that player on 5598 until he was moved there, long after 6:26 Mountain when he reported to me via a text message that re-logging in fixed the problem.

I'll send email asking for more details, but am not doing it now because I have to get ready and out the door for the Sandia Snowshoe Classic.

ctm commented 6 months ago

I sent email, but have not yet received a reply. I'm closing this for now, but I will reopen it if I get any more info.