-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Add InitialMmapSize to bolt options #13178
Conversation
I don't understand the package build failures, but it's suspicious that all the failing ones are 32-bit targets. |
@ncabatoff I tried compiling this on my 32bit VM and it errored on this line: So it appears that I need to re-work this to use platform specific build tags instead. |
I'm also not sure if this requires a changelog or not, since it's not a user visible change. Thoughts? |
My position is that if a change affects the compiled binary, it deserves a changelog. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but you have failing tests
https://hashicorp.atlassian.net/browse/VAULT-2552
Since we're rapidly accumulating options that we want to share between raft.db and vault.db, I refactored the
freelistOptions()
function to be more generallyboltOptions()
. I'm usingstrconv.IntSize
to determine whether we're on a 32bit or 64bit architecture, since we only want the InitialMmapSize to be set for 64bit platforms. I'm including a few screenshots here of a simple program I wrote to test that this works the way I think it should.This is the program in its entirety, running locally on my MBP.

This is the same program, running on 32bit Debian Linux, in a VM.

In addition to the program and its output, I also included the output of a few different utilities, in an effort to demonstrate that this VM is really running 32bit Linux.
I also included a few tests, one 32 bit specific, to make sure that we're not setting InitialMmapSize on 32bit platforms.