-
-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
libeatmydata 130 (new formula) #106536
libeatmydata 130 (new formula) #106536
Conversation
It works fine - it actually has no user visible changes - it prevents datasync/fsync calls from working - instead they finish instantly. For the canonical example: time mysql-test-run --do-test=innodb time eatmydata mysql-test-run --do-test=innodb So we save more than a third of the time, but a crash or interruption in power would most likely corrupt the database - the most common use case is accelerating a CI/CD process or a "make test" where the data is ephemeral making the integrity of the data itself on disks unimportant. The tool doesn't require root at all - it works fine as any user. The test to verify it is actually working is what requires root on macOS. As you can see, no sync when eatmydata is used. On MacOS, I'd normally use dtrace to test it's working, as I would on FreeBSD and Solaris and OpenIndiana - macOS only allows DTrace calls as root (I typo's and used strace instead of sync, but that's irrelevant to illustrate the problem): So, it works just fine on MacOS - it just can't be easily automatically tested without elevated privileges. I could write a test in C that depends on some differences between libeatmydata sync() and OS sync() to detect if libeatmydata sync is working, but this would be more brittle and more opaque than what I have now. Almost all of the shell script test in the formula is error checking to give different exit status levels to report exactly why it failed. Removing these checks and giving a simple "pass" (0) or "fail" (non-zero) would probably result in a one-liner. If you know any other system call tracing facility on MacOS that doesn't require elevated privileges, I'll use it - I'm most familiar with Solaris, and luckily MacOS includes dtrace, inherited from FreeBSD. I checked the upstream tests - they use dtrace's dtruss too. |
We can just run |
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.
Thanks!
Making good progress going through my ~/.local/bin and getting what I use all the time that's not already in brew - but should - be added. :) Hopefully the rest will be easy, and sorry to subject you to my Ruby learning experience. |
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.
Thanks for your recent contributions and activity @johnsonjh! Just a few thoughts here.
I noticed another small problem - the oldest version of MacOS supported by Brew doesn't support the I'll report this upstream as well. |
|
Should be GTG (hopefully) |
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. @alebcay?
brew install --build-from-source <formula>
, where<formula>
is the name of the formula you're submitting?brew test <formula>
, where<formula>
is the name of the formula you're submitting?brew audit --strict <formula>
(after doingbrew install --build-from-source <formula>
)? If this is a new formula, does it passbrew audit --new <formula>
?libeatmydata 130 (new formula)