Skip to content

Commit

Permalink
[FAB-11918] Add raft index to block metadata
Browse files Browse the repository at this point in the history
This CR adds index of etcd/raft entry to be block metadata so
that we know where to continue rafting upon reboot.

Change-Id: If6388b7612741fbc4fa31c95881937bd8d2a82cc
Signed-off-by: Jay Guo <guojiannan1101@gmail.com>
  • Loading branch information
guoger committed Oct 29, 2018
1 parent 5a27280 commit abcc8db
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 48 deletions.
108 changes: 61 additions & 47 deletions protos/orderer/etcdraft/configuration.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion protos/orderer/etcdraft/configuration.proto
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,14 @@ message Options {

// RaftMetadata stores data used by the Raft OSNs when
// coordinating with each other, to be serialized into
// block meta dta field and used after failres and restarts
// block meta dta field and used after failres and restarts.
message RaftMetadata {
// Maintains a mapping between the cluster's OSNs
// and their Raft IDs.
map<uint64, Consenter> consenters = 1;
// Carries the Raft ID value that will be assigned
// to the next OSN that will join this cluster.
uint64 nextConsenterID = 2;
// Index of etcd/raft entry for current block.
uint64 raftIndex = 3;
}

0 comments on commit abcc8db

Please sign in to comment.