Open
Description
Compactor can fail to compact block with message like this:
msg="failed to compact user blocks" err="compaction: group 0@8712473450002685162: block with not healthy index found /data/compact/0@8712473450002685162/01EJEXEW6XQ37G17Q4JH9M2KF1; Compaction level 1; Labels: map[__org_id__:...]: 1/457844 series have an average of 1.000 out-of-order chunks: 0.000 of these are exact duplicates (in terms of data and time range)"
When this happens, compaction for given user will not continue, because compactor will retry to compact this block over and over, failing each time.
Upon further investigation, this is a 2h block produced by ingester. It's not clear why out-of-order chunks would be written. This is bug likely in Prometheus TSDB code.
Similar bugs in Thanos:
- How to fix Compactor out-of-order chunks? thanos-io/thanos#3442
- Compaction failing due to out-of-order chunks thanos-io/thanos#267
Workaround is to rename the block so that it's not included in the compaction.