lease: grant consistent lease IDs

When raft broadcasts a Grant to all nodes, all nodes must
agree on the same lease ID. Otherwise, attaching a key to
a lease will fail since the lease ID is node-dependent.
This commit is contained in:
Anthony Romano
2016-01-19 21:09:09 -08:00
parent 6413c96024
commit 9113a27bde
8 changed files with 191 additions and 43 deletions

View File

@ -812,6 +812,7 @@ func (m *member) Launch() error {
m.grpcServer = grpc.NewServer()
etcdserverpb.RegisterKVServer(m.grpcServer, v3rpc.NewKVServer(m.s))
etcdserverpb.RegisterWatchServer(m.grpcServer, v3rpc.NewWatchServer(m.s))
etcdserverpb.RegisterLeaseServer(m.grpcServer, v3rpc.NewLeaseServer(m.s))
go m.grpcServer.Serve(m.grpcListener)
}
return nil