[jira] [Commented] (KAFKA-6638) Leader should remove unassigned replica from ISR

2018-07-22 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/KAFKA-6638?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16552188#comment-16552188
 ] 

ASF GitHub Bot commented on KAFKA-6638:
---

lindong28 closed pull request #4696: KAFKA-6638; Leader should remove 
unassigned replica from ISR
URL: https://github.com/apache/kafka/pull/4696
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/core/src/main/scala/kafka/cluster/Partition.scala 
b/core/src/main/scala/kafka/cluster/Partition.scala
index 3b97671524d..2448553ffec 100755
--- a/core/src/main/scala/kafka/cluster/Partition.scala
+++ b/core/src/main/scala/kafka/cluster/Partition.scala
@@ -259,7 +259,7 @@ class Partition(val topic: String,
   val newInSyncReplicas = 
partitionStateInfo.basePartitionState.isr.asScala.map(r => 
getOrCreateReplica(r, partitionStateInfo.isNew)).toSet
   // remove assigned replicas that have been removed by the controller
   (assignedReplicas.map(_.brokerId) -- 
newAssignedReplicas).foreach(removeReplica)
-  inSyncReplicas = newInSyncReplicas
+  inSyncReplicas = newInSyncReplicas.filter(replica => 
newAssignedReplicas.contains(replica.brokerId))
 
   info(s"$topicPartition starts at Leader Epoch 
${partitionStateInfo.basePartitionState.leaderEpoch} from offset 
${getReplica().get.logEndOffset.messageOffset}. Previous Leader Epoch was: 
$leaderEpoch")
 


 


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


> Leader should remove unassigned replica from ISR
> 
>
> Key: KAFKA-6638
> URL: https://issues.apache.org/jira/browse/KAFKA-6638
> Project: Kafka
>  Issue Type: Improvement
>Reporter: Dong Lin
>Assignee: Dong Lin
>Priority: Major
>
> During partition reassignment, controller may remove a replica from the 
> replica set while still keeping the replica in the isr set. One solution to 
> fix this issue is to let the controller remove replica from isr set as well. 
> This requires more change in the code because controller needs to update the 
> zookeeper node to change the isr properly. Another solution, which keeps 
> controller simple, is to let leader node remove unassigned replica from the 
> isr set.



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


[jira] [Commented] (KAFKA-6638) Leader should remove unassigned replica from ISR

2018-03-12 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-6638?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16396325#comment-16396325
 ] 

ASF GitHub Bot commented on KAFKA-6638:
---

lindong28 opened a new pull request #4696: KAFKA-6638; Leader should remove 
unassigned replica from ISR
URL: https://github.com/apache/kafka/pull/4696
 
 
   During partition reassignment, controller may remove a replica from the 
replica set while still keeping the replica in the isr set. One solution to fix 
this issue is to let the controller remove replica from isr set as well. This 
requires more change in the code because controller needs to update the 
zookeeper node to change the isr properly. Another solution, which keeps 
controller simple, is to let leader node remove unassigned replica from the isr 
set.
   
   ### Committer Checklist (excluded from commit message)
   - [ ] Verify design and implementation 
   - [ ] Verify test coverage and CI build status
   - [ ] Verify documentation (including upgrade notes)
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


> Leader should remove unassigned replica from ISR
> 
>
> Key: KAFKA-6638
> URL: https://issues.apache.org/jira/browse/KAFKA-6638
> Project: Kafka
>  Issue Type: Improvement
>Reporter: Dong Lin
>Assignee: Dong Lin
>Priority: Major
>
> During partition reassignment, controller may remove a replica from the 
> replica set while still keeping the replica in the isr set. One solution to 
> fix this issue is to let the controller remove replica from isr set as well. 
> This requires more change in the code because controller needs to update the 
> zookeeper node to change the isr properly. Another solution, which keeps 
> controller simple, is to let leader node remove unassigned replica from the 
> isr set.



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