Re: procedure to restart solrcloud, and config/collection consistency
hi Shawn, as I replied to Markus, of course I know (and use) the collections api to reload the config. I am asking what would happen in that scenario: - config updated (but collection not reloaded) - i restart one node now one node has the new config and the rest the old one?? To which he already replied: >The restared/reloaded node has the new config, the others have the old config until reloaded/restarted. I was not asking about making solr restart itself, my English must be worst than I thought. By the way, stuff like that can be achieved with http://yajsw.sourceforge.net/ a very powerful java wrapper, I used to use it when Solr did not have a built in daemon setup. It was built by someone how was using JSW, and got pissed when that one went commercial. It is very configurable, but of course more complex. I wrote something about it some time ago https://medium.com/@jmlucjav/how-to-install-solr-as-a-service-in-any-platform-including-solr-5-8e4a93cc3909 thanks On Thu, Feb 9, 2017 at 4:53 PM, Shawn Heisey wrote: > On 2/9/2017 5:24 AM, xavier jmlucjav wrote: > > I always wondered, if this was not really needed, and I could just call > > 'restart' in every node, in a quick loop, and forget about it. Does > anyone > > know if this is the case? > > > > My doubt is in regards to changing some config, and then doing the above > > (just restart nodes in a loop). For example, what if I change a config G > > used in collection C, and I restart just one of the nodes (N1), leaving > the rest alone. If all the nodes contain a shard for C, what happens, N1 is > using the new config and the rest are not? how is this handled? > > If you want to change the config or schema for a collection and make it > active across all nodes, just use the collections API to RELOAD the > collection. The change will be picked up everywhere. > > https://cwiki.apache.org/confluence/display/solr/Collections+API > > To answer your question: No. Solr does not have the ability to restart > itself. It would require significant development effort and a > fundamental change in how Solr is started to make it possible. It is > something that has been discussed, but at this time it is not possible. > > One idea that would make this possible is mentioned on the following > wiki page. It talks about turning Solr into two applications instead of > one: > > https://wiki.apache.org/solr/WhyNoWar#Information_that.27s_ > not_version_specific > > Again -- it would not be easy, which is why it hasn't been done yet. > > Thanks, > Shawn > >
Re: procedure to restart solrcloud, and config/collection consistency
On 2/9/2017 5:24 AM, xavier jmlucjav wrote: > I always wondered, if this was not really needed, and I could just call > 'restart' in every node, in a quick loop, and forget about it. Does anyone > know if this is the case? > > My doubt is in regards to changing some config, and then doing the above > (just restart nodes in a loop). For example, what if I change a config G > used in collection C, and I restart just one of the nodes (N1), leaving the > rest alone. If all the nodes contain a shard for C, what happens, N1 is using > the new config and the rest are not? how is this handled? If you want to change the config or schema for a collection and make it active across all nodes, just use the collections API to RELOAD the collection. The change will be picked up everywhere. https://cwiki.apache.org/confluence/display/solr/Collections+API To answer your question: No. Solr does not have the ability to restart itself. It would require significant development effort and a fundamental change in how Solr is started to make it possible. It is something that has been discussed, but at this time it is not possible. One idea that would make this possible is mentioned on the following wiki page. It talks about turning Solr into two applications instead of one: https://wiki.apache.org/solr/WhyNoWar#Information_that.27s_not_version_specific Again -- it would not be easy, which is why it hasn't been done yet. Thanks, Shawn
RE: procedure to restart solrcloud, and config/collection consistency
Hello - see inline. -Original message- > From:xavier jmlucjav > Sent: Thursday 9th February 2017 13:46 > To: solr-user > Subject: Re: procedure to restart solrcloud, and config/collection consistency > > Hi Markus, > > yes, of course I know (and use) the collections api to reload the config. I > am asking what would happen in that scenario: > - config updated (but collection not reloaded) > - i restart one node > > now one node has the new config and the rest the old one?? The restared/reloaded node has the new config, the others have the old config until reloaded/restarted. > > Regarding restarting many hosts, my question is if we can just 'restart' > each solr and that is enough, or it is better to first stop all, and then > start all. We prefer a rolling restart, restarting all nodes in sequence with some wait time in between to allow the node to come back up properly. I see no reason to do a stop all/start all unless you have cleared/will clear the index and want to reindex. > > thanks > > > On Thu, Feb 9, 2017 at 1:28 PM, Markus Jelsma > wrote: > > > Hello - if you just want to use updated configuration, you can use Solr's > > collection reload API call. For restarting we rely on remote provisioning > > tools such as Salt, other managing tools can probably execute commands > > remotely as well. > > > > If you operate more than just a very few machines, i'd really recommend > > using these tools. > > > > Markus > > > > > > > > -----Original message----- > > > From:xavier jmlucjav > > > Sent: Thursday 9th February 2017 13:24 > > > To: solr-user > > > Subject: procedure to restart solrcloud, and config/collection > > consistency > > > > > > Hi, > > > > > > When I need to restart a Solrcloud cluster, I always do this: > > > - log in into host nb1, stop solr > > > - log in into host nb2, stop solr > > > -... > > > - log in into host nbX, stop solr > > > - verify all hosts did stop > > > - in host nb1, start solr > > > - in host nb12, start solr > > > -... > > > > > > I always wondered, if this was not really needed, and I could just call > > > 'restart' in every node, in a quick loop, and forget about it. Does > > anyone > > > know if this is the case? > > > > > > My doubt is in regards to changing some config, and then doing the above > > > (just restart nodes in a loop). For example, what if I change a config G > > > used in collection C, and I restart just one of the nodes (N1), leaving > > the > > > rest alone. If all the nodes contain a shard for C, what happens, N1 is > > > using the new config and the rest are not? how is this handled? > > > > > > thanks > > > xavier > > > > > >
Re: procedure to restart solrcloud, and config/collection consistency
Hi Markus, yes, of course I know (and use) the collections api to reload the config. I am asking what would happen in that scenario: - config updated (but collection not reloaded) - i restart one node now one node has the new config and the rest the old one?? Regarding restarting many hosts, my question is if we can just 'restart' each solr and that is enough, or it is better to first stop all, and then start all. thanks On Thu, Feb 9, 2017 at 1:28 PM, Markus Jelsma wrote: > Hello - if you just want to use updated configuration, you can use Solr's > collection reload API call. For restarting we rely on remote provisioning > tools such as Salt, other managing tools can probably execute commands > remotely as well. > > If you operate more than just a very few machines, i'd really recommend > using these tools. > > Markus > > > > -Original message- > > From:xavier jmlucjav > > Sent: Thursday 9th February 2017 13:24 > > To: solr-user > > Subject: procedure to restart solrcloud, and config/collection > consistency > > > > Hi, > > > > When I need to restart a Solrcloud cluster, I always do this: > > - log in into host nb1, stop solr > > - log in into host nb2, stop solr > > -... > > - log in into host nbX, stop solr > > - verify all hosts did stop > > - in host nb1, start solr > > - in host nb12, start solr > > -... > > > > I always wondered, if this was not really needed, and I could just call > > 'restart' in every node, in a quick loop, and forget about it. Does > anyone > > know if this is the case? > > > > My doubt is in regards to changing some config, and then doing the above > > (just restart nodes in a loop). For example, what if I change a config G > > used in collection C, and I restart just one of the nodes (N1), leaving > the > > rest alone. If all the nodes contain a shard for C, what happens, N1 is > > using the new config and the rest are not? how is this handled? > > > > thanks > > xavier > > >
RE: procedure to restart solrcloud, and config/collection consistency
Hello - if you just want to use updated configuration, you can use Solr's collection reload API call. For restarting we rely on remote provisioning tools such as Salt, other managing tools can probably execute commands remotely as well. If you operate more than just a very few machines, i'd really recommend using these tools. Markus -Original message- > From:xavier jmlucjav > Sent: Thursday 9th February 2017 13:24 > To: solr-user > Subject: procedure to restart solrcloud, and config/collection consistency > > Hi, > > When I need to restart a Solrcloud cluster, I always do this: > - log in into host nb1, stop solr > - log in into host nb2, stop solr > -... > - log in into host nbX, stop solr > - verify all hosts did stop > - in host nb1, start solr > - in host nb12, start solr > -... > > I always wondered, if this was not really needed, and I could just call > 'restart' in every node, in a quick loop, and forget about it. Does anyone > know if this is the case? > > My doubt is in regards to changing some config, and then doing the above > (just restart nodes in a loop). For example, what if I change a config G > used in collection C, and I restart just one of the nodes (N1), leaving the > rest alone. If all the nodes contain a shard for C, what happens, N1 is > using the new config and the rest are not? how is this handled? > > thanks > xavier >
procedure to restart solrcloud, and config/collection consistency
Hi, When I need to restart a Solrcloud cluster, I always do this: - log in into host nb1, stop solr - log in into host nb2, stop solr -... - log in into host nbX, stop solr - verify all hosts did stop - in host nb1, start solr - in host nb12, start solr -... I always wondered, if this was not really needed, and I could just call 'restart' in every node, in a quick loop, and forget about it. Does anyone know if this is the case? My doubt is in regards to changing some config, and then doing the above (just restart nodes in a loop). For example, what if I change a config G used in collection C, and I restart just one of the nodes (N1), leaving the rest alone. If all the nodes contain a shard for C, what happens, N1 is using the new config and the rest are not? how is this handled? thanks xavier