You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Steen Manniche (JIRA)" <ji...@apache.org> on 2016/08/05 11:26:20 UTC

[jira] [Commented] (SOLR-6771) Sending DIH request to non-leader can result in different number of successful documents

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

Steen Manniche commented on SOLR-6771:
--------------------------------------

We have had the same problem with a solr 5.1.1 installation. Our setup has five servers, each with five shards, and a replication factor of 2.

The error in our case was caused by a replica that tries to push a received invalid document to a shard leader or vice versa. The invalidity of the documents in question was that it contained fields that we had not defined in the schema.

Even though we are using a managed schema, the solrconfig.xml contained the following lines

{code}
<schemaFactory class="ManagedIndexSchemaFactory">
    <bool name="mutable">false</bool>
    <str name="managedSchemaResourceName">managed-schema</str>
</schemaFactory>
{code}

The boolean value in mutable would disallow API indexing operations to mutate the schema, even though it allowed for the creation of the fields on the schema through the Schema API.

For reasons yet to be completely clarified, the solr process would try to replicate the document before writing to the local solr directory. This would throw the exception listed above before the exception showing that the document contained a field which could not be created with the indexing operation.

"Unlocking" the managed schema by setting {{mutable}} to {{true}} and restarting the entire cluster made it possible for the solr process to write the pending replication updates and then the server was able to tell about fields not defined in the schema but present in the documents.


> Sending DIH request to non-leader can result in different number of successful documents
> ----------------------------------------------------------------------------------------
>
>                 Key: SOLR-6771
>                 URL: https://issues.apache.org/jira/browse/SOLR-6771
>             Project: Solr
>          Issue Type: Bug
>    Affects Versions: 4.10
>            Reporter: Greg Harris
>
> Basically if you send a DIH request to the non-leader the following set of circumstances can occur:
> 1) If there are errors in some of the documents the request itself is rejected by the leader (try making a required field null with some documents to make sure there are rejections). 
> 2) This causes all documents on that request to appear to fail. The number of documents that a follower is able to update DIH with appears variable. 
> 3) You need to use a large number of documents it appears to see the anomaly. 
> This results in the following error on the follower:
> 2014-11-20 12:06:16.470; 34054 [Thread-18] WARN  org.apache.solr.update.processor.DistributedUpdateProcessor  – Error sending update
> org.apache.solr.common.SolrException: Bad Request
> request: http://10.0.2.15:8983/solr/collection1/update?update.distrib=TOLEADER&distrib.from=http%3A%2F%2F10.0.2.15%3A8982%2Fsolr%2Fcollection1%2F&wt=javabin&version=2
>         at org.apache.solr.client.solrj.impl.ConcurrentUpdateSolrServer$Runner.run(ConcurrentUpdateSolrServer.java:240)
>         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>         at java.lang.Thread.run(Thread.java:722)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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