You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Raintung Li (JIRA)" <ji...@apache.org> on 2012/12/27 07:38:12 UTC

[jira] [Created] (SOLR-4236) Commit issue: Can't search while add commit=true in the call URL about insert index

Raintung Li created SOLR-4236:
---------------------------------

             Summary: Commit issue: Can't search while add commit=true in the call URL about insert index
                 Key: SOLR-4236
                 URL: https://issues.apache.org/jira/browse/SOLR-4236
             Project: Solr
          Issue Type: Bug
          Components: SolrCloud
    Affects Versions: 4.0, 4.0-BETA
         Environment: one collection, one shard, three sever, one leader, two duplicate
            Reporter: Raintung Li


I setup three instances for solr cloud for one same collection and shards, the cloud is one instance is shard leader and the others are replicate.
Send the index request to one instance, the URL example like this.
curl "http://localhost:7002/solr/update?commit=true" -H "Content-Type: text/xml" --data-binary '<add><doc><field name="id">test</field></doc></add>'

If send the request to the leader server, only the leader server can search this index, the replicate can't search. I close the autoSoftCommit. 

If request send to the replicate server, all servers can't search this index.

The major problem:
SolrCmdDistributor
distribAdd method will batch some requests in the cache.

DistributedUpdateProcessor class method processCommit will trigger the send the distribute request after the send commit request. 

If send the testing index's request to replicate server, replicate server will dispatch the request to leader server. But in this case, commit command will send to the other server before actually index request. The index can be searched only wait the softCommit or the other commit command coming.

A litter confuse: Why commit command don't need the leader server send to duplicate server? Only receive request server send the commit to full shards server?
It look like solr doesn't implement the transaction logic. 


--
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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org