Solr
  1. Solr
  2. SOLR-5321

Overseer.updateState tries to use router name from message but none is sent

    Details

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

      Description

      Overseer.updateSlice method has the following code:

      String router = message.getStr(OverseerCollectionProcessor.ROUTER,DocRouter.DEFAULT_NAME);
              List<String> shardNames  = new ArrayList<String>();
      
              //collection does not yet exist, create placeholders if num shards is specified
              boolean collectionExists = state.getCollections().contains(collection);
              if (!collectionExists && numShards!=null) {
                if(ImplicitDocRouter.NAME.equals(router)){
                  getShardNames(shardNames, message.getStr("shards",null));
                  numShards = shardNames.size();
                }else {
                  getShardNames(numShards, shardNames);
                }
                state = createCollection(state, collection, shardNames, message);
              }
      

      Here it tries to read the router name from the message. Even if we ignore that the key to lookup the router is wrong here, the router name is never sent in a state message.

      Considering that we don't even support creating a collection with "implicit" router from command line, we should stop expecting the parameter.

        Activity

        Hide
        ASF subversion and git services added a comment -

        Commit 1530555 from shalin@apache.org in branch 'dev/trunk'
        [ https://svn.apache.org/r1530555 ]

        SOLR-5321: Remove unnecessary code in Overseer.updateState method which tries to use router name from message where none is ever sent

        Show
        ASF subversion and git services added a comment - Commit 1530555 from shalin@apache.org in branch 'dev/trunk' [ https://svn.apache.org/r1530555 ] SOLR-5321 : Remove unnecessary code in Overseer.updateState method which tries to use router name from message where none is ever sent
        Hide
        ASF subversion and git services added a comment -

        Commit 1530556 from shalin@apache.org in branch 'dev/branches/branch_4x'
        [ https://svn.apache.org/r1530556 ]

        SOLR-5321: Remove unnecessary code in Overseer.updateState method which tries to use router name from message where none is ever sent

        Show
        ASF subversion and git services added a comment - Commit 1530556 from shalin@apache.org in branch 'dev/branches/branch_4x' [ https://svn.apache.org/r1530556 ] SOLR-5321 : Remove unnecessary code in Overseer.updateState method which tries to use router name from message where none is ever sent

          People

          • Assignee:
            Shalin Shekhar Mangar
            Reporter:
            Shalin Shekhar Mangar
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development