mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-09 14:34:43 +00:00
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…
x
Reference in New Issue
Block a user