Co-authored-by: mushaoqiong <mushaoqiong@126.com>
This commit is contained in:
parent
dca1724bdc
commit
4a64134718
|
@ -527,7 +527,7 @@ public class IndexService extends AbstractIndexComponent implements IndicesClust
|
||||||
// and close the shard so no operations are allowed to it
|
// and close the shard so no operations are allowed to it
|
||||||
if (indexShard != null) {
|
if (indexShard != null) {
|
||||||
try {
|
try {
|
||||||
// only flush we are we closed (closed index or shutdown) and if we are not deleted
|
// only flush if we are closed (closed index or shutdown) and if we are not deleted
|
||||||
final boolean flushEngine = deleted.get() == false && closed.get();
|
final boolean flushEngine = deleted.get() == false && closed.get();
|
||||||
indexShard.close(reason, flushEngine);
|
indexShard.close(reason, flushEngine);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|
Loading…
Reference in New Issue