canasta
Advance Round
Advance to the next round type after scoring. Any participant can call this.
Deliberately a plain def, like every other mutating handler here: it takes a FOR UPDATE row lock through a SYNCHRONOUS session and contains no awaits. As async def it ran on the event loop, so when three clients hit the end of a scoring countdown together — which is exactly what they do, the countdown is the same for everyone — one request held the lock while the loop was blocked by the next request waiting for it, and the whole backend stopped answering anybody. FastAPI runs a sync handler in a threadpool, where waiting for a lock costs one thread instead of the entire server.
post/chatrooms/{room_name}/canasta/advance
Path parameters
room_namestring required
Headers
authorizationstring nullable
Response
Successful Response
{"stackTrail":"paths:/chatrooms/{room_name}/canasta/advance:post:responses:200:content:application/json:schema","oasType":"schema","type":"unknown"}