[ 
https://issues.apache.org/jira/browse/SOLR-11807?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16522446#comment-16522446
 ] 

Steve Rowe commented on SOLR-11807:
-----------------------------------

Policeman Jenkins found a reproducing seed for a 
{{TestLocalFSCloudBackupRestore}} failure that {{git bisect}} blames on commit 
{{3a2ec9b}} on this issue 
[https://jenkins.thetaphi.de/job/Lucene-Solr-7.x-Linux/2183/]:

{noformat}
Checking out Revision 82b793df56c8c9fb50c29f46f39465453a87f2b2 
(refs/remotes/origin/branch_7x)
[...]
   [junit4]   2> NOTE: reproduce with: ant test  
-Dtestcase=TestLocalFSCloudBackupRestore -Dtests.method=test 
-Dtests.seed=7CEE52DAF9E4606 -Dtests.multiplier=3 -Dtests.slow=true 
-Dtests.locale=bs-Cyrl -Dtests.timezone=America/Boise -Dtests.asserts=true 
-Dtests.file.encoding=UTF-8
   [junit4] FAILURE 15.8s J2 | TestLocalFSCloudBackupRestore.test <<<
   [junit4]    > Throwable #1: java.lang.AssertionError: Node 
127.0.0.1:40147_solr has 6 replicas. Expected num replicas : 3 state file 
   [junit4]    > 
DocCollection(backuprestore_restored//collections/backuprestore_restored/state.json/13)={
   [junit4]    >   "pullReplicas":0,
   [junit4]    >   "replicationFactor":2,
   [junit4]    >   "shards":{
   [junit4]    >     "shard2":{
   [junit4]    >       "range":"0-7fffffff",
   [junit4]    >       "state":"active",
   [junit4]    >       "replicas":{
   [junit4]    >         "core_node122":{
   [junit4]    >           "core":"backuprestore_restored_shard2_replica_n121",
   [junit4]    >           "base_url":"https://127.0.0.1:40147/solr";,
   [junit4]    >           "node_name":"127.0.0.1:40147_solr",
   [junit4]    >           "state":"active",
   [junit4]    >           "type":"NRT",
   [junit4]    >           "force_set_state":"false",
   [junit4]    >           "leader":"true"},
   [junit4]    >         "core_node128":{
   [junit4]    >           "core":"backuprestore_restored_shard2_replica_n127",
   [junit4]    >           "base_url":"https://127.0.0.1:40147/solr";,
   [junit4]    >           "node_name":"127.0.0.1:40147_solr",
   [junit4]    >           "state":"active",
   [junit4]    >           "type":"NRT",
   [junit4]    >           "force_set_state":"false"}},
   [junit4]    >       "stateTimestamp":"1529839664323341145"},
   [junit4]    >     "shard1_1":{
   [junit4]    >       "range":"c0000000-ffffffff",
   [junit4]    >       "state":"active",
   [junit4]    >       "replicas":{
   [junit4]    >         "core_node124":{
   [junit4]    >           
"core":"backuprestore_restored_shard1_1_replica_n123",
   [junit4]    >           "base_url":"https://127.0.0.1:40147/solr";,
   [junit4]    >           "node_name":"127.0.0.1:40147_solr",
   [junit4]    >           "state":"active",
   [junit4]    >           "type":"NRT",
   [junit4]    >           "force_set_state":"false",
   [junit4]    >           "leader":"true"},
   [junit4]    >         "core_node130":{
   [junit4]    >           
"core":"backuprestore_restored_shard1_1_replica_n129",
   [junit4]    >           "base_url":"https://127.0.0.1:40147/solr";,
   [junit4]    >           "node_name":"127.0.0.1:40147_solr",
   [junit4]    >           "state":"active",
   [junit4]    >           "type":"NRT",
   [junit4]    >           "force_set_state":"false"}},
   [junit4]    >       "stateTimestamp":"1529839664323360463"},
   [junit4]    >     "shard1_0":{
   [junit4]    >       "range":"80000000-bfffffff",
   [junit4]    >       "state":"active",
   [junit4]    >       "replicas":{
   [junit4]    >         "core_node126":{
   [junit4]    >           
"core":"backuprestore_restored_shard1_0_replica_n125",
   [junit4]    >           "base_url":"https://127.0.0.1:40147/solr";,
   [junit4]    >           "node_name":"127.0.0.1:40147_solr",
   [junit4]    >           "state":"active",
   [junit4]    >           "type":"NRT",
   [junit4]    >           "force_set_state":"false",
   [junit4]    >           "leader":"true"},
   [junit4]    >         "core_node132":{
   [junit4]    >           
"core":"backuprestore_restored_shard1_0_replica_n131",
   [junit4]    >           "base_url":"https://127.0.0.1:40147/solr";,
   [junit4]    >           "node_name":"127.0.0.1:40147_solr",
   [junit4]    >           "state":"active",
   [junit4]    >           "type":"NRT",
   [junit4]    >           "force_set_state":"false"}},
   [junit4]    >       "stateTimestamp":"1529839664323379971"}},
   [junit4]    >   "router":{"name":"compositeId"},
   [junit4]    >   "maxShardsPerNode":"6",
   [junit4]    >   "autoAddReplicas":"true",
   [junit4]    >   "nrtReplicas":2,
   [junit4]    >   "tlogReplicas":0}
   [junit4]    >        at 
__randomizedtesting.SeedInfo.seed([7CEE52DAF9E4606:8F9ADAF701622BFE]:0)
   [junit4]    >        at 
org.apache.solr.cloud.api.collections.AbstractCloudBackupRestoreTestCase.lambda$testBackupAndRestore$1(AbstractCloudBackupRestoreTestCase.java:346)
   [junit4]    >        at 
java.base/java.util.HashMap.forEach(HashMap.java:1341)
   [junit4]    >        at 
org.apache.solr.cloud.api.collections.AbstractCloudBackupRestoreTestCase.testBackupAndRestore(AbstractCloudBackupRestoreTestCase.java:345)
   [junit4]    >        at 
org.apache.solr.cloud.api.collections.AbstractCloudBackupRestoreTestCase.test(AbstractCloudBackupRestoreTestCase.java:145)
   [junit4]    >        at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   [junit4]    >        at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   [junit4]    >        at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   [junit4]    >        at 
java.base/java.lang.reflect.Method.invoke(Method.java:564)
   [junit4]    >        at java.base/java.lang.Thread.run(Thread.java:844)
[...]
   [junit4]   2> NOTE: test params are: 
codec=HighCompressionCompressingStoredFields(storedFieldsFormat=CompressingStoredFieldsFormat(compressionMode=HIGH_COMPRESSION,
 chunkSize=3858, maxDocsPerChunk=6, blockSize=4), 
termVectorsFormat=CompressingTermVectorsFormat(compressionMode=HIGH_COMPRESSION,
 chunkSize=3858, blockSize=4)), sim=RandomSimilarity(queryNorm=true): {}, 
locale=bs-Cyrl, timezone=America/Boise
   [junit4]   2> NOTE: Linux 4.13.0-41-generic amd64/Oracle Corporation 10.0.1 
(64-bit)/cpus=8,threads=1,free=134185200,total=518979584
{noformat}

> maxShardsPerNode=-1 needs special handling while restoring collections
> ----------------------------------------------------------------------
>
>                 Key: SOLR-11807
>                 URL: https://issues.apache.org/jira/browse/SOLR-11807
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: Backup/Restore
>            Reporter: Varun Thacker
>            Assignee: Varun Thacker
>            Priority: Minor
>             Fix For: master (8.0), 7.5
>
>         Attachments: SOLR-11807.patch, SOLR-11807.patch, SOLR-11807.patch
>
>
> When you start Solr 6.6. and run the cloud example here's the log excerpt :
> {code:java}
> Connecting to ZooKeeper at localhost:9983 ...
> INFO  - 2018-06-20 13:44:47.491; 
> org.apache.solr.client.solrj.impl.ZkClientClusterStateProvider; Cluster at 
> localhost:9983 ready
> ...
> Creating new collection 'gettingstarted' using command:
> http://localhost:8983/solr/admin/collections?action=CREATE&name=gettingstarted&numShards=2&replicationFactor=2&maxShardsPerNode=2&collection.configName=gettingstarted{code}
> maxShardsPerNode get's set to 2 . 
>  
> Compare this to Solr 7.3 
> {code:java}
> INFO  - 2018-06-20 13:55:33.823; 
> org.apache.solr.client.solrj.impl.ZkClientClusterStateProvider; Cluster at 
> localhost:9983 ready
> Created collection 'gettingstarted' with 2 shard(s), 2 replica(s) with 
> config-set 'gettingstarted'{code}
> So something changed and now we no longer set maxShardsPerNode and it 
> defaults to -1 . 
>  
> -1 has special handing while creating a collection ( it means max int ) . 
> This special handling is not there while restoring a collection and hence 
> this fails
> We should not set maxShardsPerNode to -1 in the first place
> Steps to reproduce:
> 1. ./bin/solr start -e cloud -noprompt : This creates a 2 node cluster and a 
> gettingstarted collection which 2X2
>  2. Add 4 docs (id=1,2,3,4) with commit=true and openSearcher=true (default)
>  3. Call backup: 
> [http://localhost:8983/solr/admin/collections?action=BACKUP&name=gettingstarted_backup&collection=gettingstarted&location=/Users/varunthacker/solr-7.1.0]
>  4. Call restore:
>  
> [http://localhost:8983/solr/admin/collections?action=restore&name=gettingstarted_backup&collection=restore_gettingstarted&location=/Users/varunthacker/solr-7.1.0]



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to