You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by levtannen <Le...@usdoj.gov> on 2019/03/08 20:04:20 UTC
All replicas created on the same node
Hi community,
I have solr 7.6 running on three nodes with about 400 collections with one
shard and 3 replicas per collection. I want replicas to be spread between
all 3 nodes so that for every collection I have one replica per collection
on each node.
I create collections via the SolrJ code.
for (String collectionName:<list of collection
Names>){
create = CollectionAdminRequest.createCollection(collectionName, source,
1, 3);
result = solrClient.request(create);
}
In solr 7.4 it worked fine, but in solr 7.6 created replicas are not spread
equally between nodes. In some collections all 3 replicas are created just
on one node, in some 2 replicas are created in one node and 1 in another
and some collections are created correctly: I replica per node.
Could anyone give me advice on why it happened and how to fix it?
Thank you.
Lev Tannen
--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html
Re: All replicas created on the same node
Posted by Kevin Risden <kr...@apache.org>.
Might be https://issues.apache.org/jira/browse/SOLR-13248
From the upgrade notes 7.7:
SOLR-13248: The default replica placement strategy used in Solr has been
reverted to the 'legacy' policy used by Solr
7.4 and previous versions. This is due to multiple bugs in the autoscaling
based replica placement strategy that was
made default in Solr 7.5 which causes multiple replicas of the same shard
to be placed on the same node in addition
to the maxShardsPerNode and createNodeSet parameters being ignored.
Although the default has changed, autoscaling
will continue to be used if a cluster policy or preference is specified or
a collection level policy is in use.
The default replica placement strategy can be changed to use autoscaling
again by setting a cluster property:
curl -X POST -H 'Content-type:application/json' --data-binary '
{
"set-obj-property": {
"defaults" : {
"cluster": {
"useLegacyReplicaAssignment":false
}
}
}
}' http://$SOLR_HOST:$SOLR_PORT/api/cluster
Kevin Risden
On Fri, Mar 8, 2019 at 3:04 PM levtannen <Le...@usdoj.gov> wrote:
> Hi community,
> I have solr 7.6 running on three nodes with about 400 collections with one
> shard and 3 replicas per collection. I want replicas to be spread between
> all 3 nodes so that for every collection I have one replica per collection
> on each node.
> I create collections via the SolrJ code.
> for (String collectionName:<list of collection
> Names>){
> create =
> CollectionAdminRequest.createCollection(collectionName, source,
> 1, 3);
> result = solrClient.request(create);
> }
> In solr 7.4 it worked fine, but in solr 7.6 created replicas are not spread
> equally between nodes. In some collections all 3 replicas are created just
> on one node, in some 2 replicas are created in one node and 1 in another
> and some collections are created correctly: I replica per node.
> Could anyone give me advice on why it happened and how to fix it?
>
> Thank you.
> Lev Tannen
>
>
>
>
> --
> Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html
>
Re: All replicas created on the same node
Posted by Zheng Lin Edwin Yeo <ed...@gmail.com>.
I think the attachment didn't get through. You may need to upload your
attachment to a sharing site and share the link.
Regards,
Edwin
On Wed, 13 Mar 2019 at 03:03, Tannen, Lev (USAEO) [Contractor]
<Le...@usdoj.gov.invalid> wrote:
> I run the same url on both IE11 and Google Chrome. Attached are the left
> panels of the screens. The right panel for IE11 is empty.
>
> -----Original Message-----
> From: Erick Erickson <er...@gmail.com>
> Sent: Tuesday, March 12, 2019 1:16 PM
> To: solr-user@lucene.apache.org
> Subject: Re: All replicas created on the same node
>
> Could you add what parts didn’t work for you to: SOLR-12857?
>
> Thanks.
>
> > On Mar 12, 2019, at 8:09 AM, Tannen, Lev (USAEO) [Contractor]
> <Le...@usdoj.gov.INVALID> wrote:
> >
> > Thank you Erick Erickson and Kevin Risden,
> >
> > I upgraded to 7.7.1 and the problem has disappeared.
> >
> > However: After upgrading, Solr admin in IE11 stopped working correctly.
> I switched to Google Chrome and it works.
> >
> >
> > -----Original Message-----
> > From: Erick Erickson <er...@gmail.com>
> > Sent: Friday, March 08, 2019 3:14 PM
> > To: solr-user@lucene.apache.org
> > Subject: Re: All replicas created on the same node
> >
> > Sounds like SOLR-13248.
> >
> > You should be able to cure this by setting the clusterproperty
> useLegacyReplicaAssignment, something like:
> >
> > curl -X POST -H 'Content-type:application/json' --data-binary '
> > {
> > "set-obj-property": {
> > "defaults" : {
> > "cluster": {
> > "useLegacyReplicaAssignment":true
> > }
> > }
> > }
> > }' http://$SOLR_HOST:$SOLR_PORT/api/cluster
> >
> > or upgrde to Solr 7.7.1.
> >
> >> On Mar 8, 2019, at 12:04 PM, levtannen <Le...@usdoj.gov> wrote:
> >>
> >> Hi community,
> >> I have solr 7.6 running on three nodes with about 400 collections
> >> with one shard and 3 replicas per collection. I want replicas to be
> >> spread between all 3 nodes so that for every collection I have one
> >> replica per collection on each node.
> >> I create collections via the SolrJ code.
> >> for (String collectionName:<list of
> >> collection
> >> Names>){
> >> create =
> CollectionAdminRequest.createCollection(collectionName,
> >> source, 1, 3);
> >> result = solrClient.request(create);
> >> }
> >> In solr 7.4 it worked fine, but in solr 7.6 created replicas are not
> >> spread equally between nodes. In some collections all 3 replicas are
> >> created just on one node, in some 2 replicas are created in one node
> >> and 1 in another and some collections are created correctly: I replica
> per node.
> >> Could anyone give me advice on why it happened and how to fix it?
> >>
> >> Thank you.
> >> Lev Tannen
> >>
> >>
> >>
> >>
> >> --
> >> Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html
> >
>
>
RE: All replicas created on the same node
Posted by "Tannen, Lev (USAEO) [Contractor]" <Le...@usdoj.gov.INVALID>.
I run the same url on both IE11 and Google Chrome. Attached are the left panels of the screens. The right panel for IE11 is empty.
-----Original Message-----
From: Erick Erickson <er...@gmail.com>
Sent: Tuesday, March 12, 2019 1:16 PM
To: solr-user@lucene.apache.org
Subject: Re: All replicas created on the same node
Could you add what parts didn’t work for you to: SOLR-12857?
Thanks.
> On Mar 12, 2019, at 8:09 AM, Tannen, Lev (USAEO) [Contractor] <Le...@usdoj.gov.INVALID> wrote:
>
> Thank you Erick Erickson and Kevin Risden,
>
> I upgraded to 7.7.1 and the problem has disappeared.
>
> However: After upgrading, Solr admin in IE11 stopped working correctly. I switched to Google Chrome and it works.
>
>
> -----Original Message-----
> From: Erick Erickson <er...@gmail.com>
> Sent: Friday, March 08, 2019 3:14 PM
> To: solr-user@lucene.apache.org
> Subject: Re: All replicas created on the same node
>
> Sounds like SOLR-13248.
>
> You should be able to cure this by setting the clusterproperty useLegacyReplicaAssignment, something like:
>
> curl -X POST -H 'Content-type:application/json' --data-binary '
> {
> "set-obj-property": {
> "defaults" : {
> "cluster": {
> "useLegacyReplicaAssignment":true
> }
> }
> }
> }' http://$SOLR_HOST:$SOLR_PORT/api/cluster
>
> or upgrde to Solr 7.7.1.
>
>> On Mar 8, 2019, at 12:04 PM, levtannen <Le...@usdoj.gov> wrote:
>>
>> Hi community,
>> I have solr 7.6 running on three nodes with about 400 collections
>> with one shard and 3 replicas per collection. I want replicas to be
>> spread between all 3 nodes so that for every collection I have one
>> replica per collection on each node.
>> I create collections via the SolrJ code.
>> for (String collectionName:<list of
>> collection
>> Names>){
>> create = CollectionAdminRequest.createCollection(collectionName,
>> source, 1, 3);
>> result = solrClient.request(create);
>> }
>> In solr 7.4 it worked fine, but in solr 7.6 created replicas are not
>> spread equally between nodes. In some collections all 3 replicas are
>> created just on one node, in some 2 replicas are created in one node
>> and 1 in another and some collections are created correctly: I replica per node.
>> Could anyone give me advice on why it happened and how to fix it?
>>
>> Thank you.
>> Lev Tannen
>>
>>
>>
>>
>> --
>> Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html
>
Re: All replicas created on the same node
Posted by Erick Erickson <er...@gmail.com>.
Could you add what parts didn’t work for you to: SOLR-12857?
Thanks.
> On Mar 12, 2019, at 8:09 AM, Tannen, Lev (USAEO) [Contractor] <Le...@usdoj.gov.INVALID> wrote:
>
> Thank you Erick Erickson and Kevin Risden,
>
> I upgraded to 7.7.1 and the problem has disappeared.
>
> However: After upgrading, Solr admin in IE11 stopped working correctly. I switched to Google Chrome and it works.
>
>
> -----Original Message-----
> From: Erick Erickson <er...@gmail.com>
> Sent: Friday, March 08, 2019 3:14 PM
> To: solr-user@lucene.apache.org
> Subject: Re: All replicas created on the same node
>
> Sounds like SOLR-13248.
>
> You should be able to cure this by setting the clusterproperty useLegacyReplicaAssignment, something like:
>
> curl -X POST -H 'Content-type:application/json' --data-binary '
> {
> "set-obj-property": {
> "defaults" : {
> "cluster": {
> "useLegacyReplicaAssignment":true
> }
> }
> }
> }' http://$SOLR_HOST:$SOLR_PORT/api/cluster
>
> or upgrde to Solr 7.7.1.
>
>> On Mar 8, 2019, at 12:04 PM, levtannen <Le...@usdoj.gov> wrote:
>>
>> Hi community,
>> I have solr 7.6 running on three nodes with about 400 collections with
>> one shard and 3 replicas per collection. I want replicas to be spread
>> between all 3 nodes so that for every collection I have one replica
>> per collection on each node.
>> I create collections via the SolrJ code.
>> for (String collectionName:<list of
>> collection
>> Names>){
>> create = CollectionAdminRequest.createCollection(collectionName,
>> source, 1, 3);
>> result = solrClient.request(create);
>> }
>> In solr 7.4 it worked fine, but in solr 7.6 created replicas are not
>> spread equally between nodes. In some collections all 3 replicas are
>> created just on one node, in some 2 replicas are created in one node
>> and 1 in another and some collections are created correctly: I replica per node.
>> Could anyone give me advice on why it happened and how to fix it?
>>
>> Thank you.
>> Lev Tannen
>>
>>
>>
>>
>> --
>> Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html
>
RE: All replicas created on the same node
Posted by "Tannen, Lev (USAEO) [Contractor]" <Le...@usdoj.gov.INVALID>.
Thank you Erick Erickson and Kevin Risden,
I upgraded to 7.7.1 and the problem has disappeared.
However: After upgrading, Solr admin in IE11 stopped working correctly. I switched to Google Chrome and it works.
-----Original Message-----
From: Erick Erickson <er...@gmail.com>
Sent: Friday, March 08, 2019 3:14 PM
To: solr-user@lucene.apache.org
Subject: Re: All replicas created on the same node
Sounds like SOLR-13248.
You should be able to cure this by setting the clusterproperty useLegacyReplicaAssignment, something like:
curl -X POST -H 'Content-type:application/json' --data-binary '
{
"set-obj-property": {
"defaults" : {
"cluster": {
"useLegacyReplicaAssignment":true
}
}
}
}' http://$SOLR_HOST:$SOLR_PORT/api/cluster
or upgrde to Solr 7.7.1.
> On Mar 8, 2019, at 12:04 PM, levtannen <Le...@usdoj.gov> wrote:
>
> Hi community,
> I have solr 7.6 running on three nodes with about 400 collections with
> one shard and 3 replicas per collection. I want replicas to be spread
> between all 3 nodes so that for every collection I have one replica
> per collection on each node.
> I create collections via the SolrJ code.
> for (String collectionName:<list of
> collection
> Names>){
> create = CollectionAdminRequest.createCollection(collectionName,
> source, 1, 3);
> result = solrClient.request(create);
> }
> In solr 7.4 it worked fine, but in solr 7.6 created replicas are not
> spread equally between nodes. In some collections all 3 replicas are
> created just on one node, in some 2 replicas are created in one node
> and 1 in another and some collections are created correctly: I replica per node.
> Could anyone give me advice on why it happened and how to fix it?
>
> Thank you.
> Lev Tannen
>
>
>
>
> --
> Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html
Re: All replicas created on the same node
Posted by Erick Erickson <er...@gmail.com>.
Sounds like SOLR-13248.
You should be able to cure this by setting the clusterproperty useLegacyReplicaAssignment, something like:
curl -X POST -H 'Content-type:application/json' --data-binary '
{
"set-obj-property": {
"defaults" : {
"cluster": {
"useLegacyReplicaAssignment":true
}
}
}
}' http://$SOLR_HOST:$SOLR_PORT/api/cluster
or upgrde to Solr 7.7.1.
> On Mar 8, 2019, at 12:04 PM, levtannen <Le...@usdoj.gov> wrote:
>
> Hi community,
> I have solr 7.6 running on three nodes with about 400 collections with one
> shard and 3 replicas per collection. I want replicas to be spread between
> all 3 nodes so that for every collection I have one replica per collection
> on each node.
> I create collections via the SolrJ code.
> for (String collectionName:<list of collection
> Names>){
> create = CollectionAdminRequest.createCollection(collectionName, source,
> 1, 3);
> result = solrClient.request(create);
> }
> In solr 7.4 it worked fine, but in solr 7.6 created replicas are not spread
> equally between nodes. In some collections all 3 replicas are created just
> on one node, in some 2 replicas are created in one node and 1 in another
> and some collections are created correctly: I replica per node.
> Could anyone give me advice on why it happened and how to fix it?
>
> Thank you.
> Lev Tannen
>
>
>
>
> --
> Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html