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

Add document routing to CloudSolrServer

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.5, 6.0
    • Component/s: SolrCloud
    • Labels:
      None

      Description

      This issue adds the following enhancements to CloudSolrServer's update logic:

      1) Document routing: Updates are routed directly to the correct shard leader eliminating document routing at the server.

      2) Optional parallel update execution: Updates for each shard are executed in a separate thread so parallel indexing can occur across the cluster.

      These enhancements should allow for near linear scalability on indexing throughput.

      Usage:

      CloudSolrServer cloudClient = new CloudSolrServer(zkAddress);
      cloudClient.setParallelUpdates(true);
      SolrInputDocument doc1 = new SolrInputDocument();
      doc1.addField(id, "0");
      doc1.addField("a_t", "hello1");
      SolrInputDocument doc2 = new SolrInputDocument();
      doc2.addField(id, "2");
      doc2.addField("a_t", "hello2");

      UpdateRequest request = new UpdateRequest();
      request.add(doc1);
      request.add(doc2);
      request.setAction(AbstractUpdateRequest.ACTION.OPTIMIZE, false, false);

      NamedList response = cloudClient.request(request); // Returns a backwards compatible condensed response.

      //To get more detailed response down cast to RouteResponse:
      CloudSolrServer.RouteResponse rr = (CloudSolrServer.RouteResponse)response;

        Attachments

        1. RequestTask-removal.patch
          5 kB
          Shikhar Bhushan
        2. SOLR-4816.patch
          65 kB
          Mark Miller
        3. SOLR-4816.patch
          65 kB
          Mark Miller
        4. SOLR-4816.patch
          31 kB
          Joel Bernstein
        5. SOLR-4816.patch
          27 kB
          Joel Bernstein
        6. SOLR-4816.patch
          27 kB
          Joel Bernstein
        7. SOLR-4816.patch
          25 kB
          Joel Bernstein
        8. SOLR-4816.patch
          22 kB
          Joel Bernstein
        9. SOLR-4816.patch
          21 kB
          Joel Bernstein
        10. SOLR-4816.patch
          23 kB
          Joel Bernstein
        11. SOLR-4816.patch
          27 kB
          Erick Erickson
        12. SOLR-4816.patch
          29 kB
          Joel Bernstein
        13. SOLR-4816.patch
          22 kB
          Joel Bernstein
        14. SOLR-4816.patch
          22 kB
          Joel Bernstein
        15. SOLR-4816.patch
          21 kB
          Joel Bernstein
        16. SOLR-4816.patch
          20 kB
          Joel Bernstein
        17. SOLR-4816.patch
          18 kB
          Joel Bernstein
        18. SOLR-4816.patch
          17 kB
          Joel Bernstein
        19. SOLR-4816.patch
          14 kB
          Joel Bernstein
        20. SOLR-4816.patch
          14 kB
          Joel Bernstein
        21. SOLR-4816.patch
          14 kB
          Joel Bernstein
        22. SOLR-4816.patch
          11 kB
          Joel Bernstein
        23. SOLR-4816.patch
          11 kB
          Joel Bernstein
        24. SOLR-4816.patch
          6 kB
          Joel Bernstein
        25. SOLR-4816.patch
          5 kB
          Joel Bernstein
        26. SOLR-4816.patch
          5 kB
          Joel Bernstein
        27. SOLR-4816.patch
          5 kB
          Joel Bernstein
        28. SOLR-4816.patch
          4 kB
          Joel Bernstein
        29. SOLR-4816.patch
          4 kB
          Joel Bernstein
        30. SOLR-4816-sriesenberg.patch
          5 kB
          Stephen Riesenberg

          Issue Links

            Activity

              People

              • Assignee:
                markrmiller@gmail.com Mark Miller
                Reporter:
                joel.bernstein Joel Bernstein
              • Votes:
                5 Vote for this issue
                Watchers:
                23 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: