Skip to content

Commit

Permalink
Merge #43791
Browse files Browse the repository at this point in the history
43791: storage: fix a bad test r=andreimatei a=andreimatei

TestErrorInRaftApplicationClearsIntents was doing two nonsensical
things, that luckily were kind of cancelling each other out:
1) It was constructing a transactional batch but manually setting a
timestamp on the batch. To add assault to injury, the batch's timestamp
was above the txn's read timestamp.
2) It was sending an EndTxn with intent spans, thus pretending that
there had been some writes, but at the same time it was leaving the
txn's sequence number uninitialized.

Number 2) should have been a problem for the test, because it generally causes
the batch to be executed as a 1PC (which would have been a problem for
the intent resolution stuff the test is trying to verify), except that
the nonsensical batch timestmap was confusing the code to believe that
the 1PC execution failed - and so the test was getting the regular
transactional execution for the batch that it wanted by accident.

Release note: None

Co-authored-by: Andrei Matei <[email protected]>
  • Loading branch information
craig[bot] and andreimatei committed Jan 13, 2020
2 parents 6041ed7 + 9baec9d commit 811f75a
Show file tree
Hide file tree
Showing 4 changed files with 151 additions and 139 deletions.
Loading

0 comments on commit 811f75a

Please sign in to comment.