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

Avoid slow CI tests on MACOS_X using build flag #13276

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

alanpaxton
Copy link
Contributor

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

Build with MACOS_IGNORE_FULLFSYNC=1 to build a version of Roc ksDB which does not HAVE_FULLFSYNC and is therefore much faster at some intensive open/close operations, such as are often found in testing.

DO NOT use this in production, or in performance testing.

e.g
$ 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 testing due to very conservative flush safety - using `fcntl(fd_, F_FULLFSYNC)`

Same option is also added to cmake build to turn off FULLFSYNC on MacOS build
@alanpaxton alanpaxton marked this pull request as draft January 7, 2025 09:11
@alanpaxton alanpaxton force-pushed the eb/avoid-fullsync-for-macos-testing branch from 6a95811 to 1007e53 Compare January 7, 2025 11:32
@alanpaxton alanpaxton force-pushed the eb/avoid-fullsync-for-macos-testing branch from 1007e53 to bc9a9ce Compare January 7, 2025 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants