[
https://issues.apache.org/jira/browse/SOLR-11444?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16204174#comment-16204174
]
Erick Erickson commented on SOLR-11444:
---------------------------------------
-1 until we resolve the additional test issue in SOLR-11218. I hope to have
some time this weekend to dig further.
The issue for me is that testDeleteAliasWithExistingCollectionName fails with
the patch on this JIRA but did not before. The reason I'm persnickety about
this one is that this scenario doing the wrong thing is very painful.
A common strategy for reindexing from scratch is to create a new collection,
index to that and then define an alias to switch atomically. Problem is that
it's often the case that the user won't already have an alias set up, so you
wind up with an alias and collection name that are identical, but the alias
does _not_ point to the collection named the same. So far, so good.
But now I want to delete the old collection. If the alias is followed it
deletes the wrong collection. Here's an abbreviated set of steps.
> create collection old
> create collection new
> alias old->new
> delete old
If that sequence deletes the new collection it's pretty bad.
Now, it may just be that the test isn't doing what I think, I really didn't
have time to look yet. I'll see what I can get through this weekend.
The second test in SOLR-11218 with the nocommit is a separate concern, "it does
what it does" may be fine there.
> 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]