You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Cao Manh Dat (JIRA)" <ji...@apache.org> on 2018/01/24 07:57:00 UTC

[jira] [Comment Edited] (SOLR-11661) Race condition between core creation thread and recovery request from leader causes inconsistent view of documents

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

Cao Manh Dat edited comment on SOLR-11661 at 1/24/18 7:56 AM:
--------------------------------------------------------------

A patch for this ticket, this patch solve the problem by do not remove the counter node in case of failures, hence even when a new collection with same name is created, the core node name will be different -> the data dir will be different on HDFS. ( this solution is found after a discussion with [~shalinmangar], thanks! )

This require some changes in several places
- ClusterStateUpdater only remove state.json of a collection, the rest data on ZK will be deleted by DeleteCollectionCmd.
- OverseerCollectionMessageHandler.collectionCmd will return a list of replicas which did not online to receive the request


was (Author: caomanhdat):
A patch for this ticket, this patch solve the problem by do not remove the counter node in case of failures, hence even when a new collection with same name is created, the core node name will be different -> the data dir will be different on HDFS.

This require some changes in several places
- ClusterStateUpdater only remove state.json of a collection, the rest data on ZK will be deleted by DeleteCollectionCmd.
- OverseerCollectionMessageHandler.collectionCmd will return a list of replicas which did not online to receive the request

> Race condition between core creation thread and recovery request from leader causes inconsistent view of documents
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-11661
>                 URL: https://issues.apache.org/jira/browse/SOLR-11661
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: SolrCloud
>            Reporter: Shalin Shekhar Mangar
>            Priority: Major
>             Fix For: master (8.0), 7.3
>
>         Attachments: 11458-2-MoveReplicaHDFSTest-log.txt, SOLR-11661.patch, SOLR-11661.patch
>
>
> While testing SOLR-11458, [~ab] ran into an interesting failure which resulted in different document counts between leader and replica. The test is MoveReplicaHDFSTest on jira/solr-11458-2 branch.
> The failure is rare but reproducible on beasting:
> {code}
> reproduce with: ant test  -Dtestcase=MoveReplicaHDFSTest -Dtests.method=testNormalFailedMove -Dtests.seed=161856CB543CD71C -Dtests.slow=true -Dtests.locale=ar-SA -Dtests.timezone=US/Michigan -Dtests.asserts=true -Dtests.file.encoding=ISO-8859-1
>    [junit4] FAILURE 14.2s | MoveReplicaHDFSTest.testNormalFailedMove <<<
>    [junit4]    > Throwable #1: java.lang.AssertionError: expected:<100> but was:<56>
>    [junit4]    > 	at __randomizedtesting.SeedInfo.seed([161856CB543CD71C:31134983787E4905]:0)
>    [junit4]    > 	at org.apache.solr.cloud.MoveReplicaTest.testFailedMove(MoveReplicaTest.java:305)
>    [junit4]    > 	at org.apache.solr.cloud.MoveReplicaHDFSTest.testNormalFailedMove(MoveReplicaHDFSTest.java:69)
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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