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

Add `wait_if_ongoing` option to _flush requests #6996

Merged
merged 1 commit into from Jul 24, 2014

Conversation

Projects
None yet
4 participants
@s1monw
Copy link
Contributor

s1monw commented Jul 23, 2014

This commit adds the ability to force blocking on the flush operaition
to make sure all files have been written and synced to disk. Without
this option a flush might be executing at the same time causing the
current flush to fail and return before all files being synced.

@kimchy

View changes

src/main/java/org/elasticsearch/action/admin/indices/flush/FlushRequestBuilder.java Outdated
@@ -46,4 +46,9 @@ public FlushRequestBuilder setForce(boolean force) {
protected void doExecute(ActionListener<FlushResponse> listener) {
client.flush(request, listener);
}

public FlushRequestBuilder waitIfOngoing(boolean waitIfOngoing) {

This comment has been minimized.

Copy link
@kimchy

kimchy Jul 23, 2014

Member

should be `setWaitIfOngoing"

This comment has been minimized.

Copy link
@s1monw

s1monw Jul 23, 2014

Author Contributor

good point

@kimchy

This comment has been minimized.

Copy link
Member

kimchy commented Jul 23, 2014

LGTM, really minor comment

@s1monw

This comment has been minimized.

Copy link
Contributor Author

s1monw commented Jul 23, 2014

pushed a new commit @clintongormley can you take a look at the doc / spec changes?

@s1monw s1monw added the review label Jul 23, 2014

@clintongormley

View changes

docs/reference/indices/flush.asciidoc Outdated

`wait_if_ongoing`:: If set to `true` the flush operation will block until the
flush can be executed if another flush operation is already executing.
The default is `false` and will cause and exception to be thrown on a

This comment has been minimized.

Copy link
@clintongormley

clintongormley Jul 24, 2014

Member

"an" exception

@clintongormley

View changes

docs/reference/indices/flush.asciidoc Outdated
`wait_if_ongoing`:: If set to `true` the flush operation will block until the
flush can be executed if another flush operation is already executing.
The default is `false` and will cause and exception to be thrown on a
shard level if another flush operation is already running.

This comment has been minimized.

Copy link
@clintongormley

clintongormley Jul 24, 2014

Member

on "the" shard level

@clintongormley

View changes

docs/reference/indices/flush.asciidoc Outdated
should be incremented even if no uncommitted changes are present.
(This setting can be considered as internal)

`wait_if_ongoing`:: If set to `true` the flush operation will block until the

This comment has been minimized.

Copy link
@clintongormley

clintongormley Jul 24, 2014

Member

Move this option to the top, as it is the only non-internal one

@clintongormley

This comment has been minimized.

Copy link
Member

clintongormley commented Jul 24, 2014

Added doc comments

@s1monw

This comment has been minimized.

Copy link
Contributor Author

s1monw commented Jul 24, 2014

@clintongormley pushed a new commit

@clintongormley

This comment has been minimized.

Copy link
Member

clintongormley commented Jul 24, 2014

LGTM

Add `wait_if_ongoing` option to _flush requests
This commit adds the ability to force blocking on the flush operaition
to make sure all files have been written and synced to disk. Without
this option a flush might be executing at the same time causing the
current flush to fail and return before all files being synced.

Closes #6996

@s1monw s1monw merged commit bd51d7a into elastic:master Jul 24, 2014

s1monw added a commit that referenced this pull request Jul 24, 2014

Add `wait_if_ongoing` option to _flush requests
This commit adds the ability to force blocking on the flush operaition
to make sure all files have been written and synced to disk. Without
this option a flush might be executing at the same time causing the
current flush to fail and return before all files being synced.

Closes #6996

@jpountz jpountz removed the review label Jul 29, 2014

@clintongormley clintongormley changed the title Add `wait_if_ongoing` option to _flush requests Flush: Add `wait_if_ongoing` option to _flush requests Sep 8, 2014

@s1monw s1monw deleted the s1monw:wait_if_ongoing branch Oct 12, 2014

@clintongormley clintongormley changed the title Flush: Add `wait_if_ongoing` option to _flush requests Add `wait_if_ongoing` option to _flush requests Jun 7, 2015

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.