[ https://issues.apache.org/jira/browse/KAFKA-2944?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15103738#comment-15103738 ]
ASF GitHub Bot commented on KAFKA-2944: --------------------------------------- GitHub user ZoneMayor reopened a pull request: https://github.com/apache/kafka/pull/723 KAFKA-2944: fix NullPointerException in KafkaConfigStorage Lost of "config messages" can affect the logic of KafkaConfigStorage; Call readToEnd after sending each message to KafkaBasedLog to ensure that all config messages are flushed to Kafka; Since "config messages" sending to KafkaBasedLog are metadata, it will not affect performance too much; You can merge this pull request into a Git repository by running: $ git pull https://github.com/ZoneMayor/kafka trunk-KAFKA-2944 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/kafka/pull/723.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 #723 ---- commit 34240b52e1b70aa172b65155f6042243d838b420 Author: ZoneMayor <jinxing6...@126.com> Date: 2015-12-18T07:22:20Z Merge pull request #12 from apache/trunk 2015-12-18 commit 52d02f333e86d06cfa8fff5facd18999b3db6d83 Author: ZoneMayor <jinxing6...@126.com> Date: 2015-12-30T03:08:08Z Merge pull request #13 from apache/trunk 2015-12-30 commit 82150dccc59ac0e436acc5186d2b8fb66c9df671 Author: jinxing <jinx...@fenbi.com> Date: 2016-01-01T15:21:41Z KAFKA-2944: fix NullPointerException in KafkaConfigStorage commit 320386d2c484dac7eed9b7fe1584ca376e4ad897 Author: jinxing <jinx...@fenbi.com> Date: 2016-01-03T06:09:00Z fix commit 67d1b21661886b204bbb86bc472a2ecce57613dc Author: jinxing <jinx...@fenbi.com> Date: 2016-01-03T07:45:53Z small fix commit c31562642eaf2fa9bd35366246430fa6de8be6d8 Author: jinxing <jinx...@fenbi.com> Date: 2016-01-09T10:46:43Z Revert "small fix" This reverts commit 67d1b21661886b204bbb86bc472a2ecce57613dc. commit ef1d9a8921d2e5060824878d7212b1d50454e0f9 Author: jinxing <jinx...@fenbi.com> Date: 2016-01-09T10:48:44Z Revert "fix" This reverts commit 320386d2c484dac7eed9b7fe1584ca376e4ad897. commit 5c09181de11a5cdae78acf690513f0166a1d5c21 Author: jinxing <jinx...@fenbi.com> Date: 2016-01-09T10:48:58Z Revert "KAFKA-2944: fix NullPointerException in KafkaConfigStorage" This reverts commit 82150dccc59ac0e436acc5186d2b8fb66c9df671. commit eba2a0737ae93f3d8e0137c5901277f53c62daac Author: jinxing <jinx...@fenbi.com> Date: 2016-01-10T08:25:36Z KAFKA-2944: fix NullPointerException in KafkaConfigStorage ---- > NullPointerException in KafkaConfigStorage when config storage starts right > before shutdown request > --------------------------------------------------------------------------------------------------- > > Key: KAFKA-2944 > URL: https://issues.apache.org/jira/browse/KAFKA-2944 > Project: Kafka > Issue Type: Bug > Components: copycat > Affects Versions: 0.9.0.0 > Reporter: Ewen Cheslack-Postava > Assignee: Ewen Cheslack-Postava > > Relevant log where you can see a config update starting, then the request to > shutdown happens and we end up with a NullPointerException: > {quote} > [2015-12-03 09:12:55,712] DEBUG Change in connector task count from 2 to 3, > writing updated task configurations > (org.apache.kafka.connect.runtime.distributed.DistributedHerder) > [2015-12-03 09:12:56,224] INFO Kafka Connect stopping > (org.apache.kafka.connect.runtime.Connect) > [2015-12-03 09:12:56,224] INFO Stopping REST server > (org.apache.kafka.connect.runtime.rest.RestServer) > [2015-12-03 09:12:56,227] INFO Stopped > ServerConnector@10cb550e{HTTP/1.1}{0.0.0.0:8083} > (org.eclipse.jetty.server.ServerConnector) > [2015-12-03 09:12:56,234] INFO Stopped > o.e.j.s.ServletContextHandler@3f8a24d5{/,null,UNAVAILABLE} > (org.eclipse.jetty.server.handler.ContextHandler) > [2015-12-03 09:12:56,235] INFO REST server stopped > (org.apache.kafka.connect.runtime.rest.RestServer) > [2015-12-03 09:12:56,235] INFO Herder stopping > (org.apache.kafka.connect.runtime.distributed.DistributedHerder) > [2015-12-03 09:12:58,209] ERROR Unexpected exception in KafkaBasedLog's work > thread (org.apache.kafka.connect.util.KafkaBasedLog) > java.lang.NullPointerException > at > org.apache.kafka.connect.storage.KafkaConfigStorage.completeTaskIdSet(KafkaConfigStorage.java:558) > at > org.apache.kafka.connect.storage.KafkaConfigStorage.access$1200(KafkaConfigStorage.java:143) > at > org.apache.kafka.connect.storage.KafkaConfigStorage$1.onCompletion(KafkaConfigStorage.java:476) > at > org.apache.kafka.connect.storage.KafkaConfigStorage$1.onCompletion(KafkaConfigStorage.java:372) > at > org.apache.kafka.connect.util.KafkaBasedLog.poll(KafkaBasedLog.java:235) > at > org.apache.kafka.connect.util.KafkaBasedLog.readToLogEnd(KafkaBasedLog.java:275) > at > org.apache.kafka.connect.util.KafkaBasedLog.access$300(KafkaBasedLog.java:70) > at > org.apache.kafka.connect.util.KafkaBasedLog$WorkThread.run(KafkaBasedLog.java:307) > [2015-12-03 09:13:26,704] ERROR Failed to write root configuration to Kafka: > (org.apache.kafka.connect.storage.KafkaConfigStorage) > java.util.concurrent.TimeoutException: Timed out waiting for future > at > org.apache.kafka.connect.util.ConvertingFutureCallback.get(ConvertingFutureCallback.java:74) > at > org.apache.kafka.connect.storage.KafkaConfigStorage.putTaskConfigs(KafkaConfigStorage.java:352) > at > org.apache.kafka.connect.runtime.distributed.DistributedHerder.reconfigureConnector(DistributedHerder.java:737) > at > org.apache.kafka.connect.runtime.distributed.DistributedHerder.reconfigureConnectorTasksWithRetry(DistributedHerder.java:677) > at > org.apache.kafka.connect.runtime.distributed.DistributedHerder.startConnector(DistributedHerder.java:673) > at > org.apache.kafka.connect.runtime.distributed.DistributedHerder.startWork(DistributedHerder.java:640) > at > org.apache.kafka.connect.runtime.distributed.DistributedHerder.handleRebalanceCompleted(DistributedHerder.java:598) > at > org.apache.kafka.connect.runtime.distributed.DistributedHerder.tick(DistributedHerder.java:184) > at > org.apache.kafka.connect.runtime.distributed.DistributedHerder.run(DistributedHerder.java:159) > at java.lang.Thread.run(Thread.java:745) > [2015-12-03 09:13:26,704] ERROR Failed to reconfigure connector's tasks, > retrying after backoff: > (org.apache.kafka.connect.runtime.distributed.DistributedHerder) > org.apache.kafka.connect.errors.ConnectException: Error writing root > configuration to Kafka > at > org.apache.kafka.connect.storage.KafkaConfigStorage.putTaskConfigs(KafkaConfigStorage.java:355) > at > org.apache.kafka.connect.runtime.distributed.DistributedHerder.reconfigureConnector(DistributedHerder.java:737) > at > org.apache.kafka.connect.runtime.distributed.DistributedHerder.reconfigureConnectorTasksWithRetry(DistributedHerder.java:677) > at > org.apache.kafka.connect.runtime.distributed.DistributedHerder.startConnector(DistributedHerder.java:673) > at > org.apache.kafka.connect.runtime.distributed.DistributedHerder.startWork(DistributedHerder.java:640) > at > org.apache.kafka.connect.runtime.distributed.DistributedHerder.handleRebalanceCompleted(DistributedHerder.java:598) > at > org.apache.kafka.connect.runtime.distributed.DistributedHerder.tick(DistributedHerder.java:184) > at > org.apache.kafka.connect.runtime.distributed.DistributedHerder.run(DistributedHerder.java:159) > at java.lang.Thread.run(Thread.java:745) > Caused by: java.util.concurrent.TimeoutException: Timed out waiting for future > at > org.apache.kafka.connect.util.ConvertingFutureCallback.get(ConvertingFutureCallback.java:74) > at > org.apache.kafka.connect.storage.KafkaConfigStorage.putTaskConfigs(KafkaConfigStorage.java:352) > ... 8 more > {quote} > I'm not certain that the issue is specifically due to shutting down (the > KafkaConfigStorage.stop() hasn't been invoked yet when this occurs, so the > underlying KafkaBasedLog is still running, although shutdown of the entire > process has started), but this has only shown up during shutdown so far. -- This message was sent by Atlassian JIRA (v6.3.4#6332)