-
- Downloads
Fix deadlock in 10-node cluster convergence (#2467)
This PR fixes #2286 . - CheckQuorum was causing us multiple issues. When doing a 5-node Zero cluster bootstrap, it would cause a leader to step down when the size of the cluster is 2, then causing all the rest of the joins to be blocked indefinitely. It would also cause leader step down in a seemingly healthy cluster which is processing proposals. CheckQuorum was mandated by raft.ReadOnlyLeaseBased, which is a less safe option to do linearizable reads. Switch ReadOnlyOption back to raft.ReadOnlySafe. Moreover, we don't need to do quorum based lin reads in the Alpha servers, because of the switch to proposing and then applying transaction updates. - raft.ReadIndex is not working for some reason. So, commented out its usage in Zero (and removed it from Alpha permanently). Needs to be fixed when the following issue is resolved. https://github.com/coreos/etcd/issues/9893 - The logic to do lin reads was replicated in both Zero and Alpha. Refactor that into one place in conn/node.go. - Retry conf change proposals if they timeout. This mechanism is similar to the one introduced for normal proposals in a previous commit 06ea4c. - Use a lock to only allow one JoinCluster call at a time. Block JoinCluster until node.AddToCluster is successful (or return the error). - Set raft library to 3.2.23. Before upgrade, we were at 3.2.6. Commit log: * Trying to understand why JoinCluster doesn't work properly. * Fucking works. Fucking works. * It all works now. * More Dgraph servers. Found a new issue where requesting read quorum doesn't respond. * Refactor wait lin read code and move it to conn/node.go * Remove lin read wait for server, because txn timestamp should be sufficient for waiting. Also, for the time being, comment out lin read wait from Zero as well.
Showing
- conn/node.go 163 additions, 38 deletionsconn/node.go
- conn/pool.go 2 additions, 2 deletionsconn/pool.go
- dgraph/cmd/zero/raft.go 17 additions, 66 deletionsdgraph/cmd/zero/raft.go
- dgraph/cmd/zero/zero.go 8 additions, 5 deletionsdgraph/cmd/zero/zero.go
- dgraph/docker-compose.yml 77 additions, 24 deletionsdgraph/docker-compose.yml
- vendor/github.com/coreos/etcd/raft/README.md 6 additions, 6 deletionsvendor/github.com/coreos/etcd/raft/README.md
- vendor/github.com/coreos/etcd/raft/node.go 2 additions, 4 deletionsvendor/github.com/coreos/etcd/raft/node.go
- vendor/github.com/coreos/etcd/raft/progress.go 1 addition, 6 deletionsvendor/github.com/coreos/etcd/raft/progress.go
- vendor/github.com/coreos/etcd/raft/raft.go 63 additions, 212 deletionsvendor/github.com/coreos/etcd/raft/raft.go
- vendor/github.com/coreos/etcd/raft/raftpb/raft.pb.go 77 additions, 139 deletionsvendor/github.com/coreos/etcd/raft/raftpb/raft.pb.go
- vendor/github.com/coreos/etcd/raft/raftpb/raft.proto 4 additions, 6 deletionsvendor/github.com/coreos/etcd/raft/raftpb/raft.proto
- vendor/github.com/coreos/etcd/raft/rawnode.go 1 addition, 3 deletionsvendor/github.com/coreos/etcd/raft/rawnode.go
- vendor/github.com/coreos/etcd/raft/read_only.go 1 addition, 1 deletionvendor/github.com/coreos/etcd/raft/read_only.go
- vendor/github.com/coreos/etcd/raft/status.go 5 additions, 17 deletionsvendor/github.com/coreos/etcd/raft/status.go
- vendor/vendor.json 14 additions, 14 deletionsvendor/vendor.json
- worker/draft.go 8 additions, 122 deletionsworker/draft.go
- worker/groups.go 1 addition, 1 deletionworker/groups.go
Loading
Please register or sign in to comment