Skip to content

Introduce a meta fetcher that synchronize filtered metadata locally #2381

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

Merged
merged 4 commits into from
Sep 11, 2023

Conversation

cyriltovena
Copy link
Contributor

@cyriltovena cyriltovena commented Sep 8, 2023

Also introduces markers for deletions

Most of the code is adapted from Mimir.

@cyriltovena cyriltovena marked this pull request as ready for review September 8, 2023 13:16
@cyriltovena cyriltovena requested a review from a team as a code owner September 8, 2023 13:16
Copy link
Collaborator

@kolesnikovae kolesnikovae left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment on lines +226 to +232
// todo(cyriltovena): we should use ReaderWithExpectedErrs(f.bkt.IsObjNotFoundErr) here, to avoid counting IsObjNotFoundErr as an error
// since this is expected
r, err := f.bkt.Get(ctx, metaFile)
if f.bkt.IsObjNotFoundErr(err) {
// Meta.json was deleted between bkt.Exists and here.
return nil, errors.Wrapf(ErrorSyncMetaNotFound, "%v", err)
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess it should be fine. The only caller is fetchMetadata which does handle ErrorSyncMetaNotFound error properly so we probably don't have to do anything special here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah the original code was doing this, mostly for metrics, which is not urgent, but I think I can roll it back I was able to make ReaderWithExpectedErrs work I think

@cyriltovena cyriltovena merged commit 4333475 into main Sep 11, 2023
@cyriltovena cyriltovena deleted the feat/meta-fetcher branch September 11, 2023 06:38
@cyriltovena cyriltovena mentioned this pull request Sep 29, 2023
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants