You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by David Smiley <da...@gmail.com> on 2016/03/18 20:28:02 UTC

SolrCloud: the default cluster state format

I noticed ClusterStateMutator.createCollection defaults the state format to
1 if it's not explicitly set -- line 104.  Shouldn't it be 2?  While
working on a test for collection restore from a backup (SOLR-5750) I see
the restored collection ends up being in the old (1) state format because
of this.

I'll file an issue unless someone can confirm it's supposed to be this way.
-- 
Lucene/Solr Search Committer, Consultant, Developer, Author, Speaker
LinkedIn: http://linkedin.com/in/davidwsmiley | Book:
http://www.solrenterprisesearchserver.com

Re: SolrCloud: the default cluster state format

Posted by Shalin Shekhar Mangar <sh...@gmail.com>.
Yeah, the collection creation code explicitly sets stateFormat=2 so the
default format is actually "2". But the overseer code assumes 1 if none is
specified by the OverseerCollectionProcessor or a CoreAdmin Create.

+1 to fix.

On Sat, Mar 19, 2016 at 7:17 AM, David Smiley <da...@gmail.com>
wrote:

> Ok; I have this simple change in my patch (and branch) for SOLR-5750.  It
> seems like this bug is not as bad as it may appear because normal
> collection creation takes a code path that expressly states the state
> format to be 2, whereas for this new collection restoration feature a
> different path is taken that doesn't set it.  If people think this needs
> its own issue then I'll file one and commit it.
>
> On Fri, Mar 18, 2016 at 7:20 PM Mark Miller <ma...@gmail.com> wrote:
>
>> We certainly discussed making it two and there was consensus, and I would
>> have sworn someone did, but perhaps no one ever did.
>>
>> - Mark
>>
>> On Fri, Mar 18, 2016 at 7:09 PM Scott Blum <dr...@gmail.com> wrote:
>>
>>> That seems really bad, the default should be 2.
>>>
>>> On Fri, Mar 18, 2016 at 3:28 PM, David Smiley <da...@gmail.com>
>>> wrote:
>>>
>>>> I noticed ClusterStateMutator.createCollection defaults the state
>>>> format to 1 if it's not explicitly set -- line 104.  Shouldn't it be 2?
>>>> While working on a test for collection restore from a backup (SOLR-5750) I
>>>> see the restored collection ends up being in the old (1) state format
>>>> because of this.
>>>>
>>>> I'll file an issue unless someone can confirm it's supposed to be this
>>>> way.
>>>> --
>>>> Lucene/Solr Search Committer, Consultant, Developer, Author, Speaker
>>>> LinkedIn: http://linkedin.com/in/davidwsmiley | Book:
>>>> http://www.solrenterprisesearchserver.com
>>>>
>>>
>>> --
>> - Mark
>> about.me/markrmiller
>>
> --
> Lucene/Solr Search Committer, Consultant, Developer, Author, Speaker
> LinkedIn: http://linkedin.com/in/davidwsmiley | Book:
> http://www.solrenterprisesearchserver.com
>



-- 
Regards,
Shalin Shekhar Mangar.

Re: SolrCloud: the default cluster state format

Posted by Erick Erickson <er...@gmail.com>.
There's something I saw that may be related. If you remove the zk data then
restart Solr, the reconstruction puts some stuff in state.json and some
stuff in clusterstate.json. iirc this really isn't a problem outside weird
test situations and won't happen in 6.0 anyway, but I thought I'd mention
it in case you happen across anything related.
On Mar 18, 2016 18:47, "David Smiley" <da...@gmail.com> wrote:

> Ok; I have this simple change in my patch (and branch) for SOLR-5750.  It
> seems like this bug is not as bad as it may appear because normal
> collection creation takes a code path that expressly states the state
> format to be 2, whereas for this new collection restoration feature a
> different path is taken that doesn't set it.  If people think this needs
> its own issue then I'll file one and commit it.
>
> On Fri, Mar 18, 2016 at 7:20 PM Mark Miller <ma...@gmail.com> wrote:
>
>> We certainly discussed making it two and there was consensus, and I would
>> have sworn someone did, but perhaps no one ever did.
>>
>> - Mark
>>
>> On Fri, Mar 18, 2016 at 7:09 PM Scott Blum <dr...@gmail.com> wrote:
>>
>>> That seems really bad, the default should be 2.
>>>
>>> On Fri, Mar 18, 2016 at 3:28 PM, David Smiley <da...@gmail.com>
>>> wrote:
>>>
>>>> I noticed ClusterStateMutator.createCollection defaults the state
>>>> format to 1 if it's not explicitly set -- line 104.  Shouldn't it be 2?
>>>> While working on a test for collection restore from a backup (SOLR-5750) I
>>>> see the restored collection ends up being in the old (1) state format
>>>> because of this.
>>>>
>>>> I'll file an issue unless someone can confirm it's supposed to be this
>>>> way.
>>>> --
>>>> Lucene/Solr Search Committer, Consultant, Developer, Author, Speaker
>>>> LinkedIn: http://linkedin.com/in/davidwsmiley | Book:
>>>> http://www.solrenterprisesearchserver.com
>>>>
>>>
>>> --
>> - Mark
>> about.me/markrmiller
>>
> --
> Lucene/Solr Search Committer, Consultant, Developer, Author, Speaker
> LinkedIn: http://linkedin.com/in/davidwsmiley | Book:
> http://www.solrenterprisesearchserver.com
>

