Skip to content
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

compact:debug meta files are never deleted #3397

Closed
Shadi opened this issue Nov 3, 2020 · 13 comments
Closed

compact:debug meta files are never deleted #3397

Shadi opened this issue Nov 3, 2020 · 13 comments
Labels

Comments

@Shadi
Copy link

Shadi commented Nov 3, 2020

Thanos, Prometheus and Golang version used:

Thanos: quay.io/thanos/thanos:v0.15.0
Prometheus: quay.io/prometheus/prometheus:v2.22.0

Object Storage Provider: Dell ECS

What happened:
We have a preview thanos deployment that we use with our preview clusters, I was looking at one of the S3 buckets that the sidecars upload to and found out that the $(bucket)/debug folder has a lot of files, much more than the number of objects in the s3 bucket, the retention in the compactor for this bucket is set to 3 months for the 3 retention flags, but looking at some of the meta files they are for blocks that are more than 1 year old now, for example:

"ulid": "01DPJDWX5QWGN99VA2CJMRRAR1",
	"minTime": 1567159200000,
	"maxTime": 1567180800000,
	"stats": {
		"numSamples": 11395469,
		"numSeries": 16123,
		"numChunks": 95231
	},
	"compaction": {
		"level": 38571,
		"sources": [
			"01DKH9RY2JTXYRNGRZ2TW4H4SW",
			"01DKHGMN9DP36NF94JCX31KAA3",
			"01DKHQGCJ1AY7K7VQQX3AB316M"
		],
		"parents": [
			{
				"ulid": "01DPJDW8ETX65KVVXHANAG0KNQ",
				"minTime": 1567159200000,
				"maxTime": 1567180800000
			}
		]
	}

that is from Friday, August 30, 2019, which lead me to believe that the debug meta files might not get deleted, I looked a little bit at the code and I can see the files get created on upload:
https://github.com/thanos-io/thanos/blob/master/pkg/block/block.go#L94

but only the meta file in the block directory is deleted, DebugMetas not used anywhere in the Delete function inside that package:
https://github.com/thanos-io/thanos/blob/master/pkg/block/block.go#L167

What you expected to happen:
Debug meta file is deleted when the block is outside of retention window

How to reproduce it (as minimally and precisely as possible):
Set compactor retention to a value smaller than the current value, after the block object gets deleted the debug meta file will still be there.

@bwplotka
Copy link
Member

bwplotka commented Nov 3, 2020

That's correct, what do you propose? (:

This is really for debug, but was not proven to be very useful. Let's discuss and decide what to do 🤔

@Shadi
Copy link
Author

Shadi commented Nov 3, 2020

I think the deletion call can mirror the Upload call and delete the file after deleting the meta file that is part of the block directory.

@GiedriusS
Copy link
Member

Maybe let's bring this up on the next community call? (:

@Shadi
Copy link
Author

Shadi commented Nov 4, 2020

Hi @GiedriusS, I don't know if the question is directed at me or someone else, I'm fine with that :) its a small issue and in worst case the files can be cleaned up offline by a separate tool if they become an issue.

@stale
Copy link

stale bot commented Jan 3, 2021

Hello 👋 Looks like there was no activity on this issue for the last two months.
Do you mind updating us on the status? Is this still reproducible or needed? If yes, just comment on this PR or push a commit. Thanks! 🤗
If there will be no activity in the next two weeks, this issue will be closed (we can always reopen an issue if we need!). Alternatively, use remind command if you wish to be reminded at some point in future.

@stale stale bot added the stale label Jan 3, 2021
@Shadi
Copy link
Author

Shadi commented Jan 5, 2021

Still reproducible

@stale
Copy link

stale bot commented Mar 16, 2021

Hello 👋 Looks like there was no activity on this issue for the last two months.
Do you mind updating us on the status? Is this still reproducible or needed? If yes, just comment on this PR or push a commit. Thanks! 🤗
If there will be no activity in the next two weeks, this issue will be closed (we can always reopen an issue if we need!). Alternatively, use remind command if you wish to be reminded at some point in future.

@stale stale bot added the stale label Mar 16, 2021
@GiedriusS GiedriusS removed the stale label Apr 1, 2021
@stale
Copy link

stale bot commented Jun 2, 2021

Hello 👋 Looks like there was no activity on this issue for the last two months.
Do you mind updating us on the status? Is this still reproducible or needed? If yes, just comment on this PR or push a commit. Thanks! 🤗
If there will be no activity in the next two weeks, this issue will be closed (we can always reopen an issue if we need!). Alternatively, use remind command if you wish to be reminded at some point in future.

@stale stale bot added the stale label Jun 2, 2021
@stale
Copy link

stale bot commented Jun 16, 2021

Closing for now as promised, let us know if you need this to be reopened! 🤗

@stale stale bot closed this as completed Jun 16, 2021
@jphx
Copy link

jphx commented Sep 29, 2021

I've observed this problem also. A fix would be appreciated.

@GiedriusS GiedriusS reopened this Sep 29, 2021
@stale stale bot removed the stale label Sep 29, 2021
@stale
Copy link

stale bot commented Jan 9, 2022

Hello 👋 Looks like there was no activity on this issue for the last two months.
Do you mind updating us on the status? Is this still reproducible or needed? If yes, just comment on this PR or push a commit. Thanks! 🤗
If there will be no activity in the next two weeks, this issue will be closed (we can always reopen an issue if we need!). Alternatively, use remind command if you wish to be reminded at some point in future.

@stale stale bot added the stale label Jan 9, 2022
@GiedriusS GiedriusS removed the stale label Jan 10, 2022
@stale
Copy link

stale bot commented Apr 17, 2022

Hello 👋 Looks like there was no activity on this issue for the last two months.
Do you mind updating us on the status? Is this still reproducible or needed? If yes, just comment on this PR or push a commit. Thanks! 🤗
If there will be no activity in the next two weeks, this issue will be closed (we can always reopen an issue if we need!). Alternatively, use remind command if you wish to be reminded at some point in future.

@stale stale bot added the stale label Apr 17, 2022
@GiedriusS
Copy link
Member

We don't upload them anymore hence closing. #5110

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants