Skip to content

Commit f04ff7e

Browse files
committed
Comments
1 parent 4f5f53d commit f04ff7e

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

core/src/main/java/org/elasticsearch/index/shard/IndexShard.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -360,8 +360,8 @@ public void updatePrimaryTerm(final long newPrimaryTerm) {
360360
assert newPrimaryTerm > primaryTerm :
361361
"primary terms can only go up; current term [" + primaryTerm + "], new term [" + newPrimaryTerm + "]";
362362
/*
363-
* Before this call returns, we are guarantee that all future operations are delayed and so this happens before we increment
364-
* the primary term.
363+
* Before this call returns, we are guaranteed that all future operations are delayed and so this happens before we
364+
* increment the primary term.
365365
*/
366366
indexShardOperationPermits.asyncBlockOperations(
367367
30,

core/src/main/java/org/elasticsearch/index/shard/IndexShardOperationPermits.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,8 @@ <E extends Exception> void syncBlockOperations(
107107
/**
108108
* Immediately delays operations and on another thread waits for in-flight operations to finish and then executes {@code onBlocked}
109109
* under the guarantee that no new operations are started. Delayed operations are run after {@code onBlocked} has executed. After
110-
* operations are delayed and the blocking is forked to another thread, returns to the caller.
110+
* operations are delayed and the blocking is forked to another thread, returns to the caller. If a failure occurs while blocking
111+
* operations or executing {@code onBlocked} then the {@code onFailure} handler will be invoked.
111112
*
112113
* @param timeout the maximum time to wait for the in-flight operations block
113114
* @param timeUnit the time unit of the {@code timeout} argument

0 commit comments

Comments
 (0)