Solr
  1. Solr
  2. SOLR-4140

Collection API: CloudSolrServer cannot be used to create collection without referencing an existing collection

    Details

      Description

      CloudSolrServer needs an existing collection to be able to forward requests. For some requests it is not logical that you ned to have or reference an existing collection. E.g. if you want to use CloudSolrServer to create a collection - especially:

      • If you have no collections already and want to create your first collection
      • If you like to create your CloudSolrServer once and for all, and want to set default-collection on it to point to your favorite collection, but also use this CloudSolrServer to create this favorite collection

      Yes, HttpSolrServer can be used, but

      • Some of us like to use CloudSolrServer for everything
      • Using HttpSolrServer you need to check youself which nodes are running, in order to send the create-request to one of them

        Issue Links

          Activity

          Hide
          Per Steffensen added a comment - - edited

          SOLR-4140_trunk.patch fits on top of trunk (5.x)

          Essence of patch:

          • In CloudSolrServer, if it is a "/admin/collections" request, use all live-nodes as potential receivers of the request. Do not consider collection provided in request or default-collection
          • In BasicDistributedZkTest.testCollectionsAPI, we already create at least 3 new "awholynewcollection_X" collections. Used to be created using HttpSolrServer. Now create the first using a CloudSolrServer without default-collection, and create the second using a CloudSolrServer with a non-existing default-collection. The rest of the collections are still created using HttpSolrServer
            • Refactored a little to be able to use the existing code in AbstractFullDistribZkTestBase for CloudSolrServer instance creation. Dont copy code - reuse!

          BasicDistributedZkTest is still green, but didnt run entire test-suite. Couldnt imagine that the fix destroied any existing test. Committer should of course run entire test-suite before commit (asuming you are running test-suite pre-commit). Let me know if something fails, even though I didnt expect it.

          Show
          Per Steffensen added a comment - - edited SOLR-4140 _trunk.patch fits on top of trunk (5.x) Essence of patch: In CloudSolrServer, if it is a "/admin/collections" request, use all live-nodes as potential receivers of the request. Do not consider collection provided in request or default-collection In BasicDistributedZkTest.testCollectionsAPI, we already create at least 3 new "awholynewcollection_X" collections. Used to be created using HttpSolrServer. Now create the first using a CloudSolrServer without default-collection, and create the second using a CloudSolrServer with a non-existing default-collection. The rest of the collections are still created using HttpSolrServer Refactored a little to be able to use the existing code in AbstractFullDistribZkTestBase for CloudSolrServer instance creation. Dont copy code - reuse! BasicDistributedZkTest is still green, but didnt run entire test-suite. Couldnt imagine that the fix destroied any existing test. Committer should of course run entire test-suite before commit (asuming you are running test-suite pre-commit). Let me know if something fails, even though I didnt expect it.
          Hide
          Mark Miller added a comment - - edited

          I think this duplicates or overlaps with an existing issue (which has no patch if I remember right, so this can supersede).

          I'll try and find it and link it to this issue later today.

          Show
          Mark Miller added a comment - - edited I think this duplicates or overlaps with an existing issue (which has no patch if I remember right, so this can supersede). I'll try and find it and link it to this issue later today.
          Hide
          Mark Miller added a comment -

          On first glance, I think SOLR-3425 is the one this is related to.

          Show
          Mark Miller added a comment - On first glance, I think SOLR-3425 is the one this is related to.
          Hide
          Per Steffensen added a comment -

          SOLR-3425 is certainly related, but if there are parts in it that are not solved with SOLR-4140, I am not sure. I posted a comment to SOLR-3425, describing this and that, and basically asking for a new evaluation of whether SOLR-3425 is still relevant (or can be closed) after SOLR-4140

          Show
          Per Steffensen added a comment - SOLR-3425 is certainly related, but if there are parts in it that are not solved with SOLR-4140 , I am not sure. I posted a comment to SOLR-3425 , describing this and that, and basically asking for a new evaluation of whether SOLR-3425 is still relevant (or can be closed) after SOLR-4140
          Hide
          Mark Miller added a comment -

          I skipped playing a video game to get this patch merged up to trunk I'm very happy to have patches that are targeted and include good tests - those are much faster/easier to commit without taking much time or thinking too hard. Looks like tests are passing after my merge up - I'll commit shortly.

          Show
          Mark Miller added a comment - I skipped playing a video game to get this patch merged up to trunk I'm very happy to have patches that are targeted and include good tests - those are much faster/easier to commit without taking much time or thinking too hard. Looks like tests are passing after my merge up - I'll commit shortly.
          Hide
          Commit Tag Bot added a comment -

          [branch_4x commit] Mark Robert Miller
          http://svn.apache.org/viewvc?view=revision&revision=1421072

          SOLR-4140: Allow access to the collections API through CloudSolrServer without referencing an existing collection.

          Show
          Commit Tag Bot added a comment - [branch_4x commit] Mark Robert Miller http://svn.apache.org/viewvc?view=revision&revision=1421072 SOLR-4140 : Allow access to the collections API through CloudSolrServer without referencing an existing collection.
          Hide
          Commit Tag Bot added a comment -

          [trunk commit] Mark Robert Miller
          http://svn.apache.org/viewvc?view=revision&revision=1421071

          SOLR-4140: Allow access to the collections API through CloudSolrServer without referencing an existing collection.

          Show
          Commit Tag Bot added a comment - [trunk commit] Mark Robert Miller http://svn.apache.org/viewvc?view=revision&revision=1421071 SOLR-4140 : Allow access to the collections API through CloudSolrServer without referencing an existing collection.
          Hide
          Per Steffensen added a comment -

          I verified the changes on branch_4x and it seems to be good. Assuming you did the same changes to trunk. Closing the ticket.

          I skipped playing a video game to get this patch merged up to trunk

          Show
          Per Steffensen added a comment - I verified the changes on branch_4x and it seems to be good. Assuming you did the same changes to trunk. Closing the ticket. I skipped playing a video game to get this patch merged up to trunk

            People

            • Assignee:
              Mark Miller
              Reporter:
              Per Steffensen
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development