FAForever / faf-icebreaker

The FAF ICE server broker
MIT License
0 stars 0 forks source link

Use an external lock around getting the session id #11

Closed Sheikah45 closed 10 months ago

Sheikah45 commented 10 months ago

This takes the lock out of the transaction since releasing the lock before the transaction is committed does us no good.

The one caveat here is that in order for this to work we have to somehow lock the retrieval of the session id to a single mariadb session, otherwise the connection pool could switch sessions between the get and release lock and then the releasing of the lock would fail

Sheikah45 commented 10 months ago

At this point this is superseded by #13 but could make an interesting study on how to properly handle database locks