Closed nelhage closed 7 years ago
This is because when saving games to db, I don't specify the game id and let the db pick the next one. If I use the game id as db id, when server is restarted there will be unused db ids since games ongoing during restart are not committed to db. I'll have to think about this a little.
I think -- without having read too much of the code -- that the natural thing here would be to insert "placeholder" games as soon as the game starts, and use the returned id, and then update the record on completion.
But when server is restarted, the placeholder games can't be populated as they're not completed..
I should just record those games as aborted.. yes I'll do that I think
Right now, the IDs received via the server protocol are not the same IDs that end up in the database. A lot of things would be more convenient, programmatically, if they did – for example, a tool could automatically generate archive links from games in real-time. It would enable me to cross-reference my own logs with the server database.