From 1db7589081f7428c4f6df29810486b57befddf61 Mon Sep 17 00:00:00 2001 From: beorn7 Date: Fri, 27 Feb 2015 00:53:52 +0100 Subject: [PATCH] Reduce the capacity of countPersistedHeadChunks. The capacity is basically how many persisted head chunks we will count at most while doing other things, in particular checkpointing. To limit the amount of already counted head chunks, keep this number low, otherwise we will easily checkpoint too often if checkpoints take long anyway. --- storage/local/storage.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storage/local/storage.go b/storage/local/storage.go index 1ff49bb12..a18f92aca 100644 --- a/storage/local/storage.go +++ b/storage/local/storage.go @@ -154,7 +154,7 @@ func NewMemorySeriesStorage(o *MemorySeriesStorageOptions) (Storage, error) { persistStopped: make(chan struct{}), persistence: p, - countPersistedHeadChunks: make(chan struct{}, 1024), + countPersistedHeadChunks: make(chan struct{}, 100), evictList: list.New(), evictRequests: make(chan evictRequest, evictRequestsCap),