storj/private
Jeff Wendling d20db90cff private/dbutil/txutil: create new transactions for retries
it was noticed that if you had a long lived transaction A that
was blocking some other transaction B and A was being aborted
due to retriable errors, then transaction B was never given
priority. this was due to using savepoints to do lightweight
retries.

this behavior was problematic becaue we had some queries blocked
for over 16 hours, so this commit addresses the issue with two
prongs:

    1. bound the amount of time we will retry a transaction
    2. create new transactions when a retry is needed

the first ensures that we never wait for 16 hours, and the value
chosen is 10 minutes. that should be long enough for an ample
amount of retries for small queries, and huge queries probably
shouldn't be retried, even if possible: it's more preferrable to
find a way to make them smaller.

the second ensures that even in the case of retries, queries that
are blocked on the aborted transaction gain priority to run.

between those two changes, the maximum stall time due to retries
should be bounded to around 10 minutes.

Change-Id: Icf898501ef505a89738820a3fae2580988f9f5f4
2020-02-01 18:34:28 +00:00
..
context2 private/context2: add WithoutCancellation 2020-01-15 14:23:46 +02:00
cui private: rename internal to private (#3573) 2019-11-14 21:46:15 +02:00
currency private: rename internal to private (#3573) 2019-11-14 21:46:15 +02:00
date private: rename internal to private (#3573) 2019-11-14 21:46:15 +02:00
dbutil private/dbutil/txutil: create new transactions for retries 2020-02-01 18:34:28 +00:00
debugging private: rename internal to private (#3573) 2019-11-14 21:46:15 +02:00
lifecycle private/lifecycle: implement Group 2020-01-29 00:37:33 +00:00
migrate private/dbutil/txutil: create new transactions for retries 2020-02-01 18:34:28 +00:00
post private: rename internal to private (#3573) 2019-11-14 21:46:15 +02:00
processgroup private: rename internal to private (#3573) 2019-11-14 21:46:15 +02:00
s3client common: separate repository 2019-12-27 14:11:15 +02:00
tagsql private/tagsql,storage: fixes to context cancellation 2020-01-20 15:44:39 +02:00
testblobs storagenode: Include trash space when calculating space used 2019-12-23 19:07:03 -07:00
testplanet storagenode,satellite: use pkg/debug 2020-01-29 16:30:31 -05:00
testrevocation common: separate repository 2019-12-27 14:11:15 +02:00
teststorj common: separate repository 2019-12-27 14:11:15 +02:00
testuplink libuplink: adjust tests to changes in encryption store 2020-01-30 22:00:24 +00:00
version private: ensure we don't eat the underlying error 2020-01-14 20:26:51 +00:00