storj/satellite/satellitedb
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
..
dbx private/dbutil/txutil: create new transactions for retries 2020-02-01 18:34:28 +00:00
pbold common: separate repository 2019-12-27 14:11:15 +02:00
satellitedbtest private/testplanet: flatten migration for running tests 2020-01-22 15:09:11 +00:00
testdata satellite/metainfo: Rate limiting - API requests 2020-01-21 14:25:04 +00:00
apikeys.go satellite/satellitedb: fixes to row handling 2020-01-16 17:07:26 +02:00
attribution_test.go satellite/satellitedb/satellitedbtest: pass ctx as an argument 2020-01-20 16:35:42 +02:00
attribution.go satellite/satellitedb: add missing err check 2020-01-19 19:24:12 +00:00
buckets.go satellite/satellitedb/dbx: name the package dbx 2020-01-15 15:16:39 -07:00
coinpaymentstxs.go satellite/payments: coinpayments add completed status, treat received status as pending, add balance for completed transactions only 2020-01-17 17:26:34 +00:00
consoledb_test.go satellite/satellitedb/satellitedbtest: pass ctx as an argument 2020-01-20 16:35:42 +02:00
consoledb.go satellite/payments: fix promotional coupons 2020-01-29 16:40:43 +02:00
containment.go satellite/satellitedb/dbx: name the package dbx 2020-01-15 15:16:39 -07:00
coupons.go satellite/satellitedb: better coupons query 2020-01-20 15:05:10 +02:00
customers.go satellite/payments: fix promotional coupons 2020-01-29 16:40:43 +02:00
database.go satellite/satellitedb: reported_serials table for processing orders 2020-01-15 19:21:21 -07:00
downtime.go satellite/satellitedb/dbx: name the package dbx 2020-01-15 15:16:39 -07:00
gracefulexit.go satellite/satellitedb: gracefulexit, add missing Errs check 2020-01-19 15:24:12 +00:00
invoiceprojectrecords.go satellite/satellitedb/dbx: name the package dbx 2020-01-15 15:16:39 -07:00
irreparabledb.go satellite/satellitedb/dbx: name the package dbx 2020-01-15 15:16:39 -07:00
migrate_test.go all: fix import groupings 2020-01-20 17:47:44 +00:00
migrate.go private/dbutil/txutil: create new transactions for retries 2020-02-01 18:34:28 +00:00
offers.go satellite: use tagsql 2020-01-19 14:39:16 +02:00
orders.go satellite/satellitedb: use correct type 2020-01-31 13:00:14 -05:00
overlaycache.go storage: add configurable lookup limits 2020-01-22 21:35:56 +02:00
peeridentities.go satellite: use tagsql 2020-01-19 14:39:16 +02:00
projectaccounting.go satellite/satellitedb: use arrays and batch inserts for SaveTallies query 2020-01-27 16:54:20 -05:00
projectmembers_test.go web/satellite: project members sorting fixed (#3231) 2019-10-15 15:24:53 +03:00
projectmembers.go satellite/satellitedb: fixes to row handling 2020-01-16 17:07:26 +02:00
projects_test.go satellite/satellitedb/dbx: name the package dbx 2020-01-15 15:16:39 -07:00
projects.go satellite/payments: fix promotional coupons 2020-01-29 16:40:43 +02:00
regtokens.go satellite/satellitedb/dbx: name the package dbx 2020-01-15 15:16:39 -07:00
repairqueue.go storage: add configurable lookup limits 2020-01-22 21:35:56 +02:00
resetpasstokens.go satellite/satellitedb/dbx: name the package dbx 2020-01-15 15:16:39 -07:00
storagenodeaccounting.go satellite/satellitedb: use arrays and batch inserts for SaveTallies query 2020-01-27 16:54:20 -05:00
stripecoinpaymentsdb.go satellite/satellitedb: unexport satellitedb.DB 2019-12-16 19:09:30 +00:00
usercredits.go satellite/satellitedb: fixes to row handling 2020-01-16 17:07:26 +02:00
users_test.go satellite/satellitedb/dbx: name the package dbx 2020-01-15 15:16:39 -07:00
users.go satellite/satellitedb/dbx: name the package dbx 2020-01-15 15:16:39 -07:00
utils_test.go common: separate repository 2019-12-27 14:11:15 +02:00
utils.go common: separate repository 2019-12-27 14:11:15 +02:00