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

Remove the ability to fsync on every operation and only schedule fsync task if really needed #16257

Merged
merged 2 commits into from Jan 27, 2016

Conversation

Projects
None yet
4 participants
@s1monw
Copy link
Contributor

s1monw commented Jan 27, 2016

This commit limits the index.translog.sync_interval to a value not less than 100ms and
removes the support for fsync on every operation which used to be enabled if index.translog.sync_interval was set to 0s
Now this pr also only schedules an async fsync if the durability is set to async. By default not async task is scheduled.

Closes #16152

Remove the ability to fsync on every operation and only schedule fsyn…
…c task if really needed

This commit limits the `index.translog.sync_interval` to a value not less than `100ms` and
removes the support for fsync on every operation which used to be enabled if `index.translog.sync_interval` was set to `0s`
Now this pr also only schedules an async fsync if the durability is set to `async`. By default not async task is scheduled.

Closes #16152
} else {
this.fsyncTask = null;
}
this.fsyncTask = indexSettings.getTranslogDurability() == Translog.Durability.REQUEST ? null : new AsyncTranslogFSync(this);

This comment has been minimized.

Copy link
@mikemccand

mikemccand Jan 27, 2016

Contributor

Maybe just call rescheduleFsyncTask here?

This comment has been minimized.

Copy link
@s1monw

s1monw Jan 27, 2016

Author Contributor

fair enough...


private void rescheduleFsyncTask(Translog.Durability durability) {
try {
IOUtils.closeWhileHandlingException(fsyncTask);

This comment has been minimized.

Copy link
@mikemccand

mikemccand Jan 27, 2016

Contributor

Hmm can we at least log any exception that came from here instead of suppressing?

@mikemccand

This comment has been minimized.

Copy link
Contributor

mikemccand commented Jan 27, 2016

LGTM

s1monw added a commit that referenced this pull request Jan 27, 2016

Merge pull request #16257 from s1monw/no_fsync_on_every_operation
Remove the ability to fsync on every operation and only schedule fsync task if really needed

@s1monw s1monw merged commit 1df7d4d into elastic:master Jan 27, 2016

1 check passed

CLA Commit author is a member of Elasticsearch
Details
@jpountz

This comment has been minimized.

Copy link
Contributor

jpountz commented Jan 27, 2016

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.