Skip to content

Commit

Permalink
log exception
Browse files Browse the repository at this point in the history
Signed-off-by: Anshu Agarwal <anshukag@amazon.com>
  • Loading branch information
Anshu Agarwal committed Jan 9, 2023
1 parent ef961bd commit 97ea739
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,9 @@ public SearchShardTarget findNext(final SearchShardIterator shardIt) {
while (next != null && isWeighedAway(next.getNodeId())) {
SearchShardTarget nextShard = next;
if (canFailOpen(nextShard.getShardId())) {
logger.info(() -> new ParameterizedMessage("{}: Fail open executed", nextShard.getShardId()));
logger.info(
() -> new ParameterizedMessage("{}: Fail open executed due to exception {}", nextShard.getShardId(), exception)
);
break;
}
next = shardIt.nextOrNull();
Expand All @@ -129,7 +131,7 @@ public ShardRouting findNext(final ShardsIterator shardsIt) {
while (next != null && isWeighedAway(next.currentNodeId())) {
ShardRouting nextShard = next;
if (canFailOpen(nextShard.shardId())) {
logger.info(() -> new ParameterizedMessage("{}: Fail open executed", nextShard.shardId()));
logger.info(() -> new ParameterizedMessage("{}: Fail open executed due to exception {}", nextShard.shardId(), exception));
break;
}
next = shardsIt.nextOrNull();
Expand Down

0 comments on commit 97ea739

Please sign in to comment.