Avoid slow CI tests on MACOS_X using build flag #13276
Draft
+52
−4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Build with MACOS_IGNORE_FULLFSYNC=1 to build a version of RocksDB which does not define HAVE_FULLFSYNC and is therefore much faster at some intensive open/close operations, such as are often found in testing.
This addresses #13147 by providing the option to build tests which can run much faster IF the tests are not involved with e.g. crash recovery
DO NOT use this in production, or in performance testing. HAVE_FULLSYNC was introduced in
#9356 in order to prevent potential data loss / corruption issues
To invoke it, do this:
$ make clean jclean
$ MACOS_IGNORE_FULLFSYNC=1 make -j12 rocksdbjava
This turns off the default -DHAVE_FULLFSYNC (on Mac only) on platform detection, which has a huge cost on open/close heavy workloads (e.g. unit testing) due to very conservative flush safety - using
fcntl(fd_, F_FULLFSYNC)
.The same option is also added to cmake build to turn off FULLFSYNC on MacOS build