sapling/eden
Mark Thomas 080f455000 mutationstore: insert mutation info in a stable order
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
2020-06-16 10:33:41 -07:00
..
fs update eden du backing repos printing 2020-06-15 11:57:29 -07:00
integration fix test 2020-06-15 18:37:01 -07:00
locale add a copyright header to glibc_en.po 2019-04-26 14:38:27 -07:00
mononoke mutationstore: insert mutation info in a stable order 2020-06-16 10:33:41 -07:00
scm sampling: log repo root and repo shared root 2020-06-16 10:25:03 -07:00
scripts packaging: use scheduled tasks 2020-06-10 19:29:15 -07:00
test_support enable asynchronous integration tests 2020-06-15 15:53:50 -07:00
test-data enable treemanifest in snapshots 2019-08-28 18:46:03 -07:00
win add .clang-format 2020-04-28 08:42:03 -07:00
.clang-format Cut FOR_EACH_KV 2020-06-10 19:29:43 -07:00
.gitignore eden: wire up mac contbuild 2019-02-05 21:52:30 -08:00
Eden.project.toml Eden.project.toml file for Nuclide 2018-04-26 11:05:23 -07:00