[ 
https://issues.apache.org/jira/browse/SOLR-11444?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16204819#comment-16204819
 ] 

Gus Heck commented on SOLR-11444:
---------------------------------

This patch fixes a bug I was just puzzling over. While reading code in 
HttpSolrCall, I couldn't figure out how it was possible to find an alias from a 
node not part of that alias... finally I set up a test, and found that in fact 
it did fail...

{code}
{
  "error":{
    "metadata":[
      "error-class","org.apache.solr.common.SolrException",
      
"root-error-class","org.apache.zookeeper.KeeperException$SessionExpiredException"],
    "msg":"Could not load collection from ZK: test1",
    "code":400}}
{code}

That was from a 4 node cluster with collection *test1* aliased as *test1alias* 
that had 1 shard and replication factor 1, which were allocated to nodes on 
port 8981 and 8982, from which all seemed normal, but errors like this occured 
if one tried to use the test1alias name from the node on port 8983 

I was about to file a bug but then I applied this patch since it seemed to be 
in exactly the section of code that didn't make sense, and poof the issue 
disappeared :)

> Improve Aliases.java and comma delimited collection list handling
> -----------------------------------------------------------------
>
>                 Key: SOLR-11444
>                 URL: https://issues.apache.org/jira/browse/SOLR-11444
>             Project: Solr
>          Issue Type: Improvement
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: SolrCloud
>            Reporter: David Smiley
>            Assignee: David Smiley
>         Attachments: SOLR_11444_Aliases.patch, SOLR_11444_Aliases.patch
>
>
> While starting to look at SOLR-11299 I noticed some brittleness in 
> assumptions about Strings that refer to a collection.  Sometimes they are in 
> fact references to comma separated lists, which appears was added with the 
> introduction of collection aliases (an alias can refer to a comma delimited 
> list).  So Java's type system kind of goes out the window when we do this.  
> In one case this leads to a bug -- CloudSolrClient will throw an NPE if you 
> try to write to such an alias.  Sending an update via HTTP will allow it and 
> send it to the first in the list.
> So this issue is about refactoring and some little improvements pertaining to 
> Aliases.java plus certain key spots that deal with collection references.  I 
> don't think I want to go as far as changing the public SolrJ API except to 
> adding documentation on what's possible.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to