Only fsync if there are waiters #68

Merged
merged 1 commit into from Sep 22, 2011

Projects

None yet

2 participants

Contributor

In the case of async fsync, currently we end up fsync-ing every timer period, even if nothing happened since the last time (so if you run fs_usage, you see a constant stream of fsync's even on an idle server, and for short syncJournal settings it's a lot of extra system calls, even though it's not actually hitting the disk). So this adds a check to fix that.

There's also a small re-ordering of the exception handling, so that if an IOException happens as part of fulfilling a Future, we don't mistake that for an exception during writer.force(), and set it on the other Futures.

Contributor
robey commented Sep 22, 2011

nice!

@robey robey merged commit 8b4b8f6 into twitter-archive:master Sep 22, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment