瀏覽代碼

raft: remove an obsolete TODO comment on 4MB maxMsgSize hard coding

The TODO comment was added by 7571b2cd, and it was addressed by d9b5b56c.
Kenji Kaneda 10 年之前
父節點
當前提交
f602767e50
共有 1 個文件被更改,包括 3 次插入6 次删除
  1. 3 6
      raft/raft.go

+ 3 - 6
raft/raft.go

@@ -185,12 +185,9 @@ func newRaft(c *Config) *raft {
 		peers = cs.Nodes
 		peers = cs.Nodes
 	}
 	}
 	r := &raft{
 	r := &raft{
-		id:      c.ID,
-		lead:    None,
-		raftLog: raftlog,
-		// 4MB for now and hard code it
-		// TODO(xiang): add a config argument into newRaft after we add
-		// the max inflight message field.
+		id:               c.ID,
+		lead:             None,
+		raftLog:          raftlog,
 		maxMsgSize:       c.MaxSizePerMsg,
 		maxMsgSize:       c.MaxSizePerMsg,
 		maxInflight:      c.MaxInflightMsgs,
 		maxInflight:      c.MaxInflightMsgs,
 		prs:              make(map[uint64]*Progress),
 		prs:              make(map[uint64]*Progress),