Bringing together the Apache Cassandra experts from the community and DataStax.

Want to learn? Have a question? Want to share your expertise? You are in the right place!

Not sure where to begin? Getting Started

 

question

roy avatar image
roy asked Erick Ramirez answered

What does AlreadyClosedException "IndexWriter is closed" mean?

ERROR [CoreThread-0] 2021-10-30 20:29:39,840  AbstractSolrSecondaryIndex.java:1482 - Error indexing partition '5141' on 'student.project':
org.apache.lucene.store.AlreadyClosedException: this IndexWriter is closed
    at org.apache.lucene.index.IndexWriter.ensureOpen(IndexWriter.java:836)
    at org.apache.lucene.index.IndexWriter.ensureOpen(IndexWriter.java:850)
    at org.apache.lucene.index.IndexWriter.updateDocument(IndexWriter.java:1663)
    at org.apache.solr.update.DirectUpdateHandler2.doNormalUpdate(DirectUpdateHandler2.java:286)
    at org.apache.solr.update.DirectUpdateHandler2.addDoc0(DirectUpdateHandler2.java:218)
    at org.apache.solr.update.DirectUpdateHandler2.addDoc(DirectUpdateHandler2.java:173)
    at com.datastax.bdp.search.solr.handler.update.CassandraDirectUpdateHandler.indexDoc(CassandraDirectUpdateHandler.java:545)
    at com.datastax.bdp.search.solr.handler.update.CassandraDirectUpdateHandler.addDoc(CassandraDirectUpdateHandler.java:138)
    at com.datastax.bdp.search.solr.AbstractSolrSecondaryIndex.doIndex(AbstractSolrSecondaryIndex.java:1268)
    at com.datastax.bdp.search.solr.AbstractSolrSecondaryIndex.doUpdate(AbstractSolrSecondaryIndex.java:1030)
    at com.datastax.bdp.search.solr.Cql3SolrSecondaryIndex.lambda$indexDocument$7(Cql3SolrSecondaryIndex.java:850)
    at io.reactivex.internal.operators.single.SingleFlatMapCompletable$FlatMapCompletableObserver.onSuccess(SingleFlatMapCompletable.java:83)
    at io.reactivex.internal.operators.single.SingleObserveOn$ObserveOnSingleObserver.run

Can someone tell me exact meaning of above exception?

search
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

starlord avatar image
starlord answered

If the index writer closed unexpectedly there would typically be other signs of a problem before or after this in the logs. If nothing else is standing out, check things like disk space, resource limits, index size, or even corrupted data in the underlying table. The exact meaning though is that an index thread is either closed or closing, typically due to an interrupt of some kind.

Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Erick Ramirez avatar image
Erick Ramirez answered

On its own the exception means that the IndexWriter thread (which is responsible for writing an entry to the Solr index) was closed when the partition was being indexed.

It's impossible to know why without additional information so you will need to log a ticket with DataStax Support if you need help with it. Cheers!

Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.