Sort digest list for index update
Before raising this MR, consider whether the following are required, and complete if so:
-
Unit tests -
Metrics -
Documentation update(s)
If not required, please explain in brief why not.
Description
If two concurrent transactions attempt to update the same two or more rows (e.g. due to two FindMissingBlobs requests with a common subset) but in a different order it can result in both transactions waiting on each other and thus, deadlocking.
This request aims to sort the Digest list that is used to update the rows of the database index, in order that they are updated in a fixed order.
Changes proposed in this merge request:
- Sort the Digest list at the beginning of
_save_digests_to_index()
Validation
n/a
Issues addressed
n/a
Edited by Neill Whillans