-
Notifications
You must be signed in to change notification settings - Fork 510
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement polling improvements (#2652)
* tempodb: update poller tests and mocks to support new work * include Blocklist interface for testing * tempodb: include quick poller * Include QuickBlocks on tempodb * Include notes about what is being implemented * Add initial ListBlocks() stubs and implement s3 * Fix poller commits * Lint fix * Fix method for unimplemented test * Add test coverage for previous compactions * Fix method for unimplemented test * Lint fix * Drop some debug printing * Drop unused variablea and update debug message * Relocate allocations * Invent fewer objects * Lint fix * Implement gcs ListBlocks() * Tidy up s3.go * Import fix * Adjust list_test.go for eyeball parse * Include notes after discoverying why * Wrap a couple errors for clarity * Modify error test for additional details * Modify gcs backend for single character delimiter * Add note about call change * Add note about call change and implement listv2 for s3 * Adjust uuidInBlocklist to use existing allocations * Add config and defaults for tenant polling concurrency * Implement concurrent tenant polling * Implement Find() on backend readers * Add Find to MockRawReader * Convert QuickBlocks over to use Find() * Implement Find() on local/cache backend readers * Drop ListBlocks in favor of Find * Replace Blocks() with QuickBlocks() and update usage everywhere * Fix local.Find for path handling * Fix backend raw tests for Find mocks * Reorder to reduce PR diff * Relocate super-handy block boudary method * Extend FindFunc to indicate Done * Parallelize the Find() calls within Blocks() * Fix race * Fix boundedwaitgroup init in test * Update backend implementations * Make note of implemenation details * Capture errors from tenant polling * Add feature detection on backend readers * Use backend.HasFeature() to determine if appropriate function * Fix error handling in poller * Pick lint * Extend log message to include tenant_concurrency * Add doc for HasFeature * Local backend supports no features * Pick lint * Ensure we wait for results * Avoid early return * Improve error handling to include all errors * Remove HasFeature() from RawReader interface after discussion * Drop start argument from Find signature * Include range calculation for sharded list calls * Enable concurrent list calls for s3.Find() * Include useful OwnsEverythingSharder * Remove concurrency handling from tempodb.Blocks() * Add docs for new config options * Fix GCS e2e object path * Clean up comments * Include a test to ensure retained blocks are forgotten * Begin reimplementing ListBlock() in RawReaders after discussion * Reimplement ListBlocks() on the backends * Fix ListBlocks() for gcs * Drop Find and supporting code * Drop unused method * Back out proto change, since `main` also has this issue * Update docs/sources/tempo/configuration/_index.md Co-authored-by: Mario <[email protected]> * Reimplement ListBlocks() for Azure * Lint * Rename config option for concurrent block list * Relocate block boundary code to own package * Relocate Blocklist interface to poller package * Rely on error count for early exit condition * Avoid polling additional tenants if we have already reached our error tollerance * Improve tests * Include initial benchmarks * Update docs/sources/tempo/configuration/_index.md Co-authored-by: Koenraad Verheyden <[email protected]> * Update docs/sources/tempo/configuration/_index.md Co-authored-by: Koenraad Verheyden <[email protected]> * Use *List directly, drop Blocklist interface * Use builtin clear() to avoid heap escape * Adhere to new error usage * Speed up benchmark setup * Trade memory for time in large data sets * Lock for race * Update CLI handling for Blocks() call to include compacted results * Add doc to mention the concurrency per-instance * Tidy up backends a bit * Implement concurrent ListBlocks() on gcs * Clean up * Include ListBlocksConcurrency config option for GCS * Test for compacted migration * Start tracing ListBlocks() * Start tracing the poller * Fix span attribute * Sort the block list for test * Use slice collection instead of channel collection for deadlock * Revert tenant poll concurrency * Pass context to the EnablePolling method for future use * Handle context on pollingLoop * Use attribtues not events for better traceql * Drop last tenant concurrency reference * Fix Do() revert to old code * Update for context * Update tracing attributes for poller * Back out proto update * Remove unused error * Remove inacurate docs after refactor * Clean up * Include additional span attributes * Drop unused * Drop unused * Address some feedback in the backend * Skip compacted blocks on trace summary * Include TODO about reducing the 404 on meta.json for compacted blocks * Include integration test for poller * Upgrade fake-gcs-server * Use JSONRead in gcs client for fake-gcs-server when Endpoint is set * Avoid early allocation of error for concurent operations * Include EndOffset in gcs backend * Include integration configs * Fix for global min/max * Include poller integration test in ci * Preallocate for review comments * Lock for all results and break early if error * Include additional assertion for poller_test * Adjust gcs and s3 locking * Adjust ListBlocks interface to take a tenant string instead of a keypath * Move OwnsEverythingSharder * Remove some comments * Ensure exclusive max unless global max * Restructure for clarity * Tidy up backends a bit * Fix test call count after avoiding BlockMeta for known compacted blocks * Update tests to include CompactedMeta call count * Include error message when block UUID is below shard minimum * Centralize backend.GlobalMaxBlockID --------- Co-authored-by: Mario <[email protected]> Co-authored-by: Koenraad Verheyden <[email protected]>
- Loading branch information
1 parent
f297c50
commit 7e0e310
Showing
57 changed files
with
1,804 additions
and
325 deletions.
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
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
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
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
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 |
---|---|---|
@@ -0,0 +1,54 @@ | ||
target: all | ||
stream_over_http_enabled: true | ||
|
||
server: | ||
http_listen_port: 3200 | ||
|
||
query_frontend: | ||
search: | ||
query_backend_after: 0 # setting these both to 0 will force all range searches to hit the backend | ||
query_ingesters_until: 0 | ||
|
||
distributor: | ||
receivers: | ||
jaeger: | ||
protocols: | ||
grpc: | ||
|
||
ingester: | ||
lifecycler: | ||
address: 127.0.0.1 | ||
ring: | ||
kvstore: | ||
store: inmemory | ||
replication_factor: 1 | ||
final_sleep: 0s | ||
trace_idle_period: 1s | ||
max_block_duration: 5s | ||
complete_block_timeout: 5s | ||
flush_check_period: 1s | ||
|
||
storage: | ||
trace: | ||
blocklist_poll: 1s | ||
backend: azure | ||
azure: | ||
container_name: tempo # how to store data in azure | ||
endpoint_suffix: tempo_e2e-azurite:10000 | ||
storage_account_name: "devstoreaccount1" | ||
storage_account_key: "Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==" | ||
pool: | ||
max_workers: 10 | ||
queue_depth: 100 | ||
|
||
overrides: | ||
user_configurable_overrides: | ||
enabled: true | ||
poll_interval: 10s | ||
client: | ||
backend: azure | ||
azure: | ||
container_name: tempo | ||
endpoint_suffix: tempo_e2e-azurite:10000 | ||
storage_account_name: "devstoreaccount1" | ||
storage_account_key: "Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==" |
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 |
---|---|---|
@@ -0,0 +1,54 @@ | ||
target: all | ||
stream_over_http_enabled: true | ||
|
||
server: | ||
http_listen_port: 3200 | ||
|
||
query_frontend: | ||
search: | ||
query_ingesters_until: 0 # setting these both to 0 will force all range searches to hit the backend | ||
query_backend_after: 0 | ||
|
||
distributor: | ||
receivers: | ||
jaeger: | ||
protocols: | ||
grpc: | ||
|
||
ingester: | ||
lifecycler: | ||
address: 127.0.0.1 | ||
ring: | ||
kvstore: | ||
store: inmemory | ||
replication_factor: 1 | ||
final_sleep: 0s | ||
trace_idle_period: 1s | ||
max_block_duration: 5s | ||
complete_block_timeout: 5s | ||
flush_check_period: 1s | ||
|
||
storage: | ||
trace: | ||
blocklist_poll: 1s | ||
backend: gcs | ||
gcs: | ||
bucket_name: tempo | ||
endpoint: https://tempo_e2e-gcs:4443/storage/v1/ | ||
insecure: true | ||
pool: | ||
max_workers: 10 | ||
queue_depth: 1000 | ||
|
||
overrides: | ||
user_configurable_overrides: | ||
enabled: true | ||
poll_interval: 10s | ||
client: | ||
backend: gcs | ||
# fsouza/fake-gcs-server does not support versioning | ||
confirm_versioning: false | ||
gcs: | ||
bucket_name: tempo | ||
endpoint: https://tempo_e2e-gcs:4443/storage/v1/ | ||
insecure: true |
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 |
---|---|---|
@@ -0,0 +1,57 @@ | ||
target: all | ||
stream_over_http_enabled: true | ||
|
||
server: | ||
http_listen_port: 3200 | ||
|
||
query_frontend: | ||
search: | ||
query_backend_after: 0 # setting these both to 0 will force all range searches to hit the backend | ||
query_ingesters_until: 0 | ||
|
||
distributor: | ||
receivers: | ||
jaeger: | ||
protocols: | ||
grpc: | ||
|
||
ingester: | ||
lifecycler: | ||
address: 127.0.0.1 | ||
ring: | ||
kvstore: | ||
store: inmemory | ||
replication_factor: 1 | ||
final_sleep: 0s | ||
trace_idle_period: 1s | ||
max_block_duration: 5s | ||
complete_block_timeout: 5s | ||
flush_check_period: 1s | ||
|
||
storage: | ||
trace: | ||
blocklist_poll: 1s | ||
backend: s3 | ||
s3: | ||
bucket: tempo | ||
endpoint: tempo-integration-minio-9000:9000 # TODO: this is brittle, fix this eventually | ||
access_key: Cheescake # TODO: use cortex_e2e.MinioAccessKey | ||
secret_key: supersecret # TODO: use cortex_e2e.MinioSecretKey | ||
insecure: true | ||
pool: | ||
max_workers: 10 | ||
queue_depth: 100 | ||
|
||
overrides: | ||
user_configurable_overrides: | ||
enabled: true | ||
poll_interval: 10s | ||
client: | ||
backend: s3 | ||
s3: | ||
# TODO use separate bucket? | ||
bucket: tempo | ||
endpoint: tempo-integration-minio-9000:9000 # TODO: this is brittle, fix this eventually | ||
access_key: Cheescake # TODO: use cortex_e2e.MinioAccessKey | ||
secret_key: supersecret # TODO: use cortex_e2e.MinioSecretKey | ||
insecure: true |
Oops, something went wrong.