Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ public class BulkInferenceExecutionState {
private final Map<Long, InferenceAction.Response> bufferedResponses;
private final AtomicBoolean finished = new AtomicBoolean(false);

public BulkInferenceExecutionState(int bufferSize) {
this.bufferedResponses = new ConcurrentHashMap<>(bufferSize);
public BulkInferenceExecutionState() {
this.bufferedResponses = new ConcurrentHashMap<>();
}

/**
Expand Down Expand Up @@ -125,7 +125,7 @@ public void addFailure(Exception e) {
* Indicates whether the entire bulk execution is marked as finished and all responses have been successfully persisted.
*/
public boolean finished() {
return finished.get() && getMaxSeqNo() == getPersistedCheckpoint();
return hasFailure() || (finished.get() && getMaxSeqNo() == getPersistedCheckpoint());
}

/**
Expand Down
Loading