Don't swallow cause if Store stats can't be build
This commit is contained in:
parent
5699492575
commit
5ab0833990
|
@ -1487,7 +1487,7 @@ public class Store extends AbstractIndexShardComponent implements Closeable, Ref
|
|||
try {
|
||||
return new StoreStats(estimateSize(directory), directoryService.throttleTimeInNanos());
|
||||
} catch (IOException ex) {
|
||||
throw new ElasticsearchException("failed to refresh store stats");
|
||||
throw new ElasticsearchException("failed to refresh store stats", ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -306,7 +306,7 @@ public class IndexShardTests extends ESSingleNodeTestCase {
|
|||
assertBusy(new Runnable() { // should be very very quick
|
||||
@Override
|
||||
public void run() {
|
||||
IndexStats indexStats = client().admin().indices().prepareStats("test").get().getIndex("test");
|
||||
IndexStats indexStats = client().admin().indices().prepareStats("test").clear().get().getIndex("test");
|
||||
assertNotNull(indexStats.getShards()[0].getCommitStats().getUserData().get(Engine.SYNC_COMMIT_ID));
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue