Skip to content

Commit

Permalink
skip engine instanceOf InternalEngine assertion for closed shards (#9084
Browse files Browse the repository at this point in the history
)

Signed-off-by: bansvaru <bansvaru@amazon.com>
Signed-off-by: Gaurav Bafna <gbbafna@amazon.com>
Co-authored-by: Gaurav Bafna <gbbafna@amazon.com>
  • Loading branch information
linuxpi and gbbafna authored Aug 3, 2023
1 parent 7b66f33 commit de5ad92
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1921,8 +1921,9 @@ public void close(String reason, boolean flushEngine, boolean deleted) throws IO

if (deleted && engine != null && isPrimaryMode() && isRemoteTranslogEnabled()) {
// Translog Clean up
assert engine instanceof InternalEngine;
((InternalEngine) engine).translogManager().onDelete();
if (engine instanceof InternalEngine) {
((InternalEngine) engine).translogManager().onDelete();
}
}

indexShardOperationPermits.close();
Expand Down

0 comments on commit de5ad92

Please sign in to comment.