1. commit state machine was assuming that begin_write_tx() cannot fail,
but it can fail if there is another tx that is not using BEGIN
CONCURRENT.
2. if a brand new non-CONCURRENT transaction attempts to start exclusive
transaction but fails with Busy, we must end the read pager read tx it
just started, because otherwise the next time it attempts to do
something it will panic with: `"cannot start a new read tx without
ending an existing one"`
Closes#3125
1. commit state machine was assuming that begin_write_tx() cannot
fail, but it can fail if there is another tx that is not using
BEGIN CONCURRENT.
2. if a brand new non-CONCURRENT transaction attempts to start
exclusive transaction but fails with Busy, we must end the read
pager read tx it just started, because otherwise the next time
it attempts to do something it will panic with:
"cannot start a new read tx without ending an existing one"
**test/fuzz: introduce fuzzoptions to tx isolation test**
this makes it significantly easier to tweak the tx isolation test
parameters, and also makes it much easier to run the MVCC version of the
test without manually tweaking code inline to make it work.
introduces default options for the non-mvcc and mvcc test variants.
---
**test/fuzz: improve error handling in tx isolation fuzz test**
- extract out common behavior for checking acceptable errors
- add functionality to check which errors require rolling back
a transaction
Closes#3118
this makes it significantly easier to tweak the tx isolation test parameters,
and also makes it much easier to run the MVCC version of the test without
manually tweaking code inline to make it work.
introduces default options for the non-mvcc and mvcc test variants.
based on #3110closes#3111closes#3113closes#3114
all discovered using `test_multiple_connections_fuzz_mvcc`, so no
separate tests. i can add regression unit/integration tests tomorrow
mvcc: properly remove mutations of rolled back tx
mvstore was not removing deletions made by a tx that rolled back.
deletions are removed by clearing the `end` mark from the row
version.
---
mvcc: properly clear tx states when mvcc tx rolls back
---
mvcc: don't double-rollback on write-write-conflict
handle_program_error() already rolls back if this error happens.
double rollback causes a crash.
Closes#3115
on the main branch, mvcc allows concurrent inserts from multiple
txns even without BEGIN CONCURRENT, and then always hangs whenever
one of the txns tries to commit.
this commit fixes that issue.