Skip to content

Commit

Permalink
Add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosdelest committed Dec 22, 2023
1 parent 7f28aba commit a0a7b58
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -720,11 +720,14 @@ private void performInferenceAndExecute(BulkShardRequest bulkShardRequest, Clust
Map<String, Set<String>> fieldsForModels = clusterState.metadata()
.index(bulkShardRequest.shardId().getIndex())
.getFieldsForModels();
// No inference fields? Just execute the request
if (fieldsForModels.isEmpty()) {
executeBulkShardRequest(bulkShardRequest, releaseOnFinish);
}

Runnable onInferenceComplete = () -> {
// We need to remove items that have had an inference error, as the response will have been updated already
// and we don't need to process them further
BulkShardRequest errorsFilteredShardRequest = new BulkShardRequest(
bulkShardRequest.shardId(),
bulkRequest.getRefreshPolicy(),
Expand Down

0 comments on commit a0a7b58

Please sign in to comment.