[
https://issues.apache.org/jira/browse/SOLR-11444?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16204455#comment-16204455
]
David Smiley commented on SOLR-11444:
-------------------------------------
bq. In looking at code for aliases a great deal lately, aliases point to
collections only, not to other aliases.
To clarify, I mean the code that _uses_ aliases (lots of which affected by
SOLR-11444 here) it was clear that aliases are not recursively resolved, and
thus you can't get yourself into an infinite loop. That said, now that I look
carefully at the alias creation validation code, it does not forbid creating
aliases pointing to aliases, and there is even a test that shows it's not
forbidden! But no test (in AliasIntegrationTest) actually _uses_ (searches
with) this alias pointing to an alias. I added a simple try to do so to
validate my understanding of the code and it indeed failed.
All this conversation about SOLR-11218 really ought to be on that issue, alas.
Too late? Hey [[email protected]] you added aliases originally and have
some insight I'm sure. IMO, we shouldn't let someone create an alias to an
alias. As I mentioned above, Solr will let you do it but it doesn't actually
work, and may be tricky to support with safety.
> 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]