[
https://issues.apache.org/jira/browse/SOLR-12477?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16555191#comment-16555191
]
Varun Thacker commented on SOLR-12477:
--------------------------------------
{quote}- corruptLeader may throw RemoteSolrException when called by test method
{quote}
When a RemoteSolrException is thrown the stack trace from the logs indicate
that it was a commit operation on a corrupted index
{code:java}
10895 ERROR (qtp791778936-41) [n:127.0.0.1:54262_solr c:collection2 s:shard1
r:core_node4 x:collection2_shard1_replica_n2] o.a.s.s.HttpSolrCall
null: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)
at org.apache.lucene.index.IndexWriter.commit(IndexWriter.java:3412)
at
org.apache.solr.update.DirectUpdateHandler2.commit(DirectUpdateHandler2.java:678)
at
org.apache.solr.update.processor.RunUpdateProcessor.processCommit(RunUpdateProcessorFactory.java:93)
at
org.apache.solr.update.processor.UpdateRequestProcessor.processCommit(UpdateRequestProcessor.java:68)
at
org.apache.solr.update.processor.DistributedUpdateProcessor.doLocalCommit(DistributedUpdateProcessor.java:1940)
at
org.apache.solr.update.processor.DistributedUpdateProcessor.processCommit(DistributedUpdateProcessor.java:1916)
at
org.apache.solr.update.processor.LogUpdateProcessorFactory$LogUpdateProcessor.processCommit(LogUpdateProcessorFactory.java:160)
at
org.apache.solr.handler.RequestHandlerUtils.handleCommit(RequestHandlerUtils.java:69)
at
org.apache.solr.handler.ContentStreamHandlerBase.handleRequestBody(ContentStreamHandlerBase.java:62)
at
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:199)
at org.apache.solr.core.SolrCore.execute(SolrCore.java:2541)
at org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:709)
at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:515)
{code}
So the exception is thrown from {{IndexWriter.java:671}}
RequestHandlerBase has this piece of code today
{code:java}
if (req.getCore() != null) {
req.getCore().getCoreContainer().checkTragicException(req.getCore());
}{code}
If {{checkTragicException}} returned a boolean when there was a tragic
exception . Then we could make sure that the user always gets a server error as
the code.
> Return server error(500) for AlreadyClosedException instead of client
> Errors(400)
> ---------------------------------------------------------------------------------
>
> Key: SOLR-12477
> URL: https://issues.apache.org/jira/browse/SOLR-12477
> Project: Solr
> Issue Type: Improvement
> Security Level: Public(Default Security Level. Issues are Public)
> Components: update
> Reporter: jefferyyuan
> Assignee: Varun Thacker
> Priority: Minor
> Labels: update
> Fix For: 7.3.2, master (8.0)
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> In some cases(for example: corrupt index), addDoc0 throws
> AlreadyClosedException, but solr server returns client error 400 to client
> This will confuse customers and especially monitoring tool.
> Patch: [https://github.com/apache/lucene-solr/pull/402]
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]