-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Fix badger builds on 32 bit machines #1397
Comments
Related to #1384 |
Would like to look into this issue if no one is looking at it. Thanks! |
@hiepd feel free to pick it up. |
Github issues have been deprecated. |
Hey @hiepd did you already have a chance to look into this? |
@slyon i haven't looked at the issue 🙂 |
I have looked at the issue, and have been able to get tests to pass by requesting smaller amounts of memory from mmap when running 32bit tests. This can be done conditionally compiling a value for the log file size: // +build 368
package badger
// Log file size when running tests on 32bit system.
const testOptionLogFileSize = 1<<26 - 1 Note: Then, set this as a test option: func getTestOptions(dir string) Options {
opt := DefaultOptions(dir).
WithMaxTableSize(1 << 15). // Force more compaction.
WithLevelOneSize(4 << 15). // Force more compaction.
WithSyncWrites(false)
if !*mmap {
return opt.WithValueLogLoadingMode(options.FileIO)
}
return opt.WithValueLogFileSize(testOptionLogFileSize)
} There are a number of other places where tests use This change allows all the tests to pass that were previously failing, due to mmap not being able to allocate the requested memory. However, results varied per test system, and the value may need to be adjusted. |
Badger tests fail reliably on 32 bit machines and they need to be fixed.
The builds were enabled in #1392 but the build is failing currently.
Most of the failures have the following pattern
See https://travis-ci.org/github/dgraph-io/badger/jobs/703596743 for failed 32 bit build.
The text was updated successfully, but these errors were encountered: