[jira] [Commented] (SOLR-5589) Disabled replication in config is ignored
[ https://issues.apache.org/jira/browse/SOLR-5589?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13891240#comment-13891240 ] alexey commented on SOLR-5589: -- I've attached new patch which illustrates and tests my initial concern. I've introduced new config param replicationEnabled to control enable\disable replication on master similar to enable\disable command. Disabled replication in config is ignored - Key: SOLR-5589 URL: https://issues.apache.org/jira/browse/SOLR-5589 Project: Solr Issue Type: Bug Components: replication (java) Affects Versions: 4.5 Reporter: alexey Assignee: Shalin Shekhar Mangar Fix For: 4.7 Attachments: SOLR-5589.patch, SOLR-5589.patch, SOLR-5589.patch, SOLR-5589.patch, SOLR-5589.patch When replication on master node is explicitly disabled in config, it is still enabled after start. This is because when both master and slave configurations are written with enabled=false, replication handler considers this node is a master and enables it. With proposed patch handler will consider this as master node but will disable replication on startup if it is disabled in config (equivalent to disablereplication command). -- This message was sent by Atlassian JIRA (v6.1.5#6160) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-5589) Disabled replication in config is ignored
[ https://issues.apache.org/jira/browse/SOLR-5589?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13885556#comment-13885556 ] Vitaliy Zhovtyuk commented on SOLR-5589: Lets consider the following config: requestHandler name=/replication class=solr.ReplicationHandler lst name=master str name=replicateAftercommit/str str name=confFilesschema.xml/str /lst lst name=slave str name=enablefalse/str str name=masterUrlhttp://127.0.0.1:TEST_PORT/solr/str str name=pollInterval00:00:01/str str name=compressionCOMPRESSION/str /lst /requestHandler Slave is disabled, but master can be used to replicate to separate Solr instance. Therefore i think it's only make sense to disable replication when both master and slave explicitly disabled. And i think it will not have side effects with replication when slave is disabled for some reason, but master is replication to separate instance. Disabled replication in config is ignored - Key: SOLR-5589 URL: https://issues.apache.org/jira/browse/SOLR-5589 Project: Solr Issue Type: Bug Components: replication (java) Affects Versions: 4.5 Reporter: alexey Assignee: Shalin Shekhar Mangar Fix For: 4.7 Attachments: SOLR-5589.patch, SOLR-5589.patch, SOLR-5589.patch, SOLR-5589.patch When replication on master node is explicitly disabled in config, it is still enabled after start. This is because when both master and slave configurations are written with enabled=false, replication handler considers this node is a master and enables it. With proposed patch handler will consider this as master node but will disable replication on startup if it is disabled in config (equivalent to disablereplication command). -- This message was sent by Atlassian JIRA (v6.1.5#6160) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-5589) Disabled replication in config is ignored
[ https://issues.apache.org/jira/browse/SOLR-5589?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13884259#comment-13884259 ] alexey commented on SOLR-5589: -- Vitaly, ok it looks like my initial patch was not comlete. Thank you for working on it. What if enable attribute will be optional and will be used only for explicit disabling when someone need it? Missing enable attribute is treated as True to provide backwards compatibility. Ideally the following config to be enough to say that we want replication but disabled at startup. requestHandler name=/replication class=solr.ReplicationHandler lst name=master str name=enablefalse/str str name=replicateAftercommit/str str name=confFilesschema.xml/str /lst /requestHandler So the patch could be changed to something like if(disabledExplicitly(slave) || disabledExplicitly(master)){ replicationEnabled.set(false); } Disabled replication in config is ignored - Key: SOLR-5589 URL: https://issues.apache.org/jira/browse/SOLR-5589 Project: Solr Issue Type: Bug Components: replication (java) Affects Versions: 4.5 Reporter: alexey Assignee: Shalin Shekhar Mangar Fix For: 4.7 Attachments: SOLR-5589.patch, SOLR-5589.patch, SOLR-5589.patch, SOLR-5589.patch When replication on master node is explicitly disabled in config, it is still enabled after start. This is because when both master and slave configurations are written with enabled=false, replication handler considers this node is a master and enables it. With proposed patch handler will consider this as master node but will disable replication on startup if it is disabled in config (equivalent to disablereplication command). -- This message was sent by Atlassian JIRA (v6.1.5#6160) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-5589) Disabled replication in config is ignored
[ https://issues.apache.org/jira/browse/SOLR-5589?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13881746#comment-13881746 ] Shalin Shekhar Mangar commented on SOLR-5589: - There are multiple test failures with this patch. ant test: [junit4] Tests with failures (first 10 out of 12): [junit4] - org.apache.solr.cloud.ChaosMonkeySafeLeaderTest.testDistribSearch [junit4] - org.apache.solr.cloud.ShardSplitTest.testDistribSearch [junit4] - org.apache.solr.cloud.MigrateRouteKeyTest.testDistribSearch [junit4] - org.apache.solr.cloud.SyncSliceTest.testDistribSearch [junit4] - org.apache.solr.cloud.BasicDistributedZk2Test.testDistribSearch [junit4] - org.apache.solr.cloud.UnloadDistributedZkTest.testDistribSearch [junit4] - org.apache.solr.handler.TestReplicationHandler.doTestRepeater [junit4] - org.apache.solr.handler.TestReplicationHandler.doTestStressReplication [junit4] - org.apache.solr.cloud.ChaosMonkeyNothingIsSafeTest.testDistribSearch [junit4] - org.apache.solr.handler.TestReplicationHandler.doTestSnapPullWithMasterUrl Failure from TestReplicationHandler.doTestStressReplication: {code} java.lang.AssertionError: Expected :1390637702930 Actual :0 Click to see difference at __randomizedtesting.SeedInfo.seed([A247ABF79E59A37B:79ECAB319B71CAC8]:0) at org.junit.Assert.fail(Assert.java:93) at org.junit.Assert.failNotEquals(Assert.java:647) at org.junit.Assert.assertEquals(Assert.java:128) at org.junit.Assert.assertEquals(Assert.java:147) at org.apache.solr.handler.TestReplicationHandler.assertVersions(TestReplicationHandler.java:980) at org.apache.solr.handler.TestReplicationHandler.doTestStressReplication(TestReplicationHandler.java:832) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at com.carrotsearch.randomizedtesting.RandomizedRunner.invoke(RandomizedRunner.java:1559) {code} Disabled replication in config is ignored - Key: SOLR-5589 URL: https://issues.apache.org/jira/browse/SOLR-5589 Project: Solr Issue Type: Bug Components: replication (java) Affects Versions: 4.5 Reporter: alexey Assignee: Shalin Shekhar Mangar Fix For: 4.7 Attachments: SOLR-5589.patch, SOLR-5589.patch, SOLR-5589.patch When replication on master node is explicitly disabled in config, it is still enabled after start. This is because when both master and slave configurations are written with enabled=false, replication handler considers this node is a master and enables it. With proposed patch handler will consider this as master node but will disable replication on startup if it is disabled in config (equivalent to disablereplication command). -- This message was sent by Atlassian JIRA (v6.1.5#6160) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org