mirror of
https://github.com/facebook/sapling.git
synced 2024-10-11 01:07:15 +03:00
080f455000
Summary: When inserting multiple rows using `INSERT IGNORE`, it's possible to hit deadlocks if two competing transactions insert the same rows in a different order. This can be triggered in the mutation store if two clients are pushing overlapping sets of commits, and the arbitrary changeset order from the `HashSet` gives the commits in a different order. For example the first transaction might be inserting "A, B, C", be holding the lock on row A, and be waiting for the lock on row C, meanwhile another transaction is inserting "C, D, A", holding the lock on row C, and waiting for the lock on row A. To avoid these deadlocks, always insert the mutation changesets in a stable order (sorted by changeset hash or successor hash). Reviewed By: krallin Differential Revision: D22067338 fbshipit-source-id: aa54c8a9c0cac4e4ae35855b44e759f8b6cb4f59 |
||
---|---|---|
.. | ||
schemas | ||
src | ||
test | ||
Cargo.toml |