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

Use our fork of bbolt to improve freelist performance #24010

Merged
merged 5 commits into from Nov 21, 2023

Conversation

ncabatoff
Copy link
Collaborator

We want to adopt etcd-io/bbolt#585 before it appears in an official bbolt release.

Note that we're not modifying raft-boltdb yet, so raft.db (the bbolt file containing the raft log) doesn't benefit.

@github-actions github-actions bot added the hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed label Nov 3, 2023
@ncabatoff
Copy link
Collaborator Author

I should note that this is also an upgrade from 1.3.7 to 1.3.8, it's not only a backport of the freelist fix.

Copy link

github-actions bot commented Nov 3, 2023

CI Results:
All Go tests succeeded! ✅

Copy link

github-actions bot commented Nov 6, 2023

Build Results:
All builds succeeded! ✅

@ncabatoff ncabatoff added backport/1.13.x Backport changes to `release/1.13.x` backport/1.14.x Backport changes to `release/1.14.x` backport/1.15.x Backport changes to `release/1.15.x` labels Nov 17, 2023
Copy link
Contributor

@hghaf099 hghaf099 left a comment

Choose a reason for hiding this comment

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

LGTM!

// is, assuming it can be parsed as an int. Bolt itself sets this to 0 by default,
// so if users are wanting to turn this off, they can also set it to 0. Setting it
// to a negative value is the same as not setting it at all.
if os.Getenv("VAULT_RAFT_INITIAL_MMAP_SIZE") == "" {
Copy link
Contributor

Choose a reason for hiding this comment

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

super nit: is there a reason that we are not following the same pattern as the above two options? Like setting the default in the instantiation of the struct, then consider overwriting it if the env var is set? Is the reason to have the comment on top of this line?

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, I see there is similar implementation in boltOptions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/1.13.x Backport changes to `release/1.13.x` backport/1.14.x Backport changes to `release/1.14.x` backport/1.15.x Backport changes to `release/1.15.x` hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants