Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-4236

Commit issue: Can't search while add commit=true in the call URL about insert index

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Cannot Reproduce
    • 4.0-BETA, 4.0
    • None
    • SolrCloud
    • one collection, one shard, three sever, one leader, two duplicate

    Description

      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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            raintung.li Raintung Li
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: