Skip to content

Commit

Permalink
Remove unnecessary error check
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosdelest committed Jan 18, 2024
1 parent 3e5e3d2 commit ed6a514
Showing 1 changed file with 0 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -743,12 +743,6 @@ private void executeBulkRequestsByShard(Map<ShardId, List<BulkItemRequest>> requ
}

private void executeBulkShardRequest(BulkShardRequest bulkShardRequest, Releasable releaseOnFinish) {
if (bulkShardRequest.items().length == 0) {
// No requests to execute due to previous errors, terminate early
releaseOnFinish.close();
return;
}

client.executeLocally(TransportShardBulkAction.TYPE, bulkShardRequest, new ActionListener<>() {
@Override
public void onResponse(BulkShardResponse bulkShardResponse) {
Expand Down

0 comments on commit ed6a514

Please sign in to comment.