project-m36 icon indicating copy to clipboard operation
project-m36 copied to clipboard

RelError (NoSuchAttributeNamesError (fromList ["attrname"])

Open 3noch opened this issue 8 years ago • 7 comments

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.

3noch avatar Sep 24 '17 03:09 3noch

Could it be that tutd corrupted the database somehow?

3noch avatar Sep 24 '17 03:09 3noch

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).

3noch avatar Sep 24 '17 03:09 3noch

Opening tutd and running :showexpr relvar where attrname="test" gives no error.

3noch avatar Sep 24 '17 03:09 3noch

As far as I can tell if the webserver is the only thing inserting into the database, things work.

3noch avatar Sep 24 '17 04:09 3noch

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.

agentm avatar Sep 24 '17 14:09 agentm

It might help to compare what each client thinks the current transaction graph appears to be by using :showgraph.

agentm avatar Sep 24 '17 14:09 agentm

@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.

agentm avatar Sep 25 '17 15:09 agentm