Return-Path: X-Original-To: apmail-lucene-solr-user-archive@minotaur.apache.org Delivered-To: apmail-lucene-solr-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 004CE10956 for ; Wed, 16 Oct 2013 08:49:39 +0000 (UTC) Received: (qmail 90427 invoked by uid 500); 16 Oct 2013 08:49:34 -0000 Delivered-To: apmail-lucene-solr-user-archive@lucene.apache.org Received: (qmail 90308 invoked by uid 500); 16 Oct 2013 08:49:33 -0000 Mailing-List: contact solr-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: solr-user@lucene.apache.org Delivered-To: mailing list solr-user@lucene.apache.org Received: (qmail 90288 invoked by uid 99); 16 Oct 2013 08:49:33 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Oct 2013 08:49:33 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,SPF_PASS,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of primoz.skale@policija.si designates 217.72.81.13 as permitted sender) Received: from [217.72.81.13] (HELO hermes.policija.si) (217.72.81.13) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Oct 2013 08:49:29 +0000 Received: from localhost (localhost [127.0.0.1]) by hermes.policija.si (Postfix) with ESMTP id 936DC40908 for ; Wed, 16 Oct 2013 10:49:07 +0200 (CEST) X-Virus-Scanned: amavisd-new at policija.si Received: from hermes.policija.si ([127.0.0.1]) by localhost (hermes.policija.si [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 5gN4aGHoWnoi for ; Wed, 16 Oct 2013 10:49:07 +0200 (CEST) Received: from gpusmtp.policija.si (unknown [10.0.32.111]) by hermes.policija.si (Postfix) with ESMTP id 600A940905 for ; Wed, 16 Oct 2013 10:49:07 +0200 (CEST) In-Reply-To: References: To: solr-user@lucene.apache.org MIME-Version: 1.0 Subject: Re: Regarding Solr Cloud issue... X-KeepSent: 0F3C4D38:323B2C86-C1257C06:003036D1; type=4; name=$KeepSent X-Mailer: IBM Notes Release 9.0 March 08, 2013 Message-ID: From: primoz.skale@policija.si Date: Wed, 16 Oct 2013 10:49:07 +0200 X-MIMETrack: Serialize by Router on GPUSMTP/POLICIJA(Release 8.5.3FP4|March 27, 2013) at 16.10.2013 10:49:07, Serialize complete at 16.10.2013 10:49:07 Content-Type: multipart/alternative; boundary="=_alternative 003072E7C1257C06_=" X-Virus-Checked: Checked by ClamAV on apache.org --=_alternative 003072E7C1257C06_= Content-Type: text/plain; charset="ISO-8859-2" Content-Transfer-Encoding: quoted-printable Yap, you are right - I only created extra replicas with cores API. For a=20 new shard I had to use "split shard" command. My apologies. Primo=BE From: Shalin Shekhar Mangar To: solr-user@lucene.apache.org Date: 16.10.2013 10:45 Subject: Re: Regarding Solr Cloud issue... If the initial collection was created with a numShards parameter (and=20 hence compositeId router then there was no way to create a new logical shard.=20 You can add replicas with the core admin API but only to shards that already exist. A new logical shard can only be created by splitting an existing=20 one. The "createshard" API also has the same limitation -- it cannot create a shard for a collection with compositeId router. It is supposed to be used for collections with custom sharding (i.e. "implicit" router). In such collections, there is no concept of a hash range and routing is done explicitly by the user using the "shards" parameter in the request or by sending the request to the target core/node directly. So, in summary, attempting to add a new logical shard to a collection with compositeId router via CoreAdmin APIs is wrong, unsupported and should be disallowed. Adding replicas to existing logical shards is okay though. On Wed, Oct 16, 2013 at 12:56 PM, wrote: > If I am not mistaken the only way to create a new shard from a=20 collection > in 4.4.0 was to use cores API. That worked fine for me until I used > *other* cores API commands. Those usually produced null ranges. > > In 4.5.0 this is fixed with newly added commands "createshard" etc. to=20 the > collections API, right? > > Primoz > > > > From: Shalin Shekhar Mangar > To: solr-user@lucene.apache.org > Date: 16.10.2013 09:06 > Subject: Re: Regarding Solr Cloud issue... > > > > Chris, can you post your complete clusterstate.json? Do all shards have=20 a > null range? Also, did you issue any core admin CREATE commands apart=20 from > the create collection api. > > Primoz, I was able to reproduce this but by doing an illegal operation. > Suppose I create a collection with numShards=3D5 and then I issue a core > admin create command such as: > >=20 http://localhost:8983/solr/admin/cores?action=3DCREATE&name=3Dxyz&collectio= n=3Dmycollection51&shard=3Dshard6 > > > Then a "shard6" is added to the collection with a null range. This is a > bug > because we should never allow such a core admin create to succeed=20 anyway. > I'll open an issue. > > > > On Wed, Oct 16, 2013 at 11:49 AM, wrote: > > > I sometimes also do get null ranges when doing colletions/cores API > > actions CREATE or/and UNLOAD, etc... In 4.4.0 that was not easily=20 fixed > > because zkCli had problems with "putfile" command, but in 4.5.0 it=20 works > > OK. All you have to do is "download" clusterstate.json from ZK ("get > > /clusterstate.json"), fix ranges to appropriate values and upload the > file > > back to ZK with zkCli. > > > > But why those null ranges happen at all is beyond me :) > > > > Primoz > > > > > > > > From: Shalin Shekhar Mangar > > To: solr-user@lucene.apache.org > > Date: 16.10.2013 07:37 > > Subject: Re: Regarding Solr Cloud issue... > > > > > > > > I'm sorry I am not able to reproduce this issue. > > > > I started 5 solr-4.4 instances. > > I copied example directory into example1, example2, example3 and > example4 > > cd example; java -Dbootstrap=5Fconfdir=3D./solr/collection1/conf > > -Dcollection.configName=3Dmyconf -DzkRun -DnumShards=3D1 -jar start.jar > > cd example1; java -Djetty.port=3D7574 -DzkHost=3Dlocalhost:9983 -jar > start.jar > > cd example2; java -Djetty.port=3D7575 -DzkHost=3Dlocalhost:9983 -jar > start.jar > > cd example3; java -Djetty.port=3D7576 -DzkHost=3Dlocalhost:9983 -jar > start.jar > > cd example4; java -Djetty.port=3D7577 -DzkHost=3Dlocalhost:9983 -jar > start.jar > > > > After that I invoked: > > > > > >=20 http://localhost:8983/solr/admin/collections?action=3DCREATE&name=3Dmycolle= ction51&numShards=3D5&replicationFactor=3D1 > > > > > > > I can see all shards having non-null ranges in clusterstate. > > > > > > On Tue, Oct 15, 2013 at 8:47 PM, Chris wrote: > > > > > Hi Shalin,. > > > > > > Thank you for your quick reply. I appreciate all the help. > > > > > > I started the solr cloud servers first...with 5 nodes. > > > > > > then i issued a command like below to create the shards - > > > > > > > > > > > > > > >=20 http://localhost:8983/solr/admin/collections?action=3DCREATE&name=3Dmycolle= ction&numShards=3D5&replicationFactor=3D1 > > > > > > < > > > > > > > > >=20 http://localhost:8983/solr/admin/collections?action=3DCREATE&name=3Dmycolle= ction&numShards=3D3&replicationFactor=3D4 > > > > > > > > > > > > > Please advice. > > > > > > Regards, > > > Chris > > > > > > > > > On Tue, Oct 15, 2013 at 8:07 PM, Shalin Shekhar Mangar < > > > shalinmangar@gmail.com> wrote: > > > > > > > How did you create these shards? Can you tell us how to reproduce > the > > > > issue? > > > > > > > > Any shard in a collection with compositeId router should never=20 have > > null > > > > ranges. > > > > > > > > > > > > On Tue, Oct 15, 2013 at 7:07 PM, Chris =20 wrote: > > > > > > > > > Hi, > > > > > > > > > > I am using solr 4.4 as cloud. while creating shards i see that=20 the > > last > > > > > shard has range of "null". i am not sure if this is a bug. > > > > > > > > > > I am stuck with having null value for the range in > clusterstate.json > > > > > (attached below) > > > > > > > > > > "shard5":{ "range":null, "state":"active", > > "replicas":{"core=5Fnode1":{ > > > > > "state":"active", "core":"Web=5Fshard5=5Freplica1", > > > > > "node=5Fname":"domain-name.com:1981=5Fsolr", "base=5Furl":" > > > > > http://domain-name.com:1981/solr", "leader":"true"}}}}, > > > > > "router":"compositeId"}, > > > > > > > > > > I tried to use zookeeper cli to change this, but it was not able > to. > > I > > > > > tried to locate this file, but didn't find it anywhere. > > > > > > > > > > Can you please let me know how do i change the range from null=20 to > > > > something > > > > > meaningful? i have the range that i need, so if i can find the > file, > > > > maybe > > > > > i can change it manually. > > > > > > > > > > My next question is - can we have a catch all for ranges, i mean > if > > > > things > > > > > don't match any other range then insert in this shard..is this > > > possible? > > > > > > > > > > Kindly advice. > > > > > Chris > > > > > > > > > > > > > > > > > > > > > -- > > > > Regards, > > > > Shalin Shekhar Mangar. > > > > > > > > > > > > > > > -- > > Regards, > > Shalin Shekhar Mangar. > > > > > > > -- > Regards, > Shalin Shekhar Mangar. > > --=20 Regards, Shalin Shekhar Mangar. --=_alternative 003072E7C1257C06_=--