Open 3noch opened 7 years ago
Could it be that tutd
corrupted the database somehow?
I should note that tutd
never had any issues after the import + commit. Only my webserver had issues. But if I delete the db and let the webserver create it (with migrations), it works fine. I can observe that the webserver did set up the scheme correctly (by querying with tutd).
Opening tutd and running :showexpr relvar where attrname="test"
gives no error.
As far as I can tell if the webserver is the only thing inserting into the database, things work.
Is the error in the title anonymized? "attrname" doesn't appear anywhere in the code.
I tried to reproduce a similar situation with the websocket client and tutd together but I didn't encounter unexpected behavior.
When two clients share the same database directory, unlike postgresql, for example, there is no read-committed mode, so the trailing client will need to issue a commit or rollback to see the updated transaction graph. Is that the issue you are seeing?
One alternative to address stale state is to use the asynchronous notification callback system which triggers when user-selected state is changed. The client can then decide what action to take.
It might help to compare what each client thinks the current transaction graph appears to be by using :showgraph
.
@3noch suggested that it could be useful to refresh the transaction graph from disk on initiating a new session. I could investigate the feasibility of that.
I'm using the latest changes with compression. I imported a CSV backup into the database (which worked!). I committed and my webserver reported that it didn't know about the records I had added. I thought maybe it needed to start a new session so I restarted the server so it would reconnect to the database. Now I get the error in the subject. The migration transaction apparently finishes fine. It errors out when I try to query the database.