improve exception message

This commit is contained in:
Simon Willnauer 2015-10-22 20:09:31 +02:00
parent db87594bca
commit 76c660ba93
2 changed files with 3 additions and 3 deletions

View File

@ -73,7 +73,7 @@ public class TransportCloseIndexAction extends TransportMasterNodeAction<CloseIn
protected void doExecute(CloseIndexRequest request, ActionListener<CloseIndexResponse> listener) {
destructiveOperations.failDestructive(request.indices());
if (closeIndexEnabled == false) {
throw new IllegalStateException("closing indices is disabled - set [" + SETTING_CLUSTER_INDICES_CLOSE_ENABLE + ": true] to enable it. NOTE: closed indices consume a significant amount of diskspace");
throw new IllegalStateException("closing indices is disabled - set [" + SETTING_CLUSTER_INDICES_CLOSE_ENABLE + ": true] to enable it. NOTE: closed indices still consume a significant amount of diskspace");
}
super.doExecute(request, listener);
}

View File

@ -100,7 +100,7 @@ public class CloseIndexDisableCloseAllIT extends ESIntegTestCase {
client.admin().indices().prepareClose("test_no_close").execute().actionGet();
fail("exception expected");
} catch (IllegalStateException ex) {
assertEquals(ex.getMessage(), "closing indices is disabled - set [cluster.indices.close.enable: true] to enable it. NOTE: closed indices consume a significant amount of diskspace");
assertEquals(ex.getMessage(), "closing indices is disabled - set [cluster.indices.close.enable: true] to enable it. NOTE: closed indices still consume a significant amount of diskspace");
}
}