You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "Nhat Nguyen (Jira)" <ji...@apache.org> on 2021/06/17 02:09:00 UTC

[jira] [Commented] (LUCENE-10005) Improve AlreadyClosedException logging

    [ https://issues.apache.org/jira/browse/LUCENE-10005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17364636#comment-17364636 ] 

Nhat Nguyen commented on LUCENE-10005:
--------------------------------------

I think it should be an improvement in Solr instead of Lucene.

> Improve AlreadyClosedException logging
> --------------------------------------
>
>                 Key: LUCENE-10005
>                 URL: https://issues.apache.org/jira/browse/LUCENE-10005
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Andras Salamon
>            Priority: Major
>
> If we close the IndexWriter because of a tragic exception and later try to write into the index we got AlreadyClosedException exception like this:
> {noformat}
> 2021-05-17 11:35:04,963 ERROR (qtp626742236-67894)----x:ct_returns_shard8_replica_n28-o.a.s.s.HttpSolrCall: null:org.apache.solr.common.SolrException: Error handling 'MERGEINDEXES' action
>         at org.apache.solr.handler.admin.CoreAdminOperation.execute(CoreAdminOperation.java:365)
>         ...
> Caused by: org.apache.lucene.store.AlreadyClosedException: this IndexWriter is closed
>         at org.apache.lucene.index.IndexWriter.ensureOpen(IndexWriter.java:671)
>         at org.apache.lucene.index.IndexWriter.ensureOpen(IndexWriter.java:685)
>         ...
> Caused by: org.apache.hadoop.hdfs.BlockMissingException: Could not obtain block: BP-1877842388-10.181.61.226-1618590425462:blk_1075816117_2075498 file=/solr/ct_returns/core_node31/data/index/_1z_Lucene50_0.doc
>         at org.apache.hadoop.hdfs.DFSInputStream.refetchLocations(DFSInputStream.java:880)
>         at org.apache.hadoop.hdfs.DFSInputStream.chooseDataNode(DFSInputStream.java:863)
>         at  {noformat}
> This is rather misleading because 2021-05-17 is the date of the AlreadyClosedException, but the tragic exception (BlockMissingException in this case) could be much earlier. This is the exception we saved when we had to close the indexwriter.
>  
> We should emphasise that the tragic exception is not a fresh exception, but an exception we saved earlier.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org