We've seen this twice since the auto-creation code made it into the bot. The first time I put the code into a mutex, but that doesn't seem to have worked.
Basically the issue is that due to asynchronicity, one voiceStateUpdate event handler may call into the DB to read the list of practice rooms. Before it has a chance to create the room and update the list of practice rooms, however, another voiceStateUpdate event handler may fire and start creating a room. It now reads the DB to read the list of practice rooms. Now both event handlers add their newly created room to the list and write it back to the DB. The later update squashes the former, since both event handlers added a new room to the original list.
Difficult to get a repro on demand. Workaround is to have staff remove the rogue room, or to register it with p!settings practice_channels add and the bot will remove it when unneeded.
We've seen this twice since the auto-creation code made it into the bot. The first time I put the code into a mutex, but that doesn't seem to have worked.
Basically the issue is that due to asynchronicity, one
voiceStateUpdate
event handler may call into the DB to read the list of practice rooms. Before it has a chance to create the room and update the list of practice rooms, however, anothervoiceStateUpdate
event handler may fire and start creating a room. It now reads the DB to read the list of practice rooms. Now both event handlers add their newly created room to the list and write it back to the DB. The later update squashes the former, since both event handlers added a new room to the original list.Difficult to get a repro on demand. Workaround is to have staff remove the rogue room, or to register it with
p!settings practice_channels add
and the bot will remove it when unneeded.