storj/storagenode
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
..
bandwidth storagenode/bandwidth: fix tests to not fail for 10 hours near the end of the month 2020-01-31 16:25:52 -07:00
collector storagenode: add pkg/debug support 2020-01-29 16:30:31 -05:00
console storagenode/bandwidth: fix tests to not fail for 10 hours near the end of the month 2020-01-31 16:25:52 -07:00
contact all: reduce number of log messages 2020-01-06 19:03:46 +00:00
gracefulexit storagenode: add pkg/debug support 2020-01-29 16:30:31 -05:00
inspector storagenode/pieces: Track total piece size 2020-01-23 11:00:24 -07:00
monitor storagenode/bandwidth: fix tests to not fail for 10 hours near the end of the month 2020-01-31 16:25:52 -07:00
nodestats storagenode: add pkg/debug support 2020-01-29 16:30:31 -05:00
notifications storagenode/storagenodedb/storagenodedbtest: pass ctx as an argument 2020-01-20 16:56:12 +02:00
orders storagenode: add pkg/debug support 2020-01-29 16:30:31 -05:00
pieces storagenode/pieces: Log error if cannot calculate piece size 2020-01-31 09:57:44 -05:00
piecestore storagenode/piecestore: log available bandwidth and space on uploads 2020-01-31 19:47:14 +00:00
preflight storagenode/preflight: wait for server to shutdown when tests are 2020-01-28 17:54:19 +00:00
reputation storagenode/storagenodedb/storagenodedbtest: pass ctx as an argument 2020-01-20 16:56:12 +02:00
retain storagenode/storagenodedb/storagenodedbtest: pass ctx as an argument 2020-01-20 16:56:12 +02:00
satellites storagenode/gracefulexit: fix exit-status command output 2020-01-15 14:58:15 +00:00
storagenodedb private/dbutil/txutil: create new transactions for retries 2020-02-01 18:34:28 +00:00
storageusage storagenode/storagenodedb/storagenodedbtest: pass ctx as an argument 2020-01-20 16:56:12 +02:00
trust storagenode: ensure we don't eat the underlying error 2020-01-14 20:26:23 +00:00
operator.go storagenode/main: map aliases for kademlia config values (#3118) 2019-09-30 19:33:00 -04:00
peer.go storagenode: Prevent negative values in piece_space_used, migrate negatives to 0 2020-01-30 13:03:18 -05:00