Merge pull request #15952 from brwe/fix-cicular-reference-exception
Avoid circular reference in exception
This commit is contained in:
commit
87f0edbf51
|
@ -576,7 +576,11 @@ public class Translog extends AbstractIndexShardComponent implements IndexShardC
|
|||
if (current.getTragicException() != null) {
|
||||
try {
|
||||
close();
|
||||
} catch (AlreadyClosedException inner) {
|
||||
// don't do anything in this case. The AlreadyClosedException comes from TranslogWriter and we should not add it as suppressed because
|
||||
// will contain the Exception ex as cause. See also https://github.com/elastic/elasticsearch/issues/15941
|
||||
} catch (Exception inner) {
|
||||
assert (ex != inner.getCause());
|
||||
ex.addSuppressed(inner);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue