-
Notifications
You must be signed in to change notification settings - Fork 454
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
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
a9f20c2
interim
bb58a05
Fix curls
ca584ac
doubel escape
fd28d2d
fix typo
8a9490b
escape quotes
8d0fb4f
Add trap
a2badc7
working prometheus integration test with multi namespaces
ffaaa46
Address feedback
6f4e3ae
revert start_m3 changes
31c1b0c
revert start_m3 changes
c911fae
Add TODO
a6dd6a4
Fix import order
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 { | ||
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,13 @@ 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 ]]' | ||
|
||
docker-compose -f ${COMPOSE_FILE} down || echo "unable to shutdown containers" # CI fails to stop all containers sometimes | ||
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -60,6 +60,7 @@ import ( | |
xtime "github.com/m3db/m3x/time" | ||
|
||
"github.com/pkg/errors" | ||
"github.com/uber-go/tally" | ||
"go.uber.org/zap" | ||
"google.golang.org/grpc" | ||
) | ||
|
@@ -355,11 +356,12 @@ func newDownsampler( | |
SubScope("tag-decoder-pool"))) | ||
|
||
downsampler, err := downsample.NewDownsampler(downsample.DownsamplerOptions{ | ||
Storage: storage, | ||
RulesKVStore: kvStore, | ||
AutoMappingRules: autoMappingRules, | ||
ClockOptions: clock.NewOptions(), | ||
InstrumentOptions: instrumentOpts, | ||
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), | ||
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, | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
fancy!