Skip to content

Commit ed899dc

Browse files
committed
Lint
1 parent f170628 commit ed899dc

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/inference/bulk/BulkInferenceExecutionState.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -59,18 +59,18 @@ public void onInferenceException(long seqNo, Exception e) {
5959
}
6060

6161
public long fetchProcessedSeqNo(int retry) throws InterruptedException, TimeoutException {
62-
while (retry > 0) {
63-
if (finished()) {
64-
return -1;
65-
}
66-
retry--;
67-
Long seqNo = processedSeqNoQueue.poll(1, TimeUnit.SECONDS);
68-
if (seqNo != null) {
69-
return seqNo;
70-
}
62+
while (retry > 0) {
63+
if (finished()) {
64+
return -1;
7165
}
66+
retry--;
67+
Long seqNo = processedSeqNoQueue.poll(1, TimeUnit.SECONDS);
68+
if (seqNo != null) {
69+
return seqNo;
70+
}
71+
}
7272

73-
throw new TimeoutException("timeout waiting for inference response");
73+
throw new TimeoutException("timeout waiting for inference response");
7474
}
7575

7676
public InferenceAction.Response fetchBufferedResponse(long seqNo) {

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/inference/bulk/BulkInferenceExecutor.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,8 @@ private void handleResponses(ActionListener<OutputType> listener, BulkInferenceE
9494
listener.onFailure(bulkExecutionState.getFailure());
9595
}
9696

97-
private void persistsInferenceResponses(BulkInferenceExecutionState bulkExecutionState) throws TimeoutException, InterruptedException {
97+
private void persistsInferenceResponses(BulkInferenceExecutionState bulkExecutionState) throws TimeoutException,
98+
InterruptedException {
9899
while (bulkExecutionState.finished() == false && bulkExecutionState.fetchProcessedSeqNo(INFERENCE_RESPONSE_TIMEOUT) >= 0) {
99100
long persistedSeqNo = bulkExecutionState.getPersistedCheckpoint();
100101

0 commit comments

Comments
 (0)