Skip to content
This repository was archived by the owner on Aug 23, 2023. It is now read-only.

enable index write queue by default #1891

Merged
merged 2 commits into from
Sep 1, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docker/docker-chaos/metrictank.ini
Original file line number Diff line number Diff line change
Expand Up @@ -495,9 +495,9 @@ find-cache-invalidate-max-wait = 5s
# amount of time to disable the findCache when the invalidate queue fills up.
find-cache-backoff-time = 60s
# enable buffering new metricDefinitions and writing them to the index in batches
write-queue-enabled = false
write-queue-enabled = true
# maximum delay between flushing buffered metric writes to the index
write-queue-delay = 30s
write-queue-delay = 1s
# maximum number of metricDefinitions that can be added to the index in a single batch (approx)
write-max-batch-size = 5000

Expand Down
4 changes: 2 additions & 2 deletions docker/docker-cluster-query/metrictank.ini
Original file line number Diff line number Diff line change
Expand Up @@ -495,9 +495,9 @@ find-cache-invalidate-max-wait = 5s
# amount of time to disable the findCache when the invalidate queue fills up.
find-cache-backoff-time = 60s
# enable buffering new metricDefinitions and writing them to the index in batches
write-queue-enabled = false
write-queue-enabled = true
# maximum delay between flushing buffered metric writes to the index
write-queue-delay = 30s
write-queue-delay = 1s
# maximum number of metricDefinitions that can be added to the index in a single batch (approx)
write-max-batch-size = 5000

Expand Down
4 changes: 2 additions & 2 deletions docker/docker-cluster/metrictank.ini
Original file line number Diff line number Diff line change
Expand Up @@ -495,9 +495,9 @@ find-cache-invalidate-max-wait = 5s
# amount of time to disable the findCache when the invalidate queue fills up.
find-cache-backoff-time = 60s
# enable buffering new metricDefinitions and writing them to the index in batches
write-queue-enabled = false
write-queue-enabled = true
# maximum delay between flushing buffered metric writes to the index
write-queue-delay = 30s
write-queue-delay = 1s
# maximum number of metricDefinitions that can be added to the index in a single batch (approx)
write-max-batch-size = 5000

Expand Down
4 changes: 2 additions & 2 deletions docker/docker-dev-custom-cfg-kafka/metrictank.ini
Original file line number Diff line number Diff line change
Expand Up @@ -495,9 +495,9 @@ find-cache-invalidate-max-wait = 5s
# amount of time to disable the findCache when the invalidate queue fills up.
find-cache-backoff-time = 60s
# enable buffering new metricDefinitions and writing them to the index in batches
write-queue-enabled = false
write-queue-enabled = true
# maximum delay between flushing buffered metric writes to the index
write-queue-delay = 30s
write-queue-delay = 1s
# maximum number of metricDefinitions that can be added to the index in a single batch (approx)
write-max-batch-size = 5000

