Internal: Remove (mostly) unused 'failure' member from ShardSearchFailure.
closes #6837 closes #6861
This commit is contained in:
parent
197ef0b205
commit
90d2cb7dd5
|
@ -43,23 +43,16 @@ public class ShardSearchFailure implements ShardOperationFailedException {
|
|||
private SearchShardTarget shardTarget;
|
||||
private String reason;
|
||||
private RestStatus status;
|
||||
private transient Throwable failure;
|
||||
|
||||
private ShardSearchFailure() {
|
||||
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Throwable failure() {
|
||||
return failure;
|
||||
}
|
||||
|
||||
public ShardSearchFailure(Throwable t) {
|
||||
this(t, null);
|
||||
}
|
||||
|
||||
public ShardSearchFailure(Throwable t, @Nullable SearchShardTarget shardTarget) {
|
||||
this.failure = t;
|
||||
Throwable actual = ExceptionsHelper.unwrapCause(t);
|
||||
if (actual != null && actual instanceof SearchException) {
|
||||
this.shardTarget = ((SearchException) actual).shard();
|
||||
|
|
|
@ -389,7 +389,7 @@ public class ExtendedStatsTests extends AbstractNumericTests {
|
|||
ShardSearchFailure[] failures = response.getShardFailures();
|
||||
if (failures.length != expectedFailures) {
|
||||
for (ShardSearchFailure failure : failures) {
|
||||
logger.error("Shard Failure: {}", failure.failure(), failure.toString());
|
||||
logger.error("Shard Failure: {}", failure.reason(), failure.toString());
|
||||
}
|
||||
fail("Unexpected shard failures!");
|
||||
}
|
||||
|
|
|
@ -361,7 +361,7 @@ public class StatsTests extends AbstractNumericTests {
|
|||
ShardSearchFailure[] failures = response.getShardFailures();
|
||||
if (failures.length != expectedFailures) {
|
||||
for (ShardSearchFailure failure : failures) {
|
||||
logger.error("Shard Failure: {}", failure.failure(), failure.toString());
|
||||
logger.error("Shard Failure: {}", failure.reason(), failure.toString());
|
||||
}
|
||||
fail("Unexpected shard failures!");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue