You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Workbench performs everything in a transaction. If this was alone by itself, this wouldn't have caused an issue.
Subtle concurrency issues with trees can issues. For instance, workbench if uploads trees, then it causes issues with tree actions which involve node numbering (because we end up doing a select * where nodenumber = whatever for update, but since node numbers aren't indexed, it implictly locks all rows (this is still not a full table lock)
If you make collection objects via the form, when workbench is uploading to collection objects, then autonumbering causes a write lock on collectionobject, collection, and other tables. This is very bad. form's lock is delayed by workbench, so form save doesn't happen (gets timed out). Plus, no body is able to use specify because a simple '/specify/' request causes a read request from collection table (which waits for the write request from collection from form to be granted)
Make this return 2 sets, one for read and one for writes. Repetition isn't allowed, so if a table is in both, elevate it to a write (just remove it from read). Put all the discipline, collection, and uniqueness rule tables, and the scope_table in the read set (basically, everything we know we won't write to)
A copy-paste of issue: https://github.com/specify/specify-development/issues/19
select * where nodenumber = whatever for update
, but since node numbers aren't indexed, it implictly locks all rows (this is still not a full table lock)See #5047.
Some raw ideas:
Make this accept two args: one for read and one for writes.
specify7/specifyweb/specify/lock_tables.py
Line 9 in dfe5887
Make this return 2 sets, one for read and one for writes. Repetition isn't allowed, so if a table is in both, elevate it to a write (just remove it from read). Put all the discipline, collection, and uniqueness rule tables, and the scope_table in the read set (basically, everything we know we won't write to)
specify7/specifyweb/specify/autonumbering.py
Line 52 in dfe5887
The text was updated successfully, but these errors were encountered: