etcdserver: add a todo for clusterid generation

release-2.0
Xiang Li 2014-10-20 16:26:31 -07:00
parent ea6bcacfe4
commit dc68dc9ebd
1 changed files with 2 additions and 0 deletions

View File

@ -622,6 +622,8 @@ func (s *EtcdServer) snapshot(snapi uint64, snapnodes []uint64) {
func startNode(cfg *ServerConfig) (id, cid uint64, n raft.Node, w *wal.WAL) {
var err error
// TODO: remove the discoveryURL when it becomes part of the source for
// generating nodeID.
cfg.Cluster.GenID([]byte(cfg.DiscoveryURL))
metadata := pbutil.MustMarshal(&pb.Metadata{NodeID: cfg.ID(), ClusterID: cfg.Cluster.ID()})
if w, err = wal.Create(cfg.WALDir(), metadata); err != nil {