madrob commented on a change in pull request #2120:
URL: https://github.com/apache/lucene-solr/pull/2120#discussion_r541219690



##########
File path: 
solr/core/src/java/org/apache/solr/handler/admin/CollectionsHandler.java
##########
@@ -1306,7 +1306,7 @@ private static void forceLeaderElection(SolrQueryRequest 
req, CollectionsHandler
     try (ZkShardTerms zkShardTerms = new ZkShardTerms(collectionName, 
slice.getName(), zkController.getZkClient())) {
       // if an active replica is the leader, then all is fine already
       Replica leader = slice.getLeader();
-      if (leader != null && leader.getState() == State.ACTIVE) {
+      if (leader != null && leader.getState() == State.ACTIVE && 
zkShardTerms.getHighestTerm() == zkShardTerms.getTerm(leader.getName())) {

Review comment:
       I think I need to revert this part since I'm not touching terms anymore 
anyway.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to