Expand Down
4 changes: 2 additions & 2 deletions docs/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -566,9 +566,9 @@ find-cache-invalidate-max-wait = 5s
# amount of time to disable the findCache when the invalidate queue fills up.
find-cache-backoff-time = 60s
# enable buffering new metricDefinitions and writing them to the index in batches
write-queue-enabled = false
write-queue-enabled = true
# maximum delay between flushing buffered metric writes to the index
write-queue-delay = 30s
write-queue-delay = 1s
# maximum number of metricDefinitions that can be added to the index in a single batch (approx)
write-max-batch-size = 5000
```
Expand Down
4 changes: 2 additions & 2 deletions idx/memory/memory.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ func ConfigSetup() *flag.FlagSet {
memoryIdx.IntVar(&findCacheSize, "find-cache-size", 1000, "number of find expressions to cache (per org). 0 disables cache")
memoryIdx.IntVar(&findCacheInvalidateQueueSize, "find-cache-invalidate-queue-size", 200, "size of queue for invalidating findCache entries")
memoryIdx.IntVar(&findCacheInvalidateMaxSize, "find-cache-invalidate-max-size", 100, "max amount of invalidations to queue up in one batch")
memoryIdx.BoolVar(&writeQueueEnabled, "write-queue-enabled", false, "enable buffering new metricDefinitions and writing them to the index in batches")
memoryIdx.DurationVar(&writeQueueDelay, "write-queue-delay", 30*time.Second, "maximum delay between flushing buffered metric writes to the index")
memoryIdx.BoolVar(&writeQueueEnabled, "write-queue-enabled", true, "enable buffering new metricDefinitions and writing them to the index in batches")
memoryIdx.DurationVar(&writeQueueDelay, "write-queue-delay", time.Second, "maximum delay between flushing buffered metric writes to the index")
memoryIdx.IntVar(&writeMaxBatchSize, "write-max-batch-size", 5000, "maximum number of metricDefinitions that can be added to the index in a single batch (approx)")
memoryIdx.DurationVar(&findCacheInvalidateMaxWait, "find-cache-invalidate-max-wait", 5*time.Second, "max duration to wait building up a batch to invalidate")
memoryIdx.DurationVar(&findCacheBackoffTime, "find-cache-backoff-time", time.Minute, "amount of time to disable the findCache when the invalidate queue fills up.")
Expand Down
4 changes: 2 additions & 2 deletions metrictank-sample.ini
Original file line number Diff line number Diff line change
Expand Up @@ -498,9 +498,9 @@ find-cache-invalidate-max-wait = 5s
# amount of time to disable the findCache when the invalidate queue fills up.
find-cache-backoff-time = 60s
# enable buffering new metricDefinitions and writing them to the index in batches
write-queue-enabled = false
write-queue-enabled = true
# maximum delay between flushing buffered metric writes to the index
write-queue-delay = 30s
write-queue-delay = 1s
# maximum number of metricDefinitions that can be added to the index in a single batch (approx)
write-max-batch-size = 5000

Expand Down
4 changes: 2 additions & 2 deletions scripts/config/metrictank-docker-dev.ini
Original file line number Diff line number Diff line change
Expand Up @@ -495,9 +495,9 @@ find-cache-invalidate-max-wait = 5s
# amount of time to disable the findCache when the invalidate queue fills up.
find-cache-backoff-time = 60s
# enable buffering new metricDefinitions and writing them to the index in batches
write-queue-enabled = false
write-queue-enabled = true
# maximum delay between flushing buffered metric writes to the index
write-queue-delay = 30s
write-queue-delay = 1s
# maximum number of metricDefinitions that can be added to the index in a single batch (approx)
write-max-batch-size = 5000

Expand Down
4 changes: 2 additions & 2 deletions scripts/config/metrictank-docker.ini
Original file line number Diff line number Diff line change
Expand Up @@ -495,9 +495,9 @@ find-cache-invalidate-max-wait = 5s
# amount of time to disable the findCache when the invalidate queue fills up.
find-cache-backoff-time = 60s
# enable buffering new metricDefinitions and writing them to the index in batches
write-queue-enabled = false
write-queue-enabled = true
# maximum delay between flushing buffered metric writes to the index
write-queue-delay = 30s
write-queue-delay = 1s
# maximum number of metricDefinitions that can be added to the index in a single batch (approx)
write-max-batch-size = 5000

Expand Down
4 changes: 2 additions & 2 deletions scripts/config/metrictank-package.ini
Original file line number Diff line number Diff line change
Expand Up @@ -495,9 +495,9 @@ find-cache-invalidate-max-wait = 5s
# amount of time to disable the findCache when the invalidate queue fills up.
find-cache-backoff-time = 60s
# enable buffering new metricDefinitions and writing them to the index in batches
write-queue-enabled = false
write-queue-enabled = true
# maximum delay between flushing buffered metric writes to the index
write-queue-delay = 30s
write-queue-delay = 1s
# maximum number of metricDefinitions that can be added to the index in a single batch (approx)
write-max-batch-size = 5000

Expand Down