Catch Throwable rather than Exception if latches are present.
This commit is contained in:
parent
8a876ea80e
commit
82d3693a91
|
@ -138,7 +138,7 @@ public class MetaDataDeleteIndexService extends AbstractComponent {
|
||||||
|
|
||||||
// wait for events from all nodes that it has been removed from their respective metadata...
|
// wait for events from all nodes that it has been removed from their respective metadata...
|
||||||
int count = currentState.nodes().size();
|
int count = currentState.nodes().size();
|
||||||
// add the notifications that the store was deleted from *date* nodes
|
// add the notifications that the store was deleted from *data* nodes
|
||||||
count += currentState.nodes().dataNodes().size();
|
count += currentState.nodes().dataNodes().size();
|
||||||
final AtomicInteger counter = new AtomicInteger(count);
|
final AtomicInteger counter = new AtomicInteger(count);
|
||||||
final NodeIndexDeletedAction.Listener nodeIndexDeleteListener = new NodeIndexDeletedAction.Listener() {
|
final NodeIndexDeletedAction.Listener nodeIndexDeleteListener = new NodeIndexDeletedAction.Listener() {
|
||||||
|
|
|
@ -265,7 +265,7 @@ public class InternalIndexService extends AbstractIndexComponent implements Inde
|
||||||
public void run() {
|
public void run() {
|
||||||
try {
|
try {
|
||||||
removeShard(shardId, reason);
|
removeShard(shardId, reason);
|
||||||
} catch (Exception e) {
|
} catch (Throwable e) {
|
||||||
logger.warn("failed to close shard", e);
|
logger.warn("failed to close shard", e);
|
||||||
} finally {
|
} finally {
|
||||||
latch.countDown();
|
latch.countDown();
|
||||||
|
|
|
@ -152,7 +152,7 @@ public class InternalIndicesService extends AbstractLifecycleComponent<IndicesSe
|
||||||
public void run() {
|
public void run() {
|
||||||
try {
|
try {
|
||||||
removeIndex(index, "shutdown", shardsStopExecutor);
|
removeIndex(index, "shutdown", shardsStopExecutor);
|
||||||
} catch (Exception e) {
|
} catch (Throwable e) {
|
||||||
logger.warn("failed to delete index on stop [" + index + "]", e);
|
logger.warn("failed to delete index on stop [" + index + "]", e);
|
||||||
} finally {
|
} finally {
|
||||||
latch.countDown();
|
latch.countDown();
|
||||||
|
|
Loading…
Reference in New Issue