[
https://issues.apache.org/jira/browse/SOLR-12412?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16547281#comment-16547281
]
Varun Thacker commented on SOLR-12412:
--------------------------------------
Got it!
{code:java}
//TODO better way to test this
Thread.sleep(5000);
Replica leader = getCollectionState(collection).getSlice("shard1").getLeader();
assertEquals(leader.getName(), oldLeader.getName());
if (otherReplicaJetty != null) {
// won't be able to do anything here, since this replica can't recovery from
the leader
otherReplicaJetty.start();
}{code}
Should we start the otherReplicaJetty and then check if the leader doesn't
change in the test i.e reverse the order here ?
Also maybe we can add the explanation as comments to the test code ? To someone
new it would make it a lot easier to understand what this test is trying to do.
> Leader should give up leadership when IndexWriter.tragedy occur
> ---------------------------------------------------------------
>
> Key: SOLR-12412
> URL: https://issues.apache.org/jira/browse/SOLR-12412
> Project: Solr
> Issue Type: Improvement
> Security Level: Public(Default Security Level. Issues are Public)
> Reporter: Cao Manh Dat
> Assignee: Cao Manh Dat
> Priority: Major
> Fix For: master (8.0), 7.5
>
> Attachments: SOLR-12412.patch, SOLR-12412.patch,
> jenkins-failure-2325.log
>
>
> When a leader meets some kind of unrecoverable exception (ie:
> CorruptedIndexException). The shard will go into the readable state and human
> has to intervene.
> In that case, if there are another active replica in the same shard, the
> leader should give up its leadership.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]