Hey all!
Yesterday, an issue arose that led to servers no longer updating through our server browser.
The issue was related to a bug in my code that I initially noticed a couple of months back, but I hadn’t thought it was that bad until now which was my fault. Basically the query that updates our servers in the back-end had an issue where it created a ghost row on every server query insert/update execution. This resulted in the primary key ID sequence number rapidly incrementing over time to the point it ran out of room (running out of space of the max value of integer in PostgreSQL, which is a large number).
While I corrected the issue in the code, the ID sequence number was still out of room and resetting the position wasn’t an option. I did look into just converting the ID column and sequences to a larger data type like bigint, but it just felt so unnecessary and I was running into so many serialization issues between number and bigint with TypeScript and JSON (it was giving me headaches
).
I did also try creating a script that remapped larger ID numbers to smaller ID numbers no longer in-use using a table (filling in the gaps). While the mapping was successful with the servers themselves, the server’s relation data mapping mixed up. I then realized the mapping table was temporary for the transaction and that I didn’t have access to it.
While I still do have backups of server users stats and graph data (that I restored from multiple times while trying to fix everything), I didn’t feel it was worth the amount of time I was putting into trying to map and save the data, especially when I was reworking the entire database model in a separate branch anyways. I decided to prematurely push the changes I’m working on production. This is why the website may look even more unfinished than before.
With that said, I believe a reset would have been needed anyways since there has been so many bugs fixed with stats tracking and such since the last reset. I do believe this should be the last one, unless if there’s a critical bug preventing me from restoring.
If you are upset about the reset, I am sorry. It doesn’t seem like the website is getting that much activity right now, so I figured it’d be okay. If you do want your server graph/user data from before though, feel free to reach out!
Thank you.