Re: SolrCloud: the default cluster state format

Posted by David Smiley <da...@gmail.com>.
Ok; I have this simple change in my patch (and branch) for SOLR-5750.  It
seems like this bug is not as bad as it may appear because normal
collection creation takes a code path that expressly states the state
format to be 2, whereas for this new collection restoration feature a
different path is taken that doesn't set it.  If people think this needs
its own issue then I'll file one and commit it.

On Fri, Mar 18, 2016 at 7:20 PM Mark Miller <ma...@gmail.com> wrote:

> We certainly discussed making it two and there was consensus, and I would
> have sworn someone did, but perhaps no one ever did.
>
> - Mark
>
> On Fri, Mar 18, 2016 at 7:09 PM Scott Blum <dr...@gmail.com> wrote:
>
>> That seems really bad, the default should be 2.
>>
>> On Fri, Mar 18, 2016 at 3:28 PM, David Smiley <da...@gmail.com>
>> wrote:
>>
>>> I noticed ClusterStateMutator.createCollection defaults the state format
>>> to 1 if it's not explicitly set -- line 104.  Shouldn't it be 2?  While
>>> working on a test for collection restore from a backup (SOLR-5750) I see
>>> the restored collection ends up being in the old (1) state format because
>>> of this.
>>>
>>> I'll file an issue unless someone can confirm it's supposed to be this
>>> way.
>>> --
>>> Lucene/Solr Search Committer, Consultant, Developer, Author, Speaker
>>> LinkedIn: http://linkedin.com/in/davidwsmiley | Book:
>>> http://www.solrenterprisesearchserver.com
>>>
>>
>> --
> - Mark
> about.me/markrmiller
>
-- 
Lucene/Solr Search Committer, Consultant, Developer, Author, Speaker
LinkedIn: http://linkedin.com/in/davidwsmiley | Book:
http://www.solrenterprisesearchserver.com

Re: SolrCloud: the default cluster state format

Posted by Mark Miller <ma...@gmail.com>.
We certainly discussed making it two and there was consensus, and I would
have sworn someone did, but perhaps no one ever did.

- Mark

On Fri, Mar 18, 2016 at 7:09 PM Scott Blum <dr...@gmail.com> wrote:

> That seems really bad, the default should be 2.
>
> On Fri, Mar 18, 2016 at 3:28 PM, David Smiley <da...@gmail.com>
> wrote:
>
>> I noticed ClusterStateMutator.createCollection defaults the state format
>> to 1 if it's not explicitly set -- line 104.  Shouldn't it be 2?  While
>> working on a test for collection restore from a backup (SOLR-5750) I see
>> the restored collection ends up being in the old (1) state format because
>> of this.
>>
>> I'll file an issue unless someone can confirm it's supposed to be this
>> way.
>> --
>> Lucene/Solr Search Committer, Consultant, Developer, Author, Speaker
>> LinkedIn: http://linkedin.com/in/davidwsmiley | Book:
>> http://www.solrenterprisesearchserver.com
>>
>
> --
- Mark
about.me/markrmiller

Re: SolrCloud: the default cluster state format

Posted by Scott Blum <dr...@gmail.com>.
That seems really bad, the default should be 2.

On Fri, Mar 18, 2016 at 3:28 PM, David Smiley <da...@gmail.com>
wrote:

> I noticed ClusterStateMutator.createCollection defaults the state format
> to 1 if it's not explicitly set -- line 104.  Shouldn't it be 2?  While
> working on a test for collection restore from a backup (SOLR-5750) I see
> the restored collection ends up being in the old (1) state format because
> of this.
>
> I'll file an issue unless someone can confirm it's supposed to be this way.
> --
> Lucene/Solr Search Committer, Consultant, Developer, Author, Speaker
> LinkedIn: http://linkedin.com/in/davidwsmiley | Book:
> http://www.solrenterprisesearchserver.com
>