raft: let raft step return error when proposal is dropped to allow fail-fast#9067
Conversation
ae6f2c4 to
63d14e3
Compare
63d14e3 to
4081815
Compare
|
Seems the commit message |
|
can you separate the PR into smaller ones? I think the first one can be then we can hook it up with etcd, and upper layers. |
4081815 to
3bc5754
Compare
|
The PR is separated now. |
b5b998b to
a4b7655
Compare
Codecov Report
@@ Coverage Diff @@
## master #9067 +/- ##
==========================================
- Coverage 76.25% 75.97% -0.29%
==========================================
Files 359 359
Lines 29983 29988 +5
==========================================
- Hits 22864 22783 -81
- Misses 5541 5611 +70
- Partials 1578 1594 +16
Continue to review full report at Codecov.
|
| campaignTransfer CampaignType = "CampaignTransfer" | ||
| ) | ||
|
|
||
| var ErrProposalDropped = errors.New("raft proposal dropped") |
There was a problem hiding this comment.
doc string on public error?
There was a problem hiding this comment.
// ErrProposalDropped is returned by the Step function when the passed in proposal is dropped.
|
lgtm. /cc @siddontang @bdarnell |
|
@absolute8511 Can you please add the comment to the error message? then i will get this PR merged right away. |
a4b7655 to
30ced5b
Compare
|
@absolute8511 thanks. looking forward to follow up PRs to hook this up with etcd application layer. |
While the leader is transferring or some other states which the raft node may drop the proposal, we should fail fast to notify the proposal cancelled.
This should fix issue #8975 and #8977