💾 Archived View for jsreed5.org › log › 2023 › 202312 › 20231213-more-service-breaking-chess-bugs.gm… captured on 2024-06-16 at 13:01:47. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2023-12-28)
-=-=-=-=-=-=-
---
While I work in IT, I am not a programmer, and my programming skills are far from perfect. I've learned this the hard way with the many bugs I've come across in my capsule's chess service. Today, I found and fixed another major one.
The chess service works asynchronously and uses match invitations created by users to find challengers to play against. A SQLite database stores all match and invitation information in the backend, including pending invitations. As users fill in information such as what color they want to play as and public comments, that information is stored in a pending invitation row until the invitation is published.
The chess service also utilizes a cleanup script that deletes invitations that are unanswered for 30 days, as well as setting matches to expire that have not had an update in 60 days. This cleanup script runs once per minute and regenerates the chess index page on each run.
All invitations, including pending invitations, set a time-of-creation value in the database. The cleanup script checks for this time and deletes the invitation if the current time is too far ahead. However, my CGI scripts did not set this time correctly in the creation process, and the cleanup script would delete the pending invitation if the minute rolled over before it was published.
The problem only got worse from there. User data in the database includes a column for pending invitations. The cleanup script was not supposed to clear out pending invitations, so when pending invitations were deleted by the script, the pending-invitation value for the user was not cleared out properly. The user would then be stuck in a limbo where their pending invitation was gone, but the service wouldn't let them clear out hanging data and create a new one. The user was thus permanently locked out from creating invitations.
This is obviously a critical bug, and I feel terrible that I didn't catch it earlier. The problem has now been fixed.
I truly appreciate the Gemini community's patience while I sort out some of these bugs. I know several people have been excited about the prospect of playing chess over Gemini, only to find the service unusable. I apologize for all the inconveniences, and I hope you all enjoy the service.
And if you ever run into bugs, please let me know immediately!
---
[Last updated: 2023-12-13]