cleanup a bunch of stuff related to compare and swap requests
Summary
-
fix: used to sometimes report incorrect raft term immediately after restarting
-
fix: use picodata's system connection pool for CAS requests
-
fix: unify which term is used for cas predicates
CAS predicates should always contain the current raft term, because this is what's explicitly checked in proc_cas.
Note that this will sometimes result in a EntryTermMismatch error because the latest applied entry may have a different term in case the election has started but not finished yet.
We could add this check to all the client cas precondition checks, but it's not a big deal, because we handle the situation correctly anyways.
-
refactor: move wait_index into compare_and_swap
-
refactor: compare_and_swap now accepts a deadline instead of a timeout
-
refactor: massage compare_and_swap a bit
-
fix: unify all places where we call compare_and_swap and wait for the result
-
fix: check if DdlPrepare was rolled back before waiting for DdlCommit
Rolled back as in raft log roll back, which can happen when a leader changes to one who doesn't have the entry we persisted. Not to be confused with DdlAbort.
-
fix: cas requests are always reconstructed before retrying
-
fix: TermMismatch was always retriable, when did it stop?
-
doc: add comments to retriable error codes explaing why they are retriable
- Cherry-pick to: none
- Docs follow-up: not necessary
Merge request reports
Activity
changed milestone to %24.6 - Plugins and Tiers
requested review from @rosik
assigned to @gmoshkin
added 1 commit
- abe13a16 - refactor: move version bumping from governor Downgrade to update_instance
added 1 commit
- ed95d2d9 - refactor: move version bumping from governor Downgrade to update_instance
TermMismatch was always retriable, when did it stop?
Кажется тут — !1110 (diffs)
- Resolved by Georgy Moshkin
added 17 commits
-
ed95d2d9...2e89c858 - 4 commits from branch
master
- 2e89c858...3638d336 - 3 earlier commits
- 9a3ddb19 - fix: check if DdlPrepare was rolled back before waiting for DdlCommit
- 185341d0 - fix: unify all places where we call compare_and_swap and wait for the result
- 904a10fe - refactor: massage compare_and_swap a bit
- 2a45387d - refactor: compare_and_swap now accepts a deadline instead of a timeout
- 15327a9f - refactor: move wait_index into compare_and_swap
- 575a9f29 - fix: unify which term is used for cas predicates
- bb855e66 - fix: use picodata's system connection pool for CAS requests
- 5e1d1efa - fix: used to sometimes report incorrect raft term immediately after restarting
- 96911a06 - refactor: move version bumping from governor Downgrade to update_instance
- 8b418218 - refactor: make sure current state is always set from target state
Toggle commit list-
ed95d2d9...2e89c858 - 4 commits from branch
enabled an automatic merge when the pipeline for 8b418218 succeeds
changed milestone to %24.5 - Lowercase