aiidateam / aiida-core

The official repository for the AiiDA code
https://aiida-core.readthedocs.io
Other
431 stars 187 forks source link

`test_delete_through_backend` fails with SQLite: sqlalchemy.orm.exc.ObjectDeletedError #6436

Closed danielhollas closed 3 months ago

danielhollas commented 4 months ago

The test in tests/orm/nodes/test_node.py::TestNodeDelete:test_delete_through_backend fails with SQLite backend

sqlalchemy.orm.exc.ObjectDeletedError: Instance '<DbNode at 0x7f6a68845990>' 
has been deleted, or its row is otherwise not present.

We should investigate if this is a smoking gun or something benign.

@sphuber hypothesis

My first guess would be that it might have something to do with the backend.transaction() call on 863. Not sure if this is directly inherited from the psql_dos implementation but transactions may work different in sqlite.

https://github.com/aiidateam/aiida-core/pull/6425#discussion_r1619487322

danielhollas commented 3 months ago

@sphuber just a reminder, it might be nice to investigate the seriousness of this problem before releasing 2.6. I am unfortunately swamped with other high-priority work so will not have time in near future. (also this gets into DB internals that I am not familiar with)