Skip to content

Commit 91dd129

Browse files
authored
Update Thanos version to master (#2335)
* Updated Thanos to master Signed-off-by: Peter Štibraný <[email protected]> * Integrate Compactor and Store changes - Deletion delay, blocks cleaner - Postings compression Signed-off-by: Peter Štibraný <[email protected]> * Expose max item size for memcached client. Signed-off-by: Peter Štibraný <[email protected]> * Added new metrics related to postings compression to block_store_metrics Signed-off-by: Peter Štibraný <[email protected]> * Lint Signed-off-by: Peter Štibraný <[email protected]> * Lint Signed-off-by: Peter Štibraný <[email protected]> * CHANGELOG.md, documentation Signed-off-by: Peter Štibraný <[email protected]> * Added prefix. Signed-off-by: Peter Štibraný <[email protected]> * Removed unused option. Signed-off-by: Peter Štibraný <[email protected]> * Remap thanos_memcached_operation_skipped_total metric. Signed-off-by: Peter Štibraný <[email protected]> * Comment that blocks_meta_modified is ignored. Signed-off-by: Peter Štibraný <[email protected]> * Use promauto.With(registerer) to create metrics. Signed-off-by: Peter Štibraný <[email protected]>
1 parent 05404d5 commit 91dd129

File tree

140 files changed

+18258
-13164
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

140 files changed

+18258
-13164
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@
6464
- `-<prefix>.memcached.consistent-hash`: Old default: false, new default: true. This allows for better cache hits when the memcaches are scaled up and down.
6565
- `-querier.batch-iterators`: Old default: false, new default: true.
6666
- `-querier.ingester-streaming`: Old default: false, new default: true.
67+
* [CHANGE] Experimental TSDB: Added `-experimental.tsdb.bucket-store.postings-cache-compression-enabled` to enable postings compression when storing to cache. #2335
68+
* [CHANGE] Experimental TSDB: Added `-compactor.deletion-delay`, which is time before a block marked for deletion is deleted from bucket. If not 0, blocks will be marked for deletion and compactor component will delete blocks marked for deletion from the bucket. If delete-delay is 0, blocks will be deleted straight away. Note that deleting blocks immediately can cause query failures, if store gateway / querier still has the block loaded, or compactor is ignoring the deletion because it's compacting the block at the same time. Default value is 48h. #2335
69+
* [CHANGE] Experimental TSDB: Added `-experimental.tsdb.bucket-store.index-cache.postings-compression-enabled`, to set duration after which the blocks marked for deletion will be filtered out while fetching blocks used for querying. This option allows querier to ignore blocks that are marked for deletion with some delay. This ensures store can still serve blocks that are meant to be deleted but do not have a replacement yet. Default is 24h, half of the default value for `-compactor.deletion-delay`. #2335
70+
* [CHANGE] Experimental TSDB: Added `-experimental.tsdb.bucket-store.index-cache.memcached.max-item-size` to control maximum size of item that is stored to memcached. Defaults to 1 MiB. #2335
6771
* [FEATURE] Added experimental storage API to the ruler service that is enabled when the `-experimental.ruler.enable-api` is set to true #2269
6872
* `-ruler.storage.type` flag now allows `s3`,`gcs`, and `azure` values
6973
* `-ruler.storage.(s3|gcs|azure)` flags exist to allow the configuration of object clients set for rule storage

docs/configuration/config-file-reference.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2453,6 +2453,24 @@ bucket_store:
24532453
# CLI flag: -experimental.tsdb.bucket-store.index-cache.memcached.max-get-multi-batch-size
24542454
[max_get_multi_batch_size: <int> | default = 0]
24552455
2456+
# The maximum size of an item stored in memcached. Bigger items are not
2457+
# stored. If set to 0, no maximum size is enforced.
2458+
# CLI flag: -experimental.tsdb.bucket-store.index-cache.memcached.max-item-size
2459+
[max_item_size: <int> | default = 1048576]
2460+
2461+
# Compress postings before storing them to postings cache.
2462+
# CLI flag: -experimental.tsdb.bucket-store.index-cache.postings-compression-enabled
2463+
[postings_compression_enabled: <boolean> | default = false]
2464+
2465+
# Duration after which the blocks marked for deletion will be filtered out
2466+
# while fetching blocks. The idea of ignore-deletion-marks-delay is to ignore
2467+
# blocks that are marked for deletion with some delay. This ensures store can
2468+
# still serve blocks that are meant to be deleted but do not have a
2469+
# replacement yet.Default is 24h, half of the default value for
2470+
# -compactor.deletion-delay.
2471+
# CLI flag: -experimental.tsdb.bucket-store.ignore-deletion-marks-delay
2472+
[ignore_deletion_mark_delay: <duration> | default = 24h0m0s]
2473+
24562474
# How frequently does Cortex try to compact TSDB head. Block is only created if
24572475
# data covers smallest block range. Must be greater than 0 and max 5 minutes.
24582476
# CLI flag: -experimental.tsdb.head-compaction-interval
@@ -2571,6 +2589,15 @@ The `compactor_config` configures the compactor for the experimental blocks stor
25712589
# CLI flag: -compactor.compaction-retries
25722590
[compaction_retries: <int> | default = 3]
25732591
2592+
# Time before a block marked for deletion is deleted from bucket. If not 0,
2593+
# blocks will be marked for deletion and compactor component will delete blocks
2594+
# marked for deletion from the bucket. If delete-delay is 0, blocks will be
2595+
# deleted straight away. Note that deleting blocks immediately can cause query
2596+
# failures, if store gateway still has the block loaded, or compactor is
2597+
# ignoring the deletion because it's compacting the block at the same time.
2598+
# CLI flag: -compactor.deletion-delay
2599+
[deletion_delay: <duration> | default = 48h0m0s]
2600+
25742601
# Shard tenants across multiple compactor instances. Sharding is required if you
25752602
# run multiple compactor instances, in order to coordinate compactions and avoid
25762603
# race conditions leading to the same tenant blocks simultaneously compacted by

docs/operations/blocks-storage.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,24 @@ tsdb:
252252
# CLI flag: -experimental.tsdb.bucket-store.index-cache.memcached.max-get-multi-batch-size
253253
[max_get_multi_batch_size: <int> | default = 0]
254254
255+
# The maximum size of an item stored in memcached. Bigger items are not
256+
# stored. If set to 0, no maximum size is enforced.
257+
# CLI flag: -experimental.tsdb.bucket-store.index-cache.memcached.max-item-size
258+
[max_item_size: <int> | default = 1048576]
259+
260+
# Compress postings before storing them to postings cache.
261+
# CLI flag: -experimental.tsdb.bucket-store.index-cache.postings-compression-enabled
262+
[postings_compression_enabled: <boolean> | default = false]
263+
264+
# Duration after which the blocks marked for deletion will be filtered out
265+
# while fetching blocks. The idea of ignore-deletion-marks-delay is to
266+
# ignore blocks that are marked for deletion with some delay. This ensures
267+
# store can still serve blocks that are meant to be deleted but do not have
268+
# a replacement yet.Default is 24h, half of the default value for
269+
# -compactor.deletion-delay.
270+
# CLI flag: -experimental.tsdb.bucket-store.ignore-deletion-marks-delay
271+
[ignore_deletion_mark_delay: <duration> | default = 24h0m0s]
272+
255273
# How frequently does Cortex try to compact TSDB head. Block is only created
256274
# if data covers smallest block range. Must be greater than 0 and max 5
257275
# minutes.
@@ -372,6 +390,16 @@ compactor:
372390
# CLI flag: -compactor.compaction-retries
373391
[compaction_retries: <int> | default = 3]
374392
393+
# Time before a block marked for deletion is deleted from bucket. If not 0,
394+
# blocks will be marked for deletion and compactor component will delete
395+
# blocks marked for deletion from the bucket. If delete-delay is 0, blocks
396+
# will be deleted straight away. Note that deleting blocks immediately can
397+
# cause query failures, if store gateway still has the block loaded, or
398+
# compactor is ignoring the deletion because it's compacting the block at the
399+
# same time.
400+
# CLI flag: -compactor.deletion-delay
401+
[deletion_delay: <duration> | default = 48h0m0s]
402+
375403
# Shard tenants across multiple compactor instances. Sharding is required if
376404
# you run multiple compactor instances, in order to coordinate compactions and
377405
# avoid race conditions leading to the same tenant blocks simultaneously

go.mod

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,10 @@ require (
1414
github.com/aws/aws-sdk-go v1.25.48
1515
github.com/blang/semver v3.5.0+incompatible
1616
github.com/bradfitz/gomemcache v0.0.0-20190913173617-a41fca850d0b
17-
github.com/cenkalti/backoff v1.0.0 // indirect
1817
github.com/cespare/xxhash v1.1.0
19-
github.com/coreos/go-semver v0.3.0 // indirect
20-
github.com/coreos/go-systemd v0.0.0-20181012123002-c6f51f82210d // indirect
21-
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f // indirect
2218
github.com/facette/natsort v0.0.0-20181210072756-2cd4dd1e2dcb
2319
github.com/fsouza/fake-gcs-server v1.7.0
2420
github.com/go-kit/kit v0.9.0
25-
github.com/go-openapi/analysis v0.19.4 // indirect
2621
github.com/gocql/gocql v0.0.0-20200121121104-95d072f1b5bb
2722
github.com/gogo/protobuf v1.3.1
2823
github.com/gogo/status v1.0.3
@@ -31,24 +26,19 @@ require (
3126
github.com/golang/snappy v0.0.1
3227
github.com/gomodule/redigo v2.0.0+incompatible
3328
github.com/gorilla/mux v1.7.1
34-
github.com/gorilla/websocket v1.4.0 // indirect
3529
github.com/grpc-ecosystem/go-grpc-middleware v1.1.0
3630
github.com/hashicorp/consul/api v1.3.0
3731
github.com/hashicorp/go-cleanhttp v0.5.1
3832
github.com/hashicorp/go-sockaddr v1.0.2
3933
github.com/hashicorp/memberlist v0.1.5
4034
github.com/json-iterator/go v1.1.9
41-
github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348 // indirect
42-
github.com/lann/builder v0.0.0-20150808151131-f22ce00fd939 // indirect
43-
github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 // indirect
4435
github.com/lib/pq v1.3.0
45-
github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e // indirect
4636
github.com/mitchellh/go-wordwrap v1.0.0
4737
github.com/oklog/ulid v1.3.1
4838
github.com/opentracing-contrib/go-grpc v0.0.0-20180928155321-4b5a12d3ff02
4939
github.com/opentracing-contrib/go-stdlib v0.0.0-20190519235532-cf7a6c988dc9
5040
github.com/opentracing/opentracing-go v1.1.1-0.20200124165624-2876d2018785
51-
github.com/pkg/errors v0.8.1
41+
github.com/pkg/errors v0.9.1
5242
github.com/prometheus/alertmanager v0.20.0
5343
github.com/prometheus/client_golang v1.5.0
5444
github.com/prometheus/client_model v0.2.0
@@ -58,19 +48,17 @@ require (
5848
github.com/segmentio/fasthash v0.0.0-20180216231524-a72b379d632e
5949
github.com/spf13/afero v1.2.2
6050
github.com/stretchr/testify v1.4.0
61-
github.com/thanos-io/thanos v0.11.0
62-
github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5 // indirect
51+
github.com/thanos-io/thanos v0.8.1-0.20200326105947-214ff4480e93
6352
github.com/uber/jaeger-client-go v2.20.1+incompatible
6453
github.com/weaveworks/common v0.0.0-20200310113808-2708ba4e60a4
6554
go.etcd.io/bbolt v1.3.3
6655
go.etcd.io/etcd v0.0.0-20190709142735-eb7dd97135a5
6756
go.uber.org/atomic v1.5.0
68-
golang.org/x/net v0.0.0-20191112182307-2180aed22343
57+
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b
6958
golang.org/x/time v0.0.0-20191024005414-555d28b269f0
7059
google.golang.org/api v0.14.0
7160
google.golang.org/grpc v1.25.1
7261
gopkg.in/yaml.v2 v2.2.7
73-
k8s.io/client-go v12.0.0+incompatible // indirect
7462
sigs.k8s.io/yaml v1.1.0
7563
)
7664

0 commit comments

Comments
 (0)