Commit 2a4e15e9 authored by Jay Guo's avatar Jay Guo
Browse files

FAB-14593 Refine etcdraft parameters



- MaxInflightMsgs is internal to etcd/raft and should be exposed
to users with a more appropriate name: MaxInflightBlocks

- MaxSizePerMsg is also internal to etcd/raft, and it's defaulted
to PreferredMaxBytes in BatchSize, so that if a big block is created,
it is sent in a its own etcd/raft message, instead of being batched
with other blocks. This parameter takes effect when a batch of entries
is sent to lagged node. During normal replication, each block is
sent in its own message.
  It's not necessary to expose this config option to users.

- SnapInterval is renamed to SnapshotIntervalSize

FAB-14593 #done

Change-Id: Icaf2848a41c5f0f0a02f4b0b4a80ba852fddd584
Signed-off-by: default avatarJay Guo <guojiannan1101@gmail.com>
parent 9a124d65
......@@ -194,12 +194,11 @@ var genesisDefaults = TopLevel{
},
EtcdRaft: &etcdraft.ConfigMetadata{
Options: &etcdraft.Options{
TickInterval: "500ms",
ElectionTick: 10,
HeartbeatTick: 1,
MaxInflightMsgs: 5,
MaxSizePerMsg: 1048576,
SnapshotInterval: 100 * 1024 * 1024, // 100MB
TickInterval: "500ms",
ElectionTick: 10,
HeartbeatTick: 1,
MaxInflightBlocks: 5,
SnapshotIntervalSize: 20 * 1024 * 1024, // 20 MB
},
},
},
......@@ -416,17 +415,13 @@ loop:
logger.Infof("Orderer.EtcdRaft.Options.HeartbeatTick unset, setting to %v", genesisDefaults.Orderer.EtcdRaft.Options.HeartbeatTick)
ord.EtcdRaft.Options.HeartbeatTick = genesisDefaults.Orderer.EtcdRaft.Options.HeartbeatTick
case ord.EtcdRaft.Options.MaxInflightMsgs == 0:
logger.Infof("Orderer.EtcdRaft.Options.MaxInflightMsgs unset, setting to %v", genesisDefaults.Orderer.EtcdRaft.Options.MaxInflightMsgs)
ord.EtcdRaft.Options.MaxInflightMsgs = genesisDefaults.Orderer.EtcdRaft.Options.MaxInflightMsgs
case ord.EtcdRaft.Options.MaxInflightBlocks == 0:
logger.Infof("Orderer.EtcdRaft.Options.MaxInflightBlocks unset, setting to %v", genesisDefaults.Orderer.EtcdRaft.Options.MaxInflightBlocks)
ord.EtcdRaft.Options.MaxInflightBlocks = genesisDefaults.Orderer.EtcdRaft.Options.MaxInflightBlocks
case ord.EtcdRaft.Options.MaxSizePerMsg == 0:
logger.Infof("Orderer.EtcdRaft.Options.MaxSizePerMsg unset, setting to %v", genesisDefaults.Orderer.EtcdRaft.Options.MaxSizePerMsg)
ord.EtcdRaft.Options.MaxSizePerMsg = genesisDefaults.Orderer.EtcdRaft.Options.MaxSizePerMsg
case ord.EtcdRaft.Options.SnapshotInterval == 0:
logger.Infof("Orderer.EtcdRaft.Options.SnapshotInterval unset, setting to %v", genesisDefaults.Orderer.EtcdRaft.Options.SnapshotInterval)
ord.EtcdRaft.Options.SnapshotInterval = genesisDefaults.Orderer.EtcdRaft.Options.SnapshotInterval
case ord.EtcdRaft.Options.SnapshotIntervalSize == 0:
logger.Infof("Orderer.EtcdRaft.Options.SnapshotIntervalSize unset, setting to %v", genesisDefaults.Orderer.EtcdRaft.Options.SnapshotIntervalSize)
ord.EtcdRaft.Options.SnapshotIntervalSize = genesisDefaults.Orderer.EtcdRaft.Options.SnapshotIntervalSize
case len(ord.EtcdRaft.Consenters) == 0:
logger.Panicf("%s configuration did not specify any consenter", etcdraft.TypeKey)
......
......@@ -294,9 +294,8 @@ var _ = Describe("EndToEnd", func() {
Expect(err).NotTo(HaveOccurred())
// update max in flight messages
metadata.Options.MaxInflightMsgs = 1000
metadata.Options.MaxSizePerMsg = 512
metadata.Options.SnapshotInterval = 100 * 1024 * 1024 // 100 MB
metadata.Options.MaxInflightBlocks = 1000
metadata.Options.SnapshotIntervalSize = 10 * 1024 * 1024 // 10 MB
// write metadata back
newMetadata, err := proto.Marshal(metadata)
......@@ -304,7 +303,7 @@ var _ = Describe("EndToEnd", func() {
return newMetadata
})
// assert that no new snapshot is taken because SnapshotInterval has just enlarged
// assert that no new snapshot is taken because SnapshotIntervalSize has just enlarged
files, err = ioutil.ReadDir(snapDir)
Expect(err).NotTo(HaveOccurred())
Expect(len(files)).To(Equal(numOfSnaps))
......
......@@ -865,7 +865,7 @@ var _ = Describe("EndToEnd reconfiguration and onboarding", func() {
err := proto.Unmarshal(originalMetadata, metadata)
Expect(err).NotTo(HaveOccurred())
metadata.Options.SnapshotInterval = 2 * 1024 // 100 MB
metadata.Options.SnapshotIntervalSize = 2 * 1024 // 2 KB
// write metadata back
newMetadata, err := proto.Marshal(metadata)
......
......@@ -268,12 +268,11 @@ var _ bool = Describe("Kafka2RaftMigration", func() {
},
},
Options: &protosraft.Options{
TickInterval: "500ms",
ElectionTick: 10,
HeartbeatTick: 1,
MaxInflightMsgs: 256,
MaxSizePerMsg: 1048576,
SnapshotInterval: 8388608,
TickInterval: "500ms",
ElectionTick: 10,
HeartbeatTick: 1,
MaxInflightBlocks: 5,
SnapshotIntervalSize: 20 * 1024 * 1024,
}}
raft_metadata_bytes := utils.MarshalOrPanic(raft_metadata)
......
......@@ -89,7 +89,7 @@ Profiles:{{ range .Profiles }}
EtcdRaft:
Options:
TickInterval: 500ms
SnapshotInterval: 1 KB
SnapshotIntervalSize: 1 KB
Consenters:{{ range .Orderers }}{{ with $w.Orderer . }}
- Host: 127.0.0.1
Port: {{ $w.OrdererPort . "Listen" }}
......
......@@ -93,8 +93,7 @@ Orderer: &OrdererDefaults
TickInterval: 500
ElectionTick: 10
HeartbeatTick: 1
MaxInflightMsgs: 256
MaxSizePerMsg: 1048576
MaxInflightBlocks: 5
Organizations:
Policies:
Readers:
......
......@@ -45,10 +45,10 @@ const (
// slow followers to catch up.
DefaultSnapshotCatchUpEntries = uint64(20)
// DefaultSnapshotInterval is the default snapshot interval. It is
// used if SnapshotInterval is not provided in channel config options.
// DefaultSnapshotIntervalSize is the default snapshot interval. It is
// used if SnapshotIntervalSize is not provided in channel config options.
// It is needed to enforce snapshot being set.
DefaultSnapshotInterval = 100 * MEGABYTE // 100MB
DefaultSnapshotIntervalSize = 20 * MEGABYTE // 20 MB
// DefaultEvictionSuspicion is the threshold that a node will start
// suspecting its own eviction if it has been leaderless for this
......@@ -95,9 +95,9 @@ type Options struct {
Clock clock.Clock
WALDir string
SnapDir string
SnapInterval uint32
WALDir string
SnapDir string
SnapshotIntervalSize uint32
// This is configurable mainly for testing purpose. Users are not
// expected to alter this. Instead, DefaultSnapshotCatchUpEntries is used.
......@@ -106,11 +106,11 @@ type Options struct {
MemoryStorage MemoryStorage
Logger *flogging.FabricLogger
TickInterval time.Duration
ElectionTick int
HeartbeatTick int
MaxSizePerMsg uint64
MaxInflightMsgs int
TickInterval time.Duration
ElectionTick int
HeartbeatTick int
MaxSizePerMsg uint64
MaxInflightBlocks int
// BlockMetdata and Consenters should only be modified while under lock
// of raftMetadataLock
......@@ -172,7 +172,7 @@ type Chain struct {
appliedIndex uint64
// needed by snapshotting
sizeLimit uint32 // SnapshotInterval in bytes
sizeLimit uint32 // SnapshotIntervalSize in bytes
accDataSize uint32 // accumulative data size since last snapshot
lastSnapBlockNum uint64
confState raftpb.ConfState // Etcdraft requires ConfState to be persisted within snapshot
......@@ -216,9 +216,9 @@ func NewChain(
storage.SnapshotCatchUpEntries = opts.SnapshotCatchUpEntries
}
sizeLimit := opts.SnapInterval
sizeLimit := opts.SnapshotIntervalSize
if sizeLimit == 0 {
sizeLimit = DefaultSnapshotInterval
sizeLimit = DefaultSnapshotIntervalSize
}
// get block number in last snapshot, if exists
......@@ -281,7 +281,7 @@ func NewChain(
ElectionTick: c.opts.ElectionTick,
HeartbeatTick: c.opts.HeartbeatTick,
MaxSizePerMsg: c.opts.MaxSizePerMsg,
MaxInflightMsgs: c.opts.MaxInflightMsgs,
MaxInflightMsgs: c.opts.MaxInflightBlocks,
Logger: c.logger,
Storage: c.opts.MemoryStorage,
// PreVote prevents reconnected node from disturbing network.
......@@ -600,7 +600,7 @@ func (c *Chain) serveRequest() {
c.blockInflight = 0
c.justElected = true
submitC = nil
ch := make(chan *common.Block, c.opts.MaxInflightMsgs)
ch := make(chan *common.Block, c.opts.MaxInflightBlocks)
// if there is unfinished ConfChange, we should resume the effort to propose it as
// new leader, and wait for it to be committed before start serving new requests.
......@@ -685,9 +685,9 @@ func (c *Chain) serveRequest() {
if c.configInflight {
c.logger.Info("Received config block, pause accepting transaction till it is committed")
submitC = nil
} else if c.blockInflight >= c.opts.MaxInflightMsgs {
} else if c.blockInflight >= c.opts.MaxInflightBlocks {
c.logger.Debugf("Number of in-flight blocks (%d) reaches limit (%d), pause accepting transaction",
c.blockInflight, c.opts.MaxInflightMsgs)
c.blockInflight, c.opts.MaxInflightBlocks)
submitC = nil
}
......@@ -768,7 +768,7 @@ func (c *Chain) serveRequest() {
} else if c.configInflight {
c.logger.Info("Config block or ConfChange in flight, pause accepting transaction")
submitC = nil
} else if c.blockInflight < c.opts.MaxInflightMsgs {
} else if c.blockInflight < c.opts.MaxInflightBlocks {
submitC = c.submitC
}
......@@ -977,10 +977,12 @@ func (c *Chain) detectConfChange(block *common.Block) *MembershipChanges {
return nil
}
if configMetadata.Options != nil && configMetadata.Options.SnapshotInterval != 0 {
old := c.sizeLimit
c.sizeLimit = configMetadata.Options.SnapshotInterval
c.logger.Infof("Snapshot interval is updated to %d bytes (was %d)", c.sizeLimit, old)
if configMetadata.Options != nil &&
configMetadata.Options.SnapshotIntervalSize != 0 &&
configMetadata.Options.SnapshotIntervalSize != c.sizeLimit {
c.logger.Infof("Update snapshot interval size to %d bytes (was %d)",
configMetadata.Options.SnapshotIntervalSize, c.sizeLimit)
c.sizeLimit = configMetadata.Options.SnapshotIntervalSize
}
changes, err := ComputeMembershipChanges(c.opts.BlockMetadata, c.opts.Consenters, configMetadata.Consenters)
......@@ -1090,7 +1092,7 @@ func (c *Chain) apply(ents []raftpb.Entry) {
c.lastSnapBlockNum = appliedb
c.Metrics.SnapshotBlockNumber.Set(float64(appliedb))
default:
c.logger.Warnf("Snapshotting is in progress, it is very likely that SnapshotInterval is too small")
c.logger.Warnf("Snapshotting is in progress, it is very likely that SnapshotIntervalSize is too small")
}
}
......
......@@ -152,20 +152,20 @@ var _ = Describe("Chain", func() {
fakeFields = newFakeMetricsFields()
opts = etcdraft.Options{
RaftID: 1,
Clock: clock,
TickInterval: interval,
ElectionTick: ELECTION_TICK,
HeartbeatTick: HEARTBEAT_TICK,
MaxSizePerMsg: 1024 * 1024,
MaxInflightMsgs: 256,
BlockMetadata: meta,
Consenters: consenters,
Logger: logger,
MemoryStorage: storage,
WALDir: walDir,
SnapDir: snapDir,
Metrics: newFakeMetrics(fakeFields),
RaftID: 1,
Clock: clock,
TickInterval: interval,
ElectionTick: ELECTION_TICK,
HeartbeatTick: HEARTBEAT_TICK,
MaxSizePerMsg: 1024 * 1024,
MaxInflightBlocks: 256,
BlockMetadata: meta,
Consenters: consenters,
Logger: logger,
MemoryStorage: storage,
WALDir: walDir,
SnapDir: snapDir,
Metrics: newFakeMetrics(fakeFields),
}
})
......@@ -895,7 +895,7 @@ var _ = Describe("Chain", func() {
Context("Small SnapshotInterval", func() {
BeforeEach(func() {
opts.SnapInterval = 1
opts.SnapshotIntervalSize = 1
})
It("writes snapshot file to snapDir", func() {
......@@ -1012,7 +1012,7 @@ var _ = Describe("Chain", func() {
raftMetadata.RaftIndex = m.RaftIndex
c := newChain(10*time.Second, channelID, dataDir, 1, raftMetadata, consenters)
c.opts.SnapInterval = 1
c.opts.SnapshotIntervalSize = 1
c.init()
c.Start()
......@@ -1056,7 +1056,7 @@ var _ = Describe("Chain", func() {
Context("Large SnapshotInterval", func() {
BeforeEach(func() {
opts.SnapInterval = 1024
opts.SnapshotIntervalSize = 1024
})
It("restores snapshot w/ extra entries", func() {
......@@ -1167,7 +1167,7 @@ var _ = Describe("Chain", func() {
c.support.WriteBlock(support.WriteBlockArgsForCall(0))
c.support.WriteBlock(support.WriteBlockArgsForCall(1))
c.opts.SnapInterval = 1024
c.opts.SnapshotIntervalSize = 1024
By("Restarting node at block 2")
c.init()
......@@ -1368,7 +1368,7 @@ var _ = Describe("Chain", func() {
})
It("late node receives snapshot from leader", func() {
c1.opts.SnapInterval = 1
c1.opts.SnapshotIntervalSize = 1
c1.opts.SnapshotCatchUpEntries = 1
c1.cutter.CutNext = true
......@@ -2188,9 +2188,9 @@ var _ = Describe("Chain", func() {
})
})
When("MaxInflightMsgs is reached", func() {
When("MaxInflightBlocks is reached", func() {
BeforeEach(func() {
network.exec(func(c *chain) { c.opts.MaxInflightMsgs = 1 })
network.exec(func(c *chain) { c.opts.MaxInflightBlocks = 1 })
})
It("waits for in flight blocks to be committed", func() {
......@@ -2579,7 +2579,7 @@ var _ = Describe("Chain", func() {
When("Snapshotting is enabled", func() {
BeforeEach(func() {
c1.opts.SnapInterval = 1
c1.opts.SnapshotIntervalSize = 1
c1.opts.SnapshotCatchUpEntries = 1
})
......@@ -2965,20 +2965,20 @@ func newChain(timeout time.Duration, channel string, dataDir string, id uint64,
fakeFields := newFakeMetricsFields()
opts := etcdraft.Options{
RaftID: uint64(id),
Clock: clock,
TickInterval: interval,
ElectionTick: ELECTION_TICK,
HeartbeatTick: HEARTBEAT_TICK,
MaxSizePerMsg: 1024 * 1024,
MaxInflightMsgs: 256,
BlockMetadata: raftMetadata,
Consenters: consenters,
Logger: flogging.NewFabricLogger(zap.NewExample()),
MemoryStorage: storage,
WALDir: path.Join(dataDir, "wal"),
SnapDir: path.Join(dataDir, "snapshot"),
Metrics: newFakeMetrics(fakeFields),
RaftID: uint64(id),
Clock: clock,
TickInterval: interval,
ElectionTick: ELECTION_TICK,
HeartbeatTick: HEARTBEAT_TICK,
MaxSizePerMsg: 1024 * 1024,
MaxInflightBlocks: 256,
BlockMetadata: raftMetadata,
Consenters: consenters,
Logger: flogging.NewFabricLogger(zap.NewExample()),
MemoryStorage: storage,
WALDir: path.Join(dataDir, "wal"),
SnapDir: path.Join(dataDir, "snapshot"),
Metrics: newFakeMetrics(fakeFields),
}
support := &consensusmocks.FakeConsenterSupport{}
......
......@@ -191,12 +191,12 @@ func (c *Consenter) HandleChain(support consensus.ConsenterSupport, metadata *co
MemoryStorage: raft.NewMemoryStorage(),
Logger: c.Logger,
TickInterval: tickInterval,
ElectionTick: int(m.Options.ElectionTick),
HeartbeatTick: int(m.Options.HeartbeatTick),
MaxInflightMsgs: int(m.Options.MaxInflightMsgs),
MaxSizePerMsg: m.Options.MaxSizePerMsg,
SnapInterval: m.Options.SnapshotInterval,
TickInterval: tickInterval,
ElectionTick: int(m.Options.ElectionTick),
HeartbeatTick: int(m.Options.HeartbeatTick),
MaxInflightBlocks: int(m.Options.MaxInflightBlocks),
MaxSizePerMsg: uint64(support.SharedConfig().BatchSize().PreferredMaxBytes),
SnapshotIntervalSize: m.Options.SnapshotIntervalSize,
BlockMetadata: blockMetadata,
Consenters: consenters,
......
......@@ -147,11 +147,10 @@ var _ = Describe("Consenter", func() {
{ServerTlsCert: certBytes},
},
Options: &etcdraftproto.Options{
TickInterval: "500ms",
ElectionTick: 10,
HeartbeatTick: 1,
MaxInflightMsgs: 256,
MaxSizePerMsg: 1048576,
TickInterval: "500ms",
ElectionTick: 10,
HeartbeatTick: 1,
MaxInflightBlocks: 5,
},
}
metadata := utils.MarshalOrPanic(m)
......@@ -160,6 +159,7 @@ var _ = Describe("Consenter", func() {
CapabilitiesVal: &mockconfig.OrdererCapabilities{
Kafka2RaftMigVal: false,
},
BatchSizeVal: &orderer.BatchSize{PreferredMaxBytes: 2 * 1024 * 1024},
})
consenter := newConsenter(chainGetter)
......@@ -189,11 +189,10 @@ var _ = Describe("Consenter", func() {
{ServerTlsCert: []byte("cert.orderer1.org1")},
},
Options: &etcdraftproto.Options{
TickInterval: "500ms",
ElectionTick: 10,
HeartbeatTick: 1,
MaxInflightMsgs: 256,
MaxSizePerMsg: 1048576,
TickInterval: "500ms",
ElectionTick: 10,
HeartbeatTick: 1,
MaxInflightBlocks: 5,
},
}
metadata := utils.MarshalOrPanic(m)
......@@ -203,6 +202,7 @@ var _ = Describe("Consenter", func() {
CapabilitiesVal: &mockconfig.OrdererCapabilities{
Kafka2RaftMigVal: false,
},
BatchSizeVal: &orderer.BatchSize{PreferredMaxBytes: 2 * 1024 * 1024},
})
support.ChainIDReturns("foo")
......@@ -227,6 +227,7 @@ var _ = Describe("Consenter", func() {
CapabilitiesVal: &mockconfig.OrdererCapabilities{
Kafka2RaftMigVal: false,
},
BatchSizeVal: &orderer.BatchSize{PreferredMaxBytes: 2 * 1024 * 1024},
})
consenter := newConsenter(chainGetter)
......@@ -243,11 +244,10 @@ var _ = Describe("Consenter", func() {
{ServerTlsCert: certBytes},
},
Options: &etcdraftproto.Options{
TickInterval: "500",
ElectionTick: 10,
HeartbeatTick: 1,
MaxInflightMsgs: 256,
MaxSizePerMsg: 1048576,
TickInterval: "500",
ElectionTick: 10,
HeartbeatTick: 1,
MaxInflightBlocks: 5,
},
}
metadata := utils.MarshalOrPanic(m)
......@@ -256,6 +256,7 @@ var _ = Describe("Consenter", func() {
CapabilitiesVal: &mockconfig.OrdererCapabilities{
Kafka2RaftMigVal: false,
},
BatchSizeVal: &orderer.BatchSize{PreferredMaxBytes: 2 * 1024 * 1024},
})
consenter := newConsenter(chainGetter)
......
......@@ -32,7 +32,7 @@ func (m *ConfigMetadata) Reset() { *m = ConfigMetadata{} }
func (m *ConfigMetadata) String() string { return proto.CompactTextString(m) }
func (*ConfigMetadata) ProtoMessage() {}
func (*ConfigMetadata) Descriptor() ([]byte, []int) {
return fileDescriptor_configuration_284e7293f7b0bae7, []int{0}
return fileDescriptor_configuration_780531726dd41db7, []int{0}
}
func (m *ConfigMetadata) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ConfigMetadata.Unmarshal(m, b)
......@@ -81,7 +81,7 @@ func (m *Consenter) Reset() { *m = Consenter{} }
func (m *Consenter) String() string { return proto.CompactTextString(m) }
func (*Consenter) ProtoMessage() {}
func (*Consenter) Descriptor() ([]byte, []int) {
return fileDescriptor_configuration_284e7293f7b0bae7, []int{1}
return fileDescriptor_configuration_780531726dd41db7, []int{1}
}
func (m *Consenter) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Consenter.Unmarshal(m, b)
......@@ -132,13 +132,12 @@ func (m *Consenter) GetServerTlsCert() []byte {
// Options to be specified for all the etcd/raft nodes. These can be modified on a
// per-channel basis.
type Options struct {
TickInterval string `protobuf:"bytes,1,opt,name=tick_interval,json=tickInterval,proto3" json:"tick_interval,omitempty"`
ElectionTick uint32 `protobuf:"varint,2,opt,name=election_tick,json=electionTick,proto3" json:"election_tick,omitempty"`
HeartbeatTick uint32 `protobuf:"varint,3,opt,name=heartbeat_tick,json=heartbeatTick,proto3" json:"heartbeat_tick,omitempty"`
MaxInflightMsgs uint32 `protobuf:"varint,4,opt,name=max_inflight_msgs,json=maxInflightMsgs,proto3" json:"max_inflight_msgs,omitempty"`
MaxSizePerMsg uint64 `protobuf:"varint,5,opt,name=max_size_per_msg,json=maxSizePerMsg,proto3" json:"max_size_per_msg,omitempty"`
TickInterval string `protobuf:"bytes,1,opt,name=tick_interval,json=tickInterval,proto3" json:"tick_interval,omitempty"`
ElectionTick uint32 `protobuf:"varint,2,opt,name=election_tick,json=electionTick,proto3" json:"election_tick,omitempty"`
HeartbeatTick uint32 `protobuf:"varint,3,opt,name=heartbeat_tick,json=heartbeatTick,proto3" json:"heartbeat_tick,omitempty"`
MaxInflightBlocks uint32 `protobuf:"varint,4,opt,name=max_inflight_blocks,json=maxInflightBlocks,proto3" json:"max_inflight_blocks,omitempty"`
// Take snapshot when cumulative data exceeds certain size in bytes.
SnapshotInterval uint32 `protobuf:"varint,6,opt,name=snapshot_interval,json=snapshotInterval,proto3" json:"snapshot_interval,omitempty"`
SnapshotIntervalSize uint32 `protobuf:"varint,5,opt,name=snapshot_interval_size,json=snapshotIntervalSize,proto3" json:"snapshot_interval_size,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
......@@ -148,7 +147,7 @@ func (m *Options) Reset() { *m = Options{} }
func (m *Options) String() string { return proto.CompactTextString(m) }
func (*Options) ProtoMessage() {}
func (*Options) Descriptor() ([]byte, []int) {
return fileDescriptor_configuration_284e7293f7b0bae7, []int{2}
return fileDescriptor_configuration_780531726dd41db7, []int{2}
}
func (m *Options) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Options.Unmarshal(m, b)
......@@ -189,23 +188,16 @@ func (m *Options) GetHeartbeatTick() uint32 {
return 0
}
func (m *Options) GetMaxInflightMsgs() uint32 {
func (m *Options) GetMaxInflightBlocks() uint32 {
if m != nil {
return m.MaxInflightMsgs
return m.MaxInflightBlocks
}
return 0
}
func (m *Options) GetMaxSizePerMsg() uint64 {
func (m *Options) GetSnapshotIntervalSize() uint32 {
if m != nil {
return m.MaxSizePerMsg
}
return 0
}
func (m *Options) GetSnapshotInterval() uint32 {
if m != nil {
return m.SnapshotInterval
return m.SnapshotIntervalSize
}
return 0
}
......@@ -231,7 +223,7 @@ func (m *BlockMetadata) Reset() { *m = BlockMetadata{} }
func (m *BlockMetadata) String() string { return proto.CompactTextString(m) }
func (*BlockMetadata) ProtoMessage() {}
func (*BlockMetadata) Descriptor() ([]byte, []int) {
return fileDescriptor_configuration_284e7293f7b0bae7, []int{3}
return fileDescriptor_configuration_780531726dd41db7, []int{3}
}
func (m *BlockMetadata) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_BlockMetadata.Unmarshal(m, b)
......@@ -280,39 +272,37 @@ func init() {
}
func init() {
proto.RegisterFile("orderer/etcdraft/configuration.proto", fileDescriptor_configuration_284e7293f7b0bae7)
}
var fileDescriptor_configuration_284e7293f7b0bae7 = []byte{
// 470 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x93, 0x3f, 0x6f, 0xdb, 0x3c,
0x18, 0xc4, 0xa1, 0xd7, 0x7a, 0x93, 0x9a, 0xb1, 0xe2, 0x98, 0x5d, 0xb4, 0x14, 0x10, 0x9c, 0xfe,
0x11, 0x1a, 0x40, 0x02, 0x12, 0xf4, 0x0b, 0xc4, 0x93,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