You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Steve Rowe (JIRA)" <ji...@apache.org> on 2018/07/17 17:24:00 UTC

[jira] [Commented] (SOLR-12489) Restore collection does not respect user specified replicationFactor

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

Steve Rowe commented on SOLR-12489:
-----------------------------------

Policeman Jenkins found a reproducing seed for two test failures [https://jenkins.thetaphi.de/job/Lucene-Solr-master-Linux/22467]; {{git bisect}} blames both on commit {{3d20e89}} on this issue:

{noformat}
Checking out Revision ae3929c3ed4adad9fa2842b32e9a7fb28699fef7 (refs/remotes/origin/master)
[...]
   [junit4]   2> NOTE: reproduce with: ant test  -Dtestcase=TestLocalFSCloudBackupRestore -Dtests.method=test -Dtests.seed=BC266A8BBC96BD8C -Dtests.multiplier=3 -Dtests.slow=true -Dtests.locale=es-BR -Dtests.timezone=Asia/Kolkata -Dtests.asserts=true -Dtests.file.encoding=ISO-8859-1
   [junit4] FAILURE 10.0s J0 | TestLocalFSCloudBackupRestore.test <<<
   [junit4]    > Throwable #1: java.lang.AssertionError: expected:<COMPLETED> but was:<FAILED>
   [junit4]    > 	at __randomizedtesting.SeedInfo.seed([BC266A8BBC96BD8C:34725551126AD074]:0)
   [junit4]    > 	at org.apache.solr.cloud.api.collections.AbstractCloudBackupRestoreTestCase.testBackupAndRestore(AbstractCloudBackupRestoreTestCase.java:327)
   [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=Asserting(Lucene70): {shard_s=FST50, id=PostingsFormat(name=MockRandom)}, docValues:{_version_=DocValuesFormat(name=Direct)}, maxPointsInLeafNode=1295, maxMBSortInHeap=5.038487185282289, sim=Asserting(org.apache.lucene.search.similarities.AssertingSimilarity@2ec58f02), locale=es-BR, timezone=Asia/Kolkata
   [junit4]   2> NOTE: Linux 4.15.0-24-generic amd64/Oracle Corporation 9.0.4 (64-bit)/cpus=8,threads=1,free=181310592,total=518979584
{noformat}

{noformat}
   [junit4]   2> NOTE: reproduce with: ant test  -Dtestcase=TestHdfsCloudBackupRestore -Dtests.method=test -Dtests.seed=BC266A8BBC96BD8C -Dtests.multiplier=3 -Dtests.slow=true -Dtests.locale=es-GT -Dtests.timezone=America/Phoenix -Dtests.asserts=true -Dtests.file.encoding=ISO-8859-1
   [junit4] FAILURE 11.0s J0 | TestHdfsCloudBackupRestore.test <<<
   [junit4]    > Throwable #1: java.lang.AssertionError: expected:<COMPLETED> but was:<FAILED>
   [junit4]    > 	at __randomizedtesting.SeedInfo.seed([BC266A8BBC96BD8C:34725551126AD074]:0)
   [junit4]    > 	at org.apache.solr.cloud.api.collections.AbstractCloudBackupRestoreTestCase.testBackupAndRestore(AbstractCloudBackupRestoreTestCase.java:327)
   [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)
{noformat}


> Restore collection does not respect user specified replicationFactor
> --------------------------------------------------------------------
>
>                 Key: SOLR-12489
>                 URL: https://issues.apache.org/jira/browse/SOLR-12489
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: Varun Thacker
>            Assignee: Varun Thacker
>            Priority: Major
>              Labels: Backup/Restore
>             Fix For: master (8.0), 7.5
>
>         Attachments: SOLR-12489.patch
>
>
> When restoring a collection we can pass in the replicationFactor 
> However while restoring the collection we don't make use of this param and end up using whatever is present  as the nrtReplicas key in the state.json
>  
> {code:java}
> int numNrtReplicas = getInt(message, NRT_REPLICAS, backupCollectionState.getNumNrtReplicas(), 0);
> if (numNrtReplicas == 0) {
>   numNrtReplicas = getInt(message, REPLICATION_FACTOR, backupCollectionState.getReplicationFactor(), 0);
> }{code}
> The tests didn't catch this as the create collection call from SolrJ sets nrtReplicas = replicationFactor and then we never restore with a different replicationFactor



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

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org