receive: add --tsdb.flush-blocks-on-shutdown flag#8753
receive: add --tsdb.flush-blocks-on-shutdown flag#8753prymitive wants to merge 3 commits intothanos-io:mainfrom
Conversation
By default Receive will flush (write to disk and/or upload to S3) on shutdown. This takes ages and we don't need it at all because we run Thanos on bare metal. Allow this to be configurable since this feature seems to be aimed mostly at environments like k8s, where instances ephemeral. Signed-off-by: Lukasz Mierzwa <lukasz@cloudflare.com>
a127638 to
3d837b3
Compare
Signed-off-by: Lukasz Mierzwa <lukasz@cloudflare.com>
524cc51 to
c3b54bd
Compare
GiedriusS
left a comment
There was a problem hiding this comment.
How to do maintenance on physical servers without dumping blocks on shut down? Is there any API you use or how do you do it? Please elaborate.
I don’t think I follow. |
| histograms. This flag is a no-op now and will | ||
| be removed in the future. Native histogram | ||
| ingestion is always enabled. | ||
| --tsdb.flush-blocks-on-shutdown |
There was a problem hiding this comment.
I tried to run make docs but that made a ton of changes to a lot of files.
Either my local clone did something wrong or all docs are very stale.
There was a problem hiding this comment.
Lets ignore the docs check, ill add a followup PR to sync the docs.
There was a problem hiding this comment.
that was my laptop, had older thanos binary in my PATH and make build puts binaries in go/bin for some reason
With replication factor 1 or 2 (or any other RF really) and with this flag enabled, how to wipe/destroy a server without losing any recently written data? |
I imagine that you would:
|
So, at that point, you only have to do very few checks before shutting down because all uploads have already succeeded, no? |
In a theoretical scenario that I haven't actually tried, yes. |
By default Receive will flush (write to disk and/or upload to S3) on shutdown. This takes ages and we don't need it at all because we run Thanos on bare metal. Allow this to be configurable since this feature seems to be aimed mostly at environments like k8s, where instances ephemeral.
Changes
Verification