-
Notifications
You must be signed in to change notification settings - Fork 9.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
raft: check pending conf change before campaign #12134
Conversation
Signed-off-by: Jay Lee <BusyJayLee@gmail.com>
Signed-off-by: Jay Lee <BusyJayLee@gmail.com>
Codecov Report
@@ Coverage Diff @@
## master #12134 +/- ##
==========================================
- Coverage 63.96% 63.28% -0.68%
==========================================
Files 403 403
Lines 37369 37389 +20
==========================================
- Hits 23902 23661 -241
- Misses 11942 12199 +257
- Partials 1525 1529 +4
Continue to review full report at Codecov.
|
@BusyJay Create a separate PR for the 3rd commit since it is not relevant to |
Signed-off-by: Jay Lee <BusyJayLee@gmail.com>
The commit is removed. |
lgtm |
} | ||
ents, err := r.raftLog.slice(r.raftLog.applied+1, r.raftLog.committed+1, noLimit) | ||
if err != nil { | ||
r.logger.Panicf("unexpected error getting unapplied entries (%v)", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there need return err
?
I can't pass unit tests
with error
https://travis-ci.com/github/etcd-io/etcd/jobs/363601925#L3846
raft2020/07/23 19:40:17 unexpected error getting unapplied entries (requested index is unavailable due to compaction)
--- FAIL: TestLeaderTransferAfterSnapshot (0.00s)
panic: unexpected error getting unapplied entries (requested index is unavailable due to compaction) [recovered]
panic: unexpected error getting unapplied entries (requested index is unavailable due to compaction)
goroutine 213 [running]:
testing.tRunner.func1.1(0xba71e0, 0xc000055bc0)
/usr/local/go1.14.4/go/src/testing/testing.go:940 +0x421
testing.tRunner.func1(0xc000477680)
/usr/local/go1.14.4/go/src/testing/testing.go:943 +0x600
panic(0xba71e0, 0xc000055bc0)
/usr/local/go1.14.4/go/src/runtime/panic.go:975 +0x3e3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@BusyJay Can you review this comment , It block my PR test ....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an error that needs to be fixed by the removed commit. I will send it as a separate PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR is sent as #12163.
56233: *: upgrade etcd/raft to master r=knz a=tbg We were using a custom fork that we picked up during our vgo transition, but in the meantime upstream has turned `raft` into a small module which has very few deps, and which we can switch back to. Helpfully, this module already pins gogoproto v1.3+, which simplifies PR #56147. I did review the commits we're picking up here in etcd/raft and they look good. The ones worth pointing out are: etcd-io/etcd#12137 etcd-io/etcd#12134 etcd-io/etcd#12163 These all seem to fix real bugs. Release note: None Co-authored-by: Tobias Grieger <tobias.b.grieger@gmail.com>
fix #12133.