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

Allow controlling max manifests per content with env var #388

Merged
merged 9 commits into from
Sep 6, 2024

Conversation

ashmrtn
Copy link
Collaborator

@ashmrtn ashmrtn commented Sep 5, 2024

Allow adjustments to the max number of manifests per content piece through the use of an environment variable

Allow setting the max number of manifests per content piece during
compaction using an env var.
@ashmrtn ashmrtn self-assigned this Sep 5, 2024

mgr := newManagerForTesting(ctx, t, data, ManagerOptions{})
for _, test := range table {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

simplest to view with whitespace disabled

@ashmrtn
Copy link
Collaborator Author

ashmrtn commented Sep 6, 2024

🤔 race detector tests failed in CI and locally when running the same command, but the reason they failed is signal: killed. I don't think this is an actual race condition, but some issue with the setup, like memory usage and tests running in parallel. I did run the full set of race tests locally when I freed up some memory on my dev machine

Default to having the feature off if the env var isn't set or is set to
a value that is <= 0. This makes things a bit safer since it requires
explicit configuration to enable.

Also be more careful about the types being used to contain values since
we're parsing data from a string which may make different assumptions
about integer widths. This also adds a layer of protection in some sense
since values larger than maxInt64 will overflow to a negative value and
result in the feature being disabled instead of writing out 1 manifest
per content piece.
This should also fix race detector failures in CI since we no longer
need to write out as many manifests.
Copy link

@pandeyabs pandeyabs left a comment

Choose a reason for hiding this comment

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

🏁

@ashmrtn ashmrtn merged commit 9e18afb into corsostaging Sep 6, 2024
5 of 8 checks passed
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