GitHub user ijuma opened a pull request:

    https://github.com/apache/kafka/pull/4219

    MINOR: Fix NPE in unregisterPartitionReassignmentIsrChangeHandlers

    I was looking at a transient failures of 
`shouldPerformMultipleReassignmentOperationsOverVariousTopics`
    and came across a NPE and misleading log line (see below).
    
    Not sure if this will fix the transient failure, but worth fixing anyway.
    
    [2017-11-15 10:30:13,869] ERROR Error while creating ephemeral at 
/controller with return code: OK (kafka.zk.KafkaZkClient$CheckedEphemeral:101)
    [2017-11-15 10:30:14,155] ERROR Haven't been able to send leader and isr 
requests, current state of the map is Map(101 -> Map(topic1-0 -> 
PartitionState(controllerEpoch=2, leader=101, leaderEpoch=3, isr=101, 
zkVersion=3, replicas=100,102,101, isNew=false)), 100 -> Map(topic1-0 -> 
PartitionState(controllerEpoch=2, leader=101, leaderEpoch=3, isr=101, 
zkVersion=3, replicas=100,102,101, isNew=false)), 102 -> Map(topic1-0 -> 
PartitionState(controllerEpoch=2, leader=101, leaderEpoch=3, isr=101, 
zkVersion=3, replicas=100,102,101, isNew=false))). Exception message: 
java.lang.InterruptedException 
(kafka.controller.ControllerBrokerRequestBatch:101)
    [2017-11-15 10:30:14,156] ERROR Haven't been able to send metadata update 
requests to brokers Set(102, 103, 104, 101, 105), current state of the 
partition info is Map(topic1-0 -> PartitionState(controllerEpoch=1, leader=101, 
leaderEpoch=2, isr=[101], zkVersion=2, replicas=[100, 102, 101], 
offlineReplicas=[100])). Exception message: java.lang.InterruptedException 
(kafka.controller.ControllerBrokerRequestBatch:101)
    [2017-11-15 10:30:14,158] ERROR [Controller id=101] Forcing the controller 
to resign (kafka.controller.KafkaController:101)
    [2017-11-15 10:30:14,158] ERROR [Controller id=101] Error completing 
reassignment of partition topic1-0 (kafka.controller.KafkaController:107)
    java.lang.NullPointerException
        at 
kafka.controller.KafkaController$$anonfun$unregisterPartitionReassignmentIsrChangeHandlers$1.apply(KafkaController.scala:784)
        at 
kafka.controller.KafkaController$$anonfun$unregisterPartitionReassignmentIsrChangeHandlers$1.apply(KafkaController.scala:783)
    
    ### Committer Checklist (excluded from commit message)
    - [ ] Verify design and implementation 
    - [ ] Verify test coverage and CI build status
    - [ ] Verify documentation (including upgrade notes)


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/ijuma/kafka fix-npe-unregister-zk-listener

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/kafka/pull/4219.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #4219
    
----
commit 7ff71b19c5ff24a2e67a94579fc770dfd67722cd
Author: Ismael Juma <ism...@juma.me.uk>
Date:   2017-11-15T14:27:37Z

    Avoid NPE in `unregisterPartitionReassignmentIsrChangeHandlers`

commit df05c6e2f26bde5bff747792a479cf1226adc7c6
Author: Ismael Juma <ism...@juma.me.uk>
Date:   2017-11-15T14:30:54Z

    Improve logging if ephemeral node creation fails

----


---

Reply via email to