storj/satellite
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
..
accounting satellite: add control panel 2020-01-30 08:06:43 -05:00
attribution satellite/satellitedb/satellitedbtest: pass ctx as an argument 2020-01-20 16:35:42 +02:00
audit satellite: add control panel 2020-01-30 08:06:43 -05:00
console satellite\payments: amount for coupons increased 2020-01-29 22:08:54 +02:00
contact satellite/contact; storagenode/preflight: add clock check on startup for storagenode 2020-01-15 15:35:26 +00:00
dbcleanup satellite: add control panel 2020-01-30 08:06:43 -05:00
downtime satellite: add control panel 2020-01-30 08:06:43 -05:00
gc satellite: add control panel 2020-01-30 08:06:43 -05:00
gracefulexit satellite: add control panel 2020-01-30 08:06:43 -05:00
inspector uplink: move to storj.io/uplink (#3746) 2020-01-08 15:40:19 +02:00
mailservice satellite/mailservice: move logging to send rendered async to cover template parsing (#3654) 2019-11-28 12:29:48 +02:00
marketingweb common: separate repository 2019-12-27 14:11:15 +02:00
metainfo satellite/metainfo: add cache expiration for project level rate limiting 2020-01-29 16:14:10 +00:00
metrics satellite: add control panel 2020-01-30 08:06:43 -05:00
nodestats satellite: remove UptimeReputation configs from codebase 2020-01-08 18:54:15 +00:00
orders satellite/orders: add old method for CreateGetOrderLimitsOld to maintain compatibility with old versions of the uplink 2020-01-28 18:54:24 -05:00
overlay satellite: use require.WithinDuration 2020-01-21 19:43:53 +02:00
payments satellite: add control panel 2020-01-30 08:06:43 -05:00
referrals common: separate repository 2019-12-27 14:11:15 +02:00
repair satellite/repair: lock monkit stats in checker and repairer 2020-01-30 14:09:56 +00:00
rewards common: separate repository 2019-12-27 14:11:15 +02:00
satellitedb private/dbutil/txutil: create new transactions for retries 2020-02-01 18:34:28 +00:00
vouchers common: separate repository 2019-12-27 14:11:15 +02:00
api.go satellite: add control panel 2020-01-30 08:06:43 -05:00
core.go satellite: add control panel 2020-01-30 08:06:43 -05:00
peer.go storagenode,satellite: use pkg/debug 2020-01-29 16:30:31 -05:00
repairer.go satellite: add control panel 2020-01-30 08:06:43 -05:00