[
https://issues.apache.org/jira/browse/SOLR-4670?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13622169#comment-13622169
]
Alberto Ferrini commented on SOLR-4670:
---------------------------------------
I create a tree on ZooKeeper by {{SolrZkClient}}
(org.apache.solr.common.cloud.SolrZkClient)
{quote}
{{SolrZkClient zkClient=new
SolrZkClient(properties.getProperty(ZOOKEEPER_SERVER_ADDRESS),
ZOOKEEPER_CLIENT_TIMEOUT);}}
{{String configName=request.getParameter("coreName");}}
{{File dir=new File(properties.getProperty(CORE_DIR));}}
{{uploadToZK(zkClient, dir, ZOOKEEPER_CONFIGS_ZKNODE + "/" +
configName,configName);}}
The method {{uploadToZK}} invokes recursively {{zkClient.makePath()}}
{quote}
Then I send one request to each solr node for create the core by solrj client
(org.apache.solr.client.solrj.impl.HttpSolrServer):
{quote}
{{String configName=request.getParameter("coreName");}}
{{HttpSolrServer solrServer=new HttpSolrServer(request.getParameter("url"));}}
{{Create newCoreRequest=new Create();}}
{{newCoreRequest.setCollection(configName);}}
{{newCoreRequest.setDataDir(System.getProperty("solr.data.dir")+File.separator+configName);}}
{{newCoreRequest.setSchemaName("schema_"\+configName\+".xml");}}
{{newCoreRequest.setConfigName("solrconfig_"\+configName\+".xml");}}
{{newCoreRequest.setInstanceDir(configName+"/");}}
{{newCoreRequest.setShardId(configName);}}
{{newCoreRequest.setCoreName(configName);}}}}
{{solrServer.request(newCoreRequest);}}
{quote}
At the end of the process, the line automatically added on each solr.xml is
like this:
{quote}
{{<core schema="schema_core_01.xml" loadOnStartup="true" shard="core_01"
instanceDir="core_01/" transient="false" name="core_01"
config="solrconfig_core_01.xml" collection="core_01"
dataDir="/home/solr/solr/server.2/data/core_01"/>}}
{quote}
> Core mismatch in concurrent documents creation
> ----------------------------------------------
>
> Key: SOLR-4670
> URL: https://issues.apache.org/jira/browse/SOLR-4670
> Project: Solr
> Issue Type: Bug
> Components: multicore, SolrCloud
> Affects Versions: 4.0, 4.1, 4.2
> Environment: CPU: 32x AMD Opteron(TM) Processor 6276
> RAM: 132073620 kB
> OS: Red Hat Enterprise Linux Server release 5.7 (Tikanga)
> JDK 1.6.0_21
> JBoss [EAP] 4.3.0.GA_CP09
> Apache Solr 4.x
> Apache ZooKeeper 3.4.5
> Reporter: Alberto Ferrini
> Labels: concurrency, multicore, solrcloud, zookeeper
>
> The issue can be reproduced in this way:
> - Install SolrCloud with at least 2 nodes
> - Install ZooKeeper with at least 2 nodes
> - Create 30 cores
> - After each core creation, create 20 random generated documents in a random
> existent core with 2 concurrent threads on all solr nodes (for example,
> document 1 in core 3 on node 1, document 2 in core 5 on node 1, document 3 in
> core 3 on node 2, etc...).
> - After all cores creation, query each core for all documents and compare
> insert data with query result
> Some documents result in different core than they are created.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]