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

Change the default of ignore_deletion_mark_delay to 1h #892

Merged
merged 2 commits into from
Jan 26, 2022

Conversation

andyasp
Copy link
Contributor

@andyasp andyasp commented Jan 25, 2022

What this PR does:
Updates the default of -blocks_storage.bucket_store.ignore_deletion_marks_delay to 1h to put the default in line with how it is commonly set.

Which issue(s) this PR fixes:

Fixes https://github.com/grafana/mimir-squad/issues/485

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

@@ -51,7 +51,7 @@ Because of this, we would suggest to avoid querying non compacted blocks. In ord
3. Configure queriers `-querier.query-store-after` large enough to give compactor enough time to compact newly uploaded blocks (_see below_)
4. Configure queriers `-querier.query-ingesters-within` equal to `-querier.query-store-after` plus 5m (5 minutes is just a delta to query the boundary both from ingesters and queriers)
5. Configure ingesters `-blocks-storage.tsdb.retention-period` at least as `-querier.query-ingesters-within`
6. Lower `-blocks-storage.bucket-store.ignore-deletion-marks-delay` to 1h, otherwise non compacted blocks could be queried anyway, even if their compacted replacement is available
6. Ensure `-blocks-storage.bucket-store.ignore-deletion-marks-delay` is not too large (the default of 1h is suggested), otherwise non compacted blocks could be queried anyway, even if their compacted replacement is available
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Repeating the default value here felt like introducing a maintenance burden, but without anything to reference the sentence seemed ambiguous.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I agree with Andy, reason why we try to avoid mentioning default values in non-autogenerated doc (unless where mentioning the default is very valuable in the context).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I swapped the language to (the default is suggested) to avoid referencing the actual value.

@andyasp andyasp marked this pull request as ready for review January 25, 2022 19:45
# CLI flag: -blocks-storage.bucket-store.ignore-deletion-marks-delay
[ignore_deletion_mark_delay: <duration> | default = 6h]
Copy link
Contributor

Choose a reason for hiding this comment

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

this is unrelated to your change:

I noticed that there is a discrepancy between the cli flag and the yaml property:

-blocks-storage.bucket-store.ignore-deletion-marks-delay
ignore_deletion_mark_delay

note the mark/marks. I think that's something which could confuse a user, so I'm wondering if it would be worth it to fix that before the launch of Mimir. Now it's easier to make breaking changes than after the launch. WDYT? cc @09jvilla

Copy link
Member

Choose a reason for hiding this comment

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

We have more fields like that, and now would be a great time to fix them all.

Copy link
Collaborator

Choose a reason for hiding this comment

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

If we'll fix all of them, then we could enforce it in CI (eg. fail CI if any CLI flag doesn't reflect its YAML counterpart).

Copy link
Contributor

Choose a reason for hiding this comment

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

We have more fields like that, and now would be a great time to fix them all.

Do you remember any of them from the top of your head by chance?

I'll create an issue for it and then try to come up with a way to detect these discrepancies

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think you could list of all them doing an hack in the doc generator code. There for each CLI flag we know the YAML config, so we you can compare them (with some substitutions, like _ and -) and print when they're different.

Copy link
Contributor

Choose a reason for hiding this comment

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

Seems like a good idea to me to make this change here and for all flags and agreed now is the time to do it.

Copy link
Contributor

@09jvilla 09jvilla Jan 26, 2022

Choose a reason for hiding this comment

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

@replay can you create an issue for this consistent naming convention between CLI and yaml flags for tracking and add it to https://github.com/grafana/mimir-squad/issues/367 under the 'low hanging fruit we really want to get done if possible'? I think that list in this point is mostly becoming "we want this done by launch", but I'd say this isn't a launch blocker if we can't get it complete.

Copy link
Contributor

Choose a reason for hiding this comment

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

Created #901 and added it where you said

Copy link
Member

@pstibrany pstibrany left a comment

Choose a reason for hiding this comment

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

Looks good, thank you.

@@ -51,7 +51,7 @@ Because of this, we would suggest to avoid querying non compacted blocks. In ord
3. Configure queriers `-querier.query-store-after` large enough to give compactor enough time to compact newly uploaded blocks (_see below_)
4. Configure queriers `-querier.query-ingesters-within` equal to `-querier.query-store-after` plus 5m (5 minutes is just a delta to query the boundary both from ingesters and queriers)
5. Configure ingesters `-blocks-storage.tsdb.retention-period` at least as `-querier.query-ingesters-within`
6. Lower `-blocks-storage.bucket-store.ignore-deletion-marks-delay` to 1h, otherwise non compacted blocks could be queried anyway, even if their compacted replacement is available
6. Ensure `-blocks-storage.bucket-store.ignore-deletion-marks-delay` is not too large (the default of 1h is suggested), otherwise non compacted blocks could be queried anyway, even if their compacted replacement is available
Copy link
Collaborator

Choose a reason for hiding this comment

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

I agree with Andy, reason why we try to avoid mentioning default values in non-autogenerated doc (unless where mentioning the default is very valuable in the context).

# CLI flag: -blocks-storage.bucket-store.ignore-deletion-marks-delay
[ignore_deletion_mark_delay: <duration> | default = 6h]
Copy link
Collaborator

Choose a reason for hiding this comment

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

If we'll fix all of them, then we could enforce it in CI (eg. fail CI if any CLI flag doesn't reflect its YAML counterpart).

@andyasp andyasp force-pushed the aasp/ignore-deletion-mark-delay branch from 64099e2 to 4ba930a Compare January 26, 2022 17:11
Copy link
Contributor

@replay replay left a comment

Choose a reason for hiding this comment

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

This looks good to me, thanks Andy!

@replay replay merged commit 37e3816 into main Jan 26, 2022
@replay replay deleted the aasp/ignore-deletion-mark-delay branch January 26, 2022 19:07
@pracucci pracucci mentioned this pull request Jan 27, 2022
3 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.

5 participants