-
Notifications
You must be signed in to change notification settings - Fork 453
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix write fanouts with aggregated namespaces #991
Changes from 7 commits
a9f20c2
bb58a05
ca584ac
fd28d2d
8a9490b
8d0fb4f
a2badc7
ffaaa46
6f4e3ae
31c1b0c
c911fae
a6dd6a4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fancy! |
||
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 | ||
|
||
|
@@ -104,4 +111,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 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 -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=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 ]]' | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. remove the docker compose down below |
||
docker-compose -f ${COMPOSE_FILE} down || echo "unable to shutdown containers" # CI fails to stop all containers sometimes |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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}" | ||
curl -vvvsSf -X DELETE 0.0.0.0:7201/api/v1/namespace/default | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: newline |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. metalinter is going to complain about this |
||
|
||
"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), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: put a reference to 992
|
||
TagEncoderOptions: tagEncoderOptions, | ||
TagDecoderOptions: tagDecoderOptions, | ||
TagEncoderPoolOptions: tagEncoderPoolOptions, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
drop changes to
m3_stack
from the pr