소스 검색

store: use a larger buffer for eventChan

The event channel for watches can drop events too easily in the case of
streaming watches. This increases the buffer to a more useful level.
Jonathan Boulle 11 년 전
부모
커밋
26160b2154
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      store/watcher_hub.go

+ 1 - 1
store/watcher_hub.go

@@ -47,7 +47,7 @@ func (wh *watcherHub) watch(key string, recursive, stream bool, index, storeInde
 	}
 
 	w := &watcher{
-		eventChan:  make(chan *Event, 1), // use a buffered channel
+		eventChan:  make(chan *Event, 100), // use a buffered channel
 		recursive:  recursive,
 		stream:     stream,
 		sinceIndex: index,