# PR - 18094 - Don't try to compute completion stats on a closed reader

**URL:** <https://discuss.elastic.co/t/pr-18094-dont-try-to-compute-completion-stats-on-a-closed-reader/148925>\
**Category:** Elasticsearch\
**Created:** [September 18, 2018, 6:11am UTC](https://discuss.elastic.co/t/pr-18094-dont-try-to-compute-completion-stats-on-a-closed-reader/148925 "2018-09-18T06:11:23Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Deb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/deb/32/46162_2.png) [@Deb](https://discuss.elastic.co/u/Deb)\
**Post date:** [September 18, 2018, 6:11am UTC](https://discuss.elastic.co/t/pr-18094-dont-try-to-compute-completion-stats-on-a-closed-reader/148925/1 "2018-09-18T06:11:24Z")

</div>

HI

As mentioned in the below PR -

> <https://github.com/elastic/elasticsearch/pull/18094>

Can this cause problem if store type is specified as `default_fs` for Elasticsearch running on Ubuntu 14.04 ?

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [September 18, 2018, 6:25am UTC](https://discuss.elastic.co/t/pr-18094-dont-try-to-compute-completion-stats-on-a-closed-reader/148925/2 "2018-09-18T06:25:33Z")

</div>

Which version of Elasticsearch are you using? What is the error you are seeing?

---

<div class="post-metadata">

**Author:** ![Deb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/deb/32/46162_2.png) [@Deb](https://discuss.elastic.co/u/Deb)\
**Post date:** [September 18, 2018, 6:40am UTC](https://discuss.elastic.co/t/pr-18094-dont-try-to-compute-completion-stats-on-a-closed-reader/148925/3 "2018-09-18T06:40:37Z")

</div>

I am using an older version 2.3.1 . I am seeing the following messages in the log as discussed in [https://github.com/elastic/elasticsearch/pull/18094](https://github.com/elastic/elasticsearch/pull/18094) .

But I am not able to ascertain if this can cause issue with `default_fs` store type on Ubuntu 14.04.

```
[2018-08-15 21:59:49,791][DEBUG][action.admin.cluster.node.stats] [Interloper] failed to execute on node [OnyxVuo0R0GaFQ6xp3s_zw]
RemoteTransportException[[Interloper][139.46.38.37:9300][cluster:monitor/nodes/stats[n]]]; nested: AlreadyClosedException[this IndexReader is closed];
Caused by: org.apache.lucene.store.AlreadyClosedException: this IndexReader is closed
       at org.apache.lucene.index.IndexReader.ensureOpen(IndexReader.java:274)
       at org.apache.lucene.index.CompositeReader.getContext(CompositeReader.java:101)
       at org.apache.lucene.index.CompositeReader.getContext(CompositeReader.java:55)
       at org.apache.lucene.index.IndexReader.leaves(IndexReader.java:438)
       at org.elasticsearch.search.suggest.completion.Completion090PostingsFormat.completionStats(Completion090PostingsFormat.java:330)
       at org.elasticsearch.index.shard.IndexShard.completionStats(IndexShard.java:765)
       at org.elasticsearch.action.admin.indices.stats.CommonStats.<init>(CommonStats.java:164)
       at org.elasticsearch.indices.IndicesService.stats(IndicesService.java:253)
       at org.elasticsearch.node.service.NodeService.stats(NodeService.java:158)
       at org.elasticsearch.action.admin.cluster.node.stats.TransportNodesStatsAction.nodeOperation(TransportNodesStatsAction.java:82)
       at org.elasticsearch.action.admin.cluster.node.stats.TransportNodesStatsAction.nodeOperation(TransportNodesStatsAction.java:44)
       at org.elasticsearch.action.support.nodes.TransportNodesAction.nodeOperation(TransportNodesAction.java:92)
       at org.elasticsearch.action.support.nodes.TransportNodesAction$NodeTransportHandler.messageReceived(TransportNodesAction.java:230)
       at org.elasticsearch.action.support.nodes.TransportNodesAction$NodeTransportHandler.messageReceived(TransportNodesAction.java:226)
       at org.elasticsearch.transport.RequestHandlerRegistry.processMessageReceived(RequestHandlerRegistry.java:75)
       at org.elasticsearch.transport.TransportService$4.doRun(TransportService.java:376)
       at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
       at java.lang.Thread.run(Thread.java:748)
```

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [September 18, 2018, 6:43am UTC](https://discuss.elastic.co/t/pr-18094-dont-try-to-compute-completion-stats-on-a-closed-reader/148925/4 "2018-09-18T06:43:22Z")

</div>

I do not know the answer, but it looks like the issue was fixed in Elasticsearch 2.4, so I would recommend upgrading to at least the latest 2.4 release.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 16, 2018, 6:43am UTC](https://discuss.elastic.co/t/pr-18094-dont-try-to-compute-completion-stats-on-a-closed-reader/148925/5 "2018-10-16T06:43:26Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
