Skip to content
Snippets Groups Projects

important: arrange transaction scope in NodeImpl

Merged Yaroslav Dynnikov requested to merge ready-state-processing into master

Raft-rs interface requires the application to process special structure, the so-called "ready state". It also makes a demand on the processing workflow. The fields must be processed in a certain sequence, see https://docs.rs/raft/0.6.0/raft/index.html#processing-the-ready-state.

For example, it was a mistake to send persisted_messages inside a transaction, because it's forbidded to do so before persisting the hard state, but the actual write happens only in the end of transaction.

As for handling soft_state and read_states, they're useless in a transaction as they don't persist anything.

The documentation is quite complicated, so this code might be revised once again later.

Merge request reports

Merge request pipeline #12228 passed

Merge request pipeline passed for b77ff1da

Approved by

Merged by Yaroslav DynnikovYaroslav Dynnikov 2 years ago (Sep 23, 2022 10:30am UTC)

Pipeline #12232 passed

Pipeline passed for b77ff1da on master

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading