Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upclean_tombstone not removing old job labels #3728
Comments
gouthamve
referenced this issue
Jan 25, 2018
Closed
Clean Tombstones doesn't remove data from HeadBlock #266
This comment has been minimized.
This comment has been minimized.
|
Thanks for the detailed report, I can replicate the issue and I think the reason is that we are not currently cleaning up data from the in-mem block and hence are returning the data. Without diving too much into code, I think removing the data and calling @codesome You can look into this for the next issue. |
This comment has been minimized.
This comment has been minimized.
|
Sure @gouthamve, I am on it now. |
This comment has been minimized.
This comment has been minimized.
|
@fabxc @gouthamve I came up with 2 solutions. When clearing tombstones
Please let me know if solution (1) is fine. As I don't expect clearing tombstones to be very frequent, persisting might be fine, as it will be compacted later on anyway. |
This comment has been minimized.
This comment has been minimized.
|
Clean tombtomes should have no semantic impact, do we need to be considering the tombstones in more places? |
This comment has been minimized.
This comment has been minimized.
|
@codesome I think it should be 2. @brian-brazil I am not sure what you mean by semantic impact... It should be removing data from headblock and part of that is the series info, and that is not happening. |
This comment has been minimized.
This comment has been minimized.
|
@gouthamve I guess (1) has semantic impact. It is doing more than what it needs to do: flushing in-mem block, which is not desired from PR for (2) soon |
codesome
referenced this issue
Jan 28, 2018
Merged
Head: don't create stones, delete samples directly #270
This comment has been minimized.
This comment has been minimized.
If /clean_tombstones is changing the results of any of the HTTP query API, that's a semantic effect. |
This comment has been minimized.
This comment has been minimized.
|
Not sure if this was supposed to be fixed in 2.2.0, but I tried the release candidate anyway, and it's still leaving these tombstones behind. |
This comment has been minimized.
This comment has been minimized.
|
@keithf4 it has been kept on hold till 2.2.0 is released, hence wont be fixed in 2.2.0. |
This comment has been minimized.
This comment has been minimized.
|
I understand this is "not-as-easy-as-it-looks" but this now 3 minor version releases with no updates or fixes to this. Any word on when we can finally be able to clear out old job names for things like Grafana or anything that scrapes that info to make dynamic interfaces? |
This comment has been minimized.
This comment has been minimized.
|
@keithf4 |
This comment has been minimized.
This comment has been minimized.
|
fixed in prometheus/tsdb#270 will be added to the new Prom release. |
keithf4 commentedJan 23, 2018
Trying out the new clean_tombstones API in 2.1 to try and get rid of old data, it only seems to partially be working. Referencing another ticket (#3584), I thought this new clean method would get rid of old job labels if they contained no data. I've done the below several times testing it out, and while it does appear to clean up the data, the old job label is not removed even if no data exists for it. Not sure if I have to wait longer or something, but I was hoping to get back the same functionality that existed pre-2.0 for cleaning up old jobs where a single run of a script could clean up everything quickly.
Prometheus data directory size before tombstone cleanup:
315MB/322048KBI've got two targets (Prod & Replica).
Query to show that Replica data does exist
This shows that I've removed the Replica target from prometheus so no further data will be collected for it.
Delete all Replica data
Same query above now returns no data
Query looking for any Replica data returns nothing
clean_tombstones returns successful
Prometheus data directory size after tombstone cleanup is definitely smaller, so assuming data was cleared from disk:
307MB/313560KBBut Label is still there:
Waited a while to ensure no new data, did the clean again and label is still there