Skip to main content.

Database Locks

Posted by Apostate on 01/19/20
So let me give a small heads up on this, since while these happened before, I'm not sure people were really aware of them. The current database, SQLite, does not handle concurrency. What this means is while it is the fastest, best database for many types of things, it actually can't handle multiple things trying to happen at once, like trying to read or write from the database simultaneously. When that happens, it blocks an operation. Normally, these things happen in miliseconds so the odds of that happening is quite low, but Arx is not a small game, and as it gets bigger, the odds of it happening is higher, making sometimes commands fail. Since the change over to python 3, one of the settings will probably make this more frequent than we expected.

Now, we're going to be changing databases to fix this, going to postgres which handles concurrency just fine. The problem is the way evennia does attributes is not great, and this has made a database migration way, way too large an operation for it to handle (think millions of rows that it tries to covert simultaneously). This means in turn that Tehom has been slowly refactoring different core things that were built using attributes- like say, every crafted object in the game. This will take a good deal of time.

So in the meantime, if you run into a database lock, just request with anything you might have lost (like crafting materials getting eaten), and we can reimburse you. If you're a coder and you want to massively refactor some of the painstakingly tedious stuff for Tehom, go ahead and hit him up, as almost every attribute that's used to store permanent information pretty much has to go and be refactored into its own models. But yeah this is going to take time, and I appreciate the patience and am sorry for the annoyance of running into locks.