cortex icon indicating copy to clipboard operation
cortex copied to clipboard

Compactor: Clean up file is not block visit marker log when using S3 bucket

Open yeya24 opened this issue 1 year ago • 5 comments

Describe the bug When using S3 bucket client, there are excessive logs in Compactor saying file is not block visit marker during iter operation.

err="file is not block visit marker" operation="Iter

The error is thrown at https://github.com/cortexproject/cortex/blob/master/pkg/compactor/blocks_cleaner.go#L466. When trying to clean up partial blocks, we return this error when compactor finds a non visit marker file to terminate iteration early.

However, even though the error is expected, the error still got returned from the bucket client. When using S3 client, it will be retried and eventually the error will be logged at https://github.com/cortexproject/cortex/blob/master/pkg/storage/bucket/s3/bucket_client.go#L135.

To Reproduce Steps to reproduce the behavior:

  1. Start Cortex 1.16.0 Compactor

Expected behavior There shouldn't be any logs for file is not block visit marker as it is not an error.

yeya24 avatar Feb 27 '24 19:02 yeya24

I opened https://github.com/thanos-io/objstore/pull/103 to fix this issue

yeya24 avatar Feb 27 '24 21:02 yeya24

Hi @yeya24! Can this issue be affecting compactor performance? I get this log message a lot and it feels like compactor is not doing it's job as I often get "bucket index is too old" errors

kryachkov avatar Jun 24 '24 13:06 kryachkov

Hi @kryachkov, for this error specifically the answer is no. It is just annoying as it updates the failure counter even though the error is expected.

Regarding the issue you encountered, I think it is mainly relevant to your setting. Try increase your bucket index max stale time and block upload time. It could be also related to your object storage performance if you have a large amount of objects in your bucket. But I think the issue was fixed in the latest 1.17.0 release.

yeya24 avatar Jun 24 '24 16:06 yeya24

Still happening in v1.18.1

ts=2024-12-10T10:09:31.527783067Z caller=bucket_client.go:141 level=error msg="bucket operation fail after retries" err="file is not block visit marker" operation="Iter tenant-1/01JEMEWYHEEY2KEGSJ0Z1H5NHE"

friedrichg avatar Dec 10 '24 10:12 friedrichg

This issue has been automatically marked as stale because it has not had any activity in the past 60 days. It will be closed in 15 days if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Apr 26 '25 18:04 stale[bot]