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

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

lindong28 opened a new pull request #5533: KAFKA-7313; StopReplicaRequest 
should not remove partition from ReplicaManager.allPartitions if the replica is 
offline
URL: https://github.com/apache/kafka/pull/5533
 
 
   
   ### 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


> StopReplicaRequest should not remove partition from 
> ReplicaManager.allPartitions if the replica is offline
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: KAFKA-7313
>                 URL: https://issues.apache.org/jira/browse/KAFKA-7313
>             Project: Kafka
>          Issue Type: Improvement
>            Reporter: Dong Lin
>            Assignee: Dong Lin
>            Priority: Major
>
> Currently if a broker received StopReplicaRequest with delete=true for the 
> same offline replica, the first StopRelicaRequest will show 
> KafkaStorageException and the second StopRelicaRequest will show 
> ReplicaNotAvailableException. This is because the first StopRelicaRequest 
> will remove the mapping (tp -> ReplicaManager.OfflinePartition) from 
> ReplicaManager.allPartitions before returning KafkaStorageException, thus the 
> second StopRelicaRequest will not find this partition as offline.
> This result appears to be inconsistent. And since the replica is already 
> offline and broker will not be able to delete file for this replica, the 
> StopReplicaRequest should fail without making any change and broker should 
> still remember that this replica is offline.



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

Reply via email to