You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/02/26 01:56:18 UTC
[jira] [Commented] (KAFKA-3292)
ClientQuotaManager.getOrCreateQuotaSensors() may return a null
ClientSensors.throttleTimeSensor
[ https://issues.apache.org/jira/browse/KAFKA-3292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15168202#comment-15168202 ]
ASF GitHub Bot commented on KAFKA-3292:
---------------------------------------
GitHub user ijuma opened a pull request:
https://github.com/apache/kafka/pull/977
KAFKA-3292; ClientQuotaManager.getOrCreateQuotaSensors() may return a null ClientSensors.throttleTimeSensor
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/ijuma/kafka kafka-3292-null-throttle-time-sensor
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/kafka/pull/977.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 #977
----
commit 406330598bd0fc9b49b81ef4058db6ae97914163
Author: Ismael Juma <is...@juma.me.uk>
Date: 2016-02-26T00:54:45Z
Ensure that `ClientSensors` has non-null parameters
----
> ClientQuotaManager.getOrCreateQuotaSensors() may return a null ClientSensors.throttleTimeSensor
> -----------------------------------------------------------------------------------------------
>
> Key: KAFKA-3292
> URL: https://issues.apache.org/jira/browse/KAFKA-3292
> Project: Kafka
> Issue Type: Bug
> Reporter: Jun Rao
> Assignee: Ismael Juma
> Fix For: 0.10.0.0
>
>
> It seems that the following situation is possible. Two threads try to call getOrCreateQuotaSensors() at the same time. Initially, quotaSensor is not registered, then both threads try to get the write lock to register quotaSensor. Thread 1 grabs the write lock and registers both quotaSensor and throttleTimeSensor, and then releases the lock. Thread 2 grabs the write lock again and reads a non-null quotaSensor. It then skips the logic to register throttleTimeSensor and returns. However, the returned throttleTimeSensor will be null.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)