Просмотр исходного кода

Merge pull request #1789 from yichengq/234

rafthttp: only batch good MsgAppResp
Yicheng Qin 11 лет назад
Родитель
Сommit
006da2f8a0
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      rafthttp/batcher.go

+ 1 - 1
rafthttp/batcher.go

@@ -37,5 +37,5 @@ func (b *Batcher) Reset(t time.Time) {
 }
 
 func canBatch(m raftpb.Message) bool {
-	return m.Type == raftpb.MsgAppResp
+	return m.Type == raftpb.MsgAppResp && m.Reject == false
 }