From a9f20c2253c200aad732479f0feb602f93f5d6e6 Mon Sep 17 00:00:00 2001 From: Richard Artoul Date: Sun, 30 Sep 2018 00:10:04 -0400 Subject: [PATCH 01/12] interim --- .../development/m3_stack/m3coordinator.yml | 8 +++- scripts/development/m3_stack/start_m3.sh | 42 +++++++++++++++++-- .../prometheus/test.sh | 10 +++++ src/query/api/v1/httpd/handler.go | 2 +- src/query/server/server.go | 3 +- 5 files changed, 58 insertions(+), 7 deletions(-) diff --git a/scripts/development/m3_stack/m3coordinator.yml b/scripts/development/m3_stack/m3coordinator.yml index f24643cdf3..20dea33269 100644 --- a/scripts/development/m3_stack/m3coordinator.yml +++ b/scripts/development/m3_stack/m3coordinator.yml @@ -14,9 +14,13 @@ metrics: clusters: - namespaces: - - namespace: prometheus_metrics + - namespace: agg + type: aggregated + retention: 10h + resolution: 15s + - namespace: unagg type: unaggregated - retention: 48h + retention: 10m client: config: service: diff --git a/scripts/development/m3_stack/start_m3.sh b/scripts/development/m3_stack/start_m3.sh index 32dd071049..3ef4087ffa 100755 --- a/scripts/development/m3_stack/start_m3.sh +++ b/scripts/development/m3_stack/start_m3.sh @@ -6,9 +6,43 @@ echo "Bringing up nodes in the backgorund with docker compose, remember to run . docker-compose -f docker-compose.yml up -d --renew-anon-volumes echo "Nodes online" +sleep 10 + +echo "Initializing namespace" +curl -vvvsSf -X POST 0.0.0.0:7201/api/v1/namespace -d '{ + "name": "agg", + "options": { + "bootstrapEnabled": true, + "flushEnabled": true, + "writesToCommitLog": true, + "cleanupEnabled": true, + "snapshotEnabled": true, + "repairEnabled": false, + "retentionOptions": { + "retentionPeriodNanos": 172800000000000, + "blockSizeNanos": 7200000000000, + "bufferFutureNanos": 600000000000, + "bufferPastNanos": 600000000000, + "blockDataExpiry": true, + "blockDataExpiryAfterNotAccessPeriodNanos": 300000000000 + }, + "indexOptions": { + "enabled": true, + "blockSizeNanos": 7200000000000 + } + } +}' +echo "Done initializing namespace" + +echo "Validating namespace" +[ "$(curl -sSf localhost:7201/api/v1/namespace | jq .registry.namespaces.agg.indexOptions.enabled)" == true ] +echo "Done validating namespace" + +sleep 10 + echo "Initializing namespace" -curl -vvvsSf -X POST localhost:7201/api/v1/namespace -d '{ - "name": "prometheus_metrics", +curl -vvvsSf -X POST 0.0.0.0:7201/api/v1/namespace -d '{ + "name": "unagg", "options": { "bootstrapEnabled": true, "flushEnabled": true, @@ -33,9 +67,11 @@ curl -vvvsSf -X POST localhost:7201/api/v1/namespace -d '{ echo "Done initializing namespace" echo "Validating namespace" -[ "$(curl -sSf localhost:7201/api/v1/namespace | jq .registry.namespaces.prometheus_metrics.indexOptions.enabled)" == true ] +[ "$(curl -sSf localhost:7201/api/v1/namespace | jq .registry.namespaces.unagg.indexOptions.enabled)" == true ] echo "Done validating namespace" +sleep 10 + echo "Initializing topology" curl -vvvsSf -X POST localhost:7201/api/v1/placement/init -d '{ "num_shards": 64, diff --git a/scripts/docker-integration-tests/prometheus/test.sh b/scripts/docker-integration-tests/prometheus/test.sh index fe13f761b7..12c6b654ff 100755 --- a/scripts/docker-integration-tests/prometheus/test.sh +++ b/scripts/docker-integration-tests/prometheus/test.sh @@ -104,4 +104,14 @@ echo "Wait until the remote write endpoint generates and allows for data to be q ATTEMPTS=6 TIMEOUT=2 retry_with_backoff \ '[[ $(curl -sSf 0.0.0.0:9090/api/v1/query?query=prometheus_remote_storage_succeeded_samples_total | jq -r .data.result[].value[1]) -gt 100 ]]' +# Make sure we're proxying writes to the unaggregated namespace +echo "Wait until data beings being written to remote storage for the unaggregated namespace" +ATTEMPTS=6 TIMEOUT=2 retry_with_backoff \ + '[[ $(curl -sSf 0.0.0.0:9090/api/v1/query?query=sum(database_write_tagged_success{namespace="unagg"}) | jq -r .data.result[].value[1]) -gt 0 ]]' + +# Make sure we're proxying writes to the aggregated namespace +echo "Wait until data beings being written to remote storage for the aggregated namespace" +ATTEMPTS=6 TIMEOUT=2 retry_with_backoff \ + '[[ $(curl -sSf 0.0.0.0:9090/api/v1/query?query=sum(database_write_tagged_success{namespace="agg"}) | jq -r .data.result[].value[1]) -gt 0 ]]' + docker-compose -f ${COMPOSE_FILE} down || echo "unable to shutdown containers" # CI fails to stop all containers sometimes diff --git a/src/query/api/v1/httpd/handler.go b/src/query/api/v1/httpd/handler.go index 302a951641..e0d9ce5575 100644 --- a/src/query/api/v1/httpd/handler.go +++ b/src/query/api/v1/httpd/handler.go @@ -103,7 +103,7 @@ func (h *Handler) RegisterRoutes() error { // Prometheus remote read/write endpoints promRemoteReadHandler := remote.NewPromReadHandler(h.engine, h.scope.Tagged(remoteSource)) - promRemoteWriteHandler, err := remote.NewPromWriteHandler(h.storage, nil, h.scope.Tagged(remoteSource)) + promRemoteWriteHandler, err := remote.NewPromWriteHandler(h.storage, h.downsampler, h.scope.Tagged(remoteSource)) if err != nil { return err } diff --git a/src/query/server/server.go b/src/query/server/server.go index f74f517ae0..018e5a7fa4 100644 --- a/src/query/server/server.go +++ b/src/query/server/server.go @@ -58,6 +58,7 @@ import ( "github.com/m3db/m3x/pool" xsync "github.com/m3db/m3x/sync" xtime "github.com/m3db/m3x/time" + "github.com/uber-go/tally" "github.com/pkg/errors" "go.uber.org/zap" @@ -359,7 +360,7 @@ func newDownsampler( RulesKVStore: kvStore, AutoMappingRules: autoMappingRules, ClockOptions: clock.NewOptions(), - InstrumentOptions: instrumentOpts, + InstrumentOptions: instrumentOpts.SetMetricsScope(tally.NoopScope), TagEncoderOptions: tagEncoderOptions, TagDecoderOptions: tagDecoderOptions, TagEncoderPoolOptions: tagEncoderPoolOptions, From bb58a055576dd74212aab477fe8f69f23391344b Mon Sep 17 00:00:00 2001 From: Richard Artoul Date: Sun, 30 Sep 2018 00:20:56 -0400 Subject: [PATCH 02/12] Fix curls --- scripts/docker-integration-tests/prometheus/test.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/docker-integration-tests/prometheus/test.sh b/scripts/docker-integration-tests/prometheus/test.sh index 12c6b654ff..9c8f48a8f6 100755 --- a/scripts/docker-integration-tests/prometheus/test.sh +++ b/scripts/docker-integration-tests/prometheus/test.sh @@ -107,11 +107,11 @@ ATTEMPTS=6 TIMEOUT=2 retry_with_backoff \ # Make sure we're proxying writes to the unaggregated namespace echo "Wait until data beings being written to remote storage for the unaggregated namespace" ATTEMPTS=6 TIMEOUT=2 retry_with_backoff \ - '[[ $(curl -sSf 0.0.0.0:9090/api/v1/query?query=sum(database_write_tagged_success{namespace="unagg"}) | jq -r .data.result[].value[1]) -gt 0 ]]' + '[[ $(curl -sSf 0.0.0.0:9090/api/v1/query?query=database_write_tagged_success\{namespace="unagg"\} | jq .data.result[0].value[1]) -gt 0 ]]' # Make sure we're proxying writes to the aggregated namespace echo "Wait until data beings being written to remote storage for the aggregated namespace" ATTEMPTS=6 TIMEOUT=2 retry_with_backoff \ - '[[ $(curl -sSf 0.0.0.0:9090/api/v1/query?query=sum(database_write_tagged_success{namespace="agg"}) | jq -r .data.result[].value[1]) -gt 0 ]]' + '[[ $(curl -sSf 0.0.0.0:9090/api/v1/query?query=database_write_tagged_success\{namespace="agg"\} | jq .data.result[0].value[1]) -gt 0 ]]' docker-compose -f ${COMPOSE_FILE} down || echo "unable to shutdown containers" # CI fails to stop all containers sometimes From ca584acf0405556ff8cfe0ae2b59cd09301aef49 Mon Sep 17 00:00:00 2001 From: Richard Artoul Date: Sun, 30 Sep 2018 00:26:07 -0400 Subject: [PATCH 03/12] doubel escape --- scripts/docker-integration-tests/prometheus/test.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/docker-integration-tests/prometheus/test.sh b/scripts/docker-integration-tests/prometheus/test.sh index 9c8f48a8f6..cda3c13394 100755 --- a/scripts/docker-integration-tests/prometheus/test.sh +++ b/scripts/docker-integration-tests/prometheus/test.sh @@ -107,11 +107,11 @@ ATTEMPTS=6 TIMEOUT=2 retry_with_backoff \ # Make sure we're proxying writes to the unaggregated namespace echo "Wait until data beings being written to remote storage for the unaggregated namespace" ATTEMPTS=6 TIMEOUT=2 retry_with_backoff \ - '[[ $(curl -sSf 0.0.0.0:9090/api/v1/query?query=database_write_tagged_success\{namespace="unagg"\} | jq .data.result[0].value[1]) -gt 0 ]]' + '[[ $(curl -sSf 0.0.0.0:9090/api/v1/query?query=database_write_tagged_success\\{namespace="unagg"\\} | jq .data.result[0].value[1]) -gt 0 ]]' # Make sure we're proxying writes to the aggregated namespace echo "Wait until data beings being written to remote storage for the aggregated namespace" ATTEMPTS=6 TIMEOUT=2 retry_with_backoff \ - '[[ $(curl -sSf 0.0.0.0:9090/api/v1/query?query=database_write_tagged_success\{namespace="agg"\} | jq .data.result[0].value[1]) -gt 0 ]]' + '[[ $(curl -sSf 0.0.0.0:9090/api/v1/query?query=database_write_tagged_success\\{namespace="agg"\\} | jq .data.result[0].value[1]) -gt 0 ]]' docker-compose -f ${COMPOSE_FILE} down || echo "unable to shutdown containers" # CI fails to stop all containers sometimes From fd28d2d7a8ef620ce08050fcd485262808bf28f0 Mon Sep 17 00:00:00 2001 From: Richard Artoul Date: Sun, 30 Sep 2018 00:28:29 -0400 Subject: [PATCH 04/12] fix typo --- scripts/docker-integration-tests/prometheus/test.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/docker-integration-tests/prometheus/test.sh b/scripts/docker-integration-tests/prometheus/test.sh index cda3c13394..68142f38d7 100755 --- a/scripts/docker-integration-tests/prometheus/test.sh +++ b/scripts/docker-integration-tests/prometheus/test.sh @@ -105,12 +105,12 @@ ATTEMPTS=6 TIMEOUT=2 retry_with_backoff \ '[[ $(curl -sSf 0.0.0.0:9090/api/v1/query?query=prometheus_remote_storage_succeeded_samples_total | jq -r .data.result[].value[1]) -gt 100 ]]' # Make sure we're proxying writes to the unaggregated namespace -echo "Wait until data beings being written to remote storage for the unaggregated namespace" +echo "Wait until data begins being written to remote storage for the unaggregated namespace" ATTEMPTS=6 TIMEOUT=2 retry_with_backoff \ '[[ $(curl -sSf 0.0.0.0:9090/api/v1/query?query=database_write_tagged_success\\{namespace="unagg"\\} | jq .data.result[0].value[1]) -gt 0 ]]' # Make sure we're proxying writes to the aggregated namespace -echo "Wait until data beings being written to remote storage for the aggregated namespace" +echo "Wait until data begins being written to remote storage for the aggregated namespace" ATTEMPTS=6 TIMEOUT=2 retry_with_backoff \ '[[ $(curl -sSf 0.0.0.0:9090/api/v1/query?query=database_write_tagged_success\\{namespace="agg"\\} | jq .data.result[0].value[1]) -gt 0 ]]' From 8a9490becbc60d6e9d806b3a0743081fd014b1d5 Mon Sep 17 00:00:00 2001 From: Richard Artoul Date: Sun, 30 Sep 2018 00:31:25 -0400 Subject: [PATCH 05/12] escape quotes --- scripts/docker-integration-tests/prometheus/test.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/docker-integration-tests/prometheus/test.sh b/scripts/docker-integration-tests/prometheus/test.sh index 68142f38d7..5d11d474bd 100755 --- a/scripts/docker-integration-tests/prometheus/test.sh +++ b/scripts/docker-integration-tests/prometheus/test.sh @@ -107,11 +107,11 @@ ATTEMPTS=6 TIMEOUT=2 retry_with_backoff \ # Make sure we're proxying writes to the unaggregated namespace echo "Wait until data begins being written to remote storage for the unaggregated namespace" ATTEMPTS=6 TIMEOUT=2 retry_with_backoff \ - '[[ $(curl -sSf 0.0.0.0:9090/api/v1/query?query=database_write_tagged_success\\{namespace="unagg"\\} | jq .data.result[0].value[1]) -gt 0 ]]' + '[[ $(curl -sSf 0.0.0.0:9090/api/v1/query?query=database_write_tagged_success\\{namespace=\"unagg\"\\} | jq .data.result[0].value[1]) -gt 0 ]]' # Make sure we're proxying writes to the aggregated namespace echo "Wait until data begins being written to remote storage for the aggregated namespace" ATTEMPTS=6 TIMEOUT=2 retry_with_backoff \ - '[[ $(curl -sSf 0.0.0.0:9090/api/v1/query?query=database_write_tagged_success\\{namespace="agg"\\} | jq .data.result[0].value[1]) -gt 0 ]]' + '[[ $(curl -sSf 0.0.0.0:9090/api/v1/query?query=database_write_tagged_success\\{namespace=\"agg\"\\} | jq .data.result[0].value[1]) -gt 0 ]]' docker-compose -f ${COMPOSE_FILE} down || echo "unable to shutdown containers" # CI fails to stop all containers sometimes From 8d0fb4fdff4600de031abec35a076af37aa14ec8 Mon Sep 17 00:00:00 2001 From: Richard Artoul Date: Sun, 30 Sep 2018 00:34:37 -0400 Subject: [PATCH 06/12] Add trap --- scripts/docker-integration-tests/prometheus/test.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/docker-integration-tests/prometheus/test.sh b/scripts/docker-integration-tests/prometheus/test.sh index 5d11d474bd..070b975840 100755 --- a/scripts/docker-integration-tests/prometheus/test.sh +++ b/scripts/docker-integration-tests/prometheus/test.sh @@ -11,6 +11,13 @@ echo "Run m3dbnode and m3coordinator containers" docker-compose -f ${COMPOSE_FILE} up -d dbnode01 docker-compose -f ${COMPOSE_FILE} up -d coordinator01 +# think of this as a defer func() in golang +function defer { + docker-compose -f ${COMPOSE_FILE} down || echo "unable to shutdown containers" # CI fails to stop all containers sometimes +} +trap defer EXIT + + echo "Sleeping for a bit to ensure db up" sleep 15 # TODO Replace sleeps with logic to determine when to proceed From a2badc7cfe736b7e8d91c7994916262817ba2531 Mon Sep 17 00:00:00 2001 From: Richard Artoul Date: Sun, 30 Sep 2018 00:43:04 -0400 Subject: [PATCH 07/12] working prometheus integration test with multi namespaces --- .../docker-integration-tests/prometheus/test.sh | 6 +++--- scripts/docker-integration-tests/simple/test.sh | 16 +++++++++------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/scripts/docker-integration-tests/prometheus/test.sh b/scripts/docker-integration-tests/prometheus/test.sh index 070b975840..04829a7653 100755 --- a/scripts/docker-integration-tests/prometheus/test.sh +++ b/scripts/docker-integration-tests/prometheus/test.sh @@ -114,11 +114,11 @@ ATTEMPTS=6 TIMEOUT=2 retry_with_backoff \ # Make sure we're proxying writes to the unaggregated namespace echo "Wait until data begins being written to remote storage for the unaggregated namespace" ATTEMPTS=6 TIMEOUT=2 retry_with_backoff \ - '[[ $(curl -sSf 0.0.0.0:9090/api/v1/query?query=database_write_tagged_success\\{namespace=\"unagg\"\\} | jq .data.result[0].value[1]) -gt 0 ]]' + '[[ $(curl -sSf 0.0.0.0:9090/api/v1/query?query=database_write_tagged_success\\{namespace=\"unagg\"\\} | jq -r .data.result[0].value[1]) -gt 0 ]]' # Make sure we're proxying writes to the aggregated namespace echo "Wait until data begins being written to remote storage for the aggregated namespace" -ATTEMPTS=6 TIMEOUT=2 retry_with_backoff \ - '[[ $(curl -sSf 0.0.0.0:9090/api/v1/query?query=database_write_tagged_success\\{namespace=\"agg\"\\} | jq .data.result[0].value[1]) -gt 0 ]]' +ATTEMPTS=10 TIMEOUT=2 retry_with_backoff \ + '[[ $(curl -sSf 0.0.0.0:9090/api/v1/query?query=database_write_tagged_success\\{namespace=\"agg\"\\} | jq -r .data.result[0].value[1]) -gt 0 ]]' docker-compose -f ${COMPOSE_FILE} down || echo "unable to shutdown containers" # CI fails to stop all containers sometimes diff --git a/scripts/docker-integration-tests/simple/test.sh b/scripts/docker-integration-tests/simple/test.sh index 8c054b13db..993e923350 100755 --- a/scripts/docker-integration-tests/simple/test.sh +++ b/scripts/docker-integration-tests/simple/test.sh @@ -9,6 +9,14 @@ echo "Run m3dbnode docker container" CONTAINER_NAME="m3dbnode-version-${REVISION}" docker create --name "${CONTAINER_NAME}" -p 9000:9000 -p 9001:9001 -p 9002:9002 -p 9003:9003 -p 9004:9004 -p 7201:7201 "m3dbnode_integration:${REVISION}" + +# think of this as a defer func() in golang +function defer { + echo "Remove docker container" + docker rm --force "${CONTAINER_NAME}" +} +trap defer EXIT + docker start "${CONTAINER_NAME}" if [ $? -ne 0 ]; then echo "m3dbnode docker failed to start" @@ -117,10 +125,4 @@ echo "Deleting placement" curl -vvvsSf -X DELETE 0.0.0.0:7201/api/v1/placement echo "Deleting namespace" -curl -vvvsSf -X DELETE 0.0.0.0:7201/api/v1/namespace/default - -echo "Stop docker container" -docker stop "${CONTAINER_NAME}" - -echo "Remove docker container" -docker rm "${CONTAINER_NAME}" \ No newline at end of file +curl -vvvsSf -X DELETE 0.0.0.0:7201/api/v1/namespace/default \ No newline at end of file From ffaaa46fc6b4e8885e108e2449dc7dbb89f66b55 Mon Sep 17 00:00:00 2001 From: Richard Artoul Date: Sun, 30 Sep 2018 00:47:27 -0400 Subject: [PATCH 08/12] Address feedback --- scripts/docker-integration-tests/prometheus/test.sh | 1 - scripts/docker-integration-tests/simple/test.sh | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/docker-integration-tests/prometheus/test.sh b/scripts/docker-integration-tests/prometheus/test.sh index 04829a7653..518165e3ff 100755 --- a/scripts/docker-integration-tests/prometheus/test.sh +++ b/scripts/docker-integration-tests/prometheus/test.sh @@ -121,4 +121,3 @@ echo "Wait until data begins being written to remote storage for the aggregated ATTEMPTS=10 TIMEOUT=2 retry_with_backoff \ '[[ $(curl -sSf 0.0.0.0:9090/api/v1/query?query=database_write_tagged_success\\{namespace=\"agg\"\\} | jq -r .data.result[0].value[1]) -gt 0 ]]' -docker-compose -f ${COMPOSE_FILE} down || echo "unable to shutdown containers" # CI fails to stop all containers sometimes diff --git a/scripts/docker-integration-tests/simple/test.sh b/scripts/docker-integration-tests/simple/test.sh index 993e923350..47a6671a89 100755 --- a/scripts/docker-integration-tests/simple/test.sh +++ b/scripts/docker-integration-tests/simple/test.sh @@ -125,4 +125,4 @@ echo "Deleting placement" curl -vvvsSf -X DELETE 0.0.0.0:7201/api/v1/placement echo "Deleting namespace" -curl -vvvsSf -X DELETE 0.0.0.0:7201/api/v1/namespace/default \ No newline at end of file +curl -vvvsSf -X DELETE 0.0.0.0:7201/api/v1/namespace/default From 6f4e3ae7b0263cf574234ca4f60f5bf029fdba83 Mon Sep 17 00:00:00 2001 From: Richard Artoul Date: Sun, 30 Sep 2018 00:48:06 -0400 Subject: [PATCH 09/12] revert start_m3 changes --- scripts/development/m3_stack/start_m3.sh | 42 ++---------------------- 1 file changed, 3 insertions(+), 39 deletions(-) diff --git a/scripts/development/m3_stack/start_m3.sh b/scripts/development/m3_stack/start_m3.sh index 3ef4087ffa..32dd071049 100755 --- a/scripts/development/m3_stack/start_m3.sh +++ b/scripts/development/m3_stack/start_m3.sh @@ -6,43 +6,9 @@ echo "Bringing up nodes in the backgorund with docker compose, remember to run . docker-compose -f docker-compose.yml up -d --renew-anon-volumes echo "Nodes online" -sleep 10 - -echo "Initializing namespace" -curl -vvvsSf -X POST 0.0.0.0:7201/api/v1/namespace -d '{ - "name": "agg", - "options": { - "bootstrapEnabled": true, - "flushEnabled": true, - "writesToCommitLog": true, - "cleanupEnabled": true, - "snapshotEnabled": true, - "repairEnabled": false, - "retentionOptions": { - "retentionPeriodNanos": 172800000000000, - "blockSizeNanos": 7200000000000, - "bufferFutureNanos": 600000000000, - "bufferPastNanos": 600000000000, - "blockDataExpiry": true, - "blockDataExpiryAfterNotAccessPeriodNanos": 300000000000 - }, - "indexOptions": { - "enabled": true, - "blockSizeNanos": 7200000000000 - } - } -}' -echo "Done initializing namespace" - -echo "Validating namespace" -[ "$(curl -sSf localhost:7201/api/v1/namespace | jq .registry.namespaces.agg.indexOptions.enabled)" == true ] -echo "Done validating namespace" - -sleep 10 - echo "Initializing namespace" -curl -vvvsSf -X POST 0.0.0.0:7201/api/v1/namespace -d '{ - "name": "unagg", +curl -vvvsSf -X POST localhost:7201/api/v1/namespace -d '{ + "name": "prometheus_metrics", "options": { "bootstrapEnabled": true, "flushEnabled": true, @@ -67,11 +33,9 @@ curl -vvvsSf -X POST 0.0.0.0:7201/api/v1/namespace -d '{ echo "Done initializing namespace" echo "Validating namespace" -[ "$(curl -sSf localhost:7201/api/v1/namespace | jq .registry.namespaces.unagg.indexOptions.enabled)" == true ] +[ "$(curl -sSf localhost:7201/api/v1/namespace | jq .registry.namespaces.prometheus_metrics.indexOptions.enabled)" == true ] echo "Done validating namespace" -sleep 10 - echo "Initializing topology" curl -vvvsSf -X POST localhost:7201/api/v1/placement/init -d '{ "num_shards": 64, From 31c1b0c9cabf320a5c9c4657305b9759c55e7378 Mon Sep 17 00:00:00 2001 From: Richard Artoul Date: Sun, 30 Sep 2018 00:48:24 -0400 Subject: [PATCH 10/12] revert start_m3 changes --- scripts/development/m3_stack/m3coordinator.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/scripts/development/m3_stack/m3coordinator.yml b/scripts/development/m3_stack/m3coordinator.yml index 20dea33269..f24643cdf3 100644 --- a/scripts/development/m3_stack/m3coordinator.yml +++ b/scripts/development/m3_stack/m3coordinator.yml @@ -14,13 +14,9 @@ metrics: clusters: - namespaces: - - namespace: agg - type: aggregated - retention: 10h - resolution: 15s - - namespace: unagg + - namespace: prometheus_metrics type: unaggregated - retention: 10m + retention: 48h client: config: service: From c911faea051594cd6d0c98f116d300e4c934dc6d Mon Sep 17 00:00:00 2001 From: Richard Artoul Date: Sun, 30 Sep 2018 00:49:16 -0400 Subject: [PATCH 11/12] Add TODO --- src/query/server/server.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/query/server/server.go b/src/query/server/server.go index 018e5a7fa4..0def23a9e2 100644 --- a/src/query/server/server.go +++ b/src/query/server/server.go @@ -356,10 +356,11 @@ func newDownsampler( SubScope("tag-decoder-pool"))) downsampler, err := downsample.NewDownsampler(downsample.DownsamplerOptions{ - Storage: storage, - RulesKVStore: kvStore, - AutoMappingRules: autoMappingRules, - ClockOptions: clock.NewOptions(), + Storage: storage, + RulesKVStore: kvStore, + AutoMappingRules: autoMappingRules, + ClockOptions: clock.NewOptions(), + // TODO: remove after https://github.com/m3db/m3/issues/992 is fixed InstrumentOptions: instrumentOpts.SetMetricsScope(tally.NoopScope), TagEncoderOptions: tagEncoderOptions, TagDecoderOptions: tagDecoderOptions, From a6dd6a449e1d28f920fff8e807b2cde5b37879c6 Mon Sep 17 00:00:00 2001 From: Richard Artoul Date: Sun, 30 Sep 2018 00:49:51 -0400 Subject: [PATCH 12/12] Fix import order --- src/query/server/server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/query/server/server.go b/src/query/server/server.go index 0def23a9e2..7a43a2d0d2 100644 --- a/src/query/server/server.go +++ b/src/query/server/server.go @@ -58,9 +58,9 @@ import ( "github.com/m3db/m3x/pool" xsync "github.com/m3db/m3x/sync" xtime "github.com/m3db/m3x/time" - "github.com/uber-go/tally" "github.com/pkg/errors" + "github.com/uber-go/tally" "go.uber.org/zap" "google.golang.org/grpc" )