diff options
author | Dan Gudmundsson <[email protected]> | 2016-02-03 15:22:04 +0100 |
---|---|---|
committer | Dan Gudmundsson <[email protected]> | 2016-02-05 12:37:36 +0100 |
commit | 6233c5db89867fae35f69bd7b8ef94b32cec605d (patch) | |
tree | 239aa95006146dcfc75a76a491312c25a9ccec37 /prebuild.skip | |
parent | 61ef7511c5ffae0b061d7cc45e9d564b02b891db (diff) | |
download | otp-6233c5db89867fae35f69bd7b8ef94b32cec605d.tar.gz otp-6233c5db89867fae35f69bd7b8ef94b32cec605d.tar.bz2 otp-6233c5db89867fae35f69bd7b8ef94b32cec605d.zip |
mnesia: Avoid deadlock possibility in mnesia:del_table_copy schema
del_table_copy grabs a write lock in a new process in prepare_op/3 to
change 'where_to_read' when a table copy is updated.
When del_table_copy(schema, Node) is called all copies located on Node
are deleted, and thus many locks are taken. Since this was done outside
of the schema-transaction, mnesia's deadlock prevention algorithms
was sidestepped and a deadlock could occur.
Fix by always grabbing write-locks for all changed tabs early and in the same
transaction, this might slow done the operation some but it must be done
and it also cleans up the code.
Diffstat (limited to 'prebuild.skip')
0 files changed, 0 insertions, 0 deletions