kafka-jira mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (KAFKA-5879) Controller should read the latest IsrChangeNotification znodes when handling IsrChangeNotification event
Date Wed, 13 Sep 2017 00:30:00 GMT

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

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

GitHub user lindong28 opened a pull request:

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

    KAFKA-5879; Controller should read the latest IsrChangeNotification znodes when handling
IsrChangeNotification event

    …

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

    $ git pull https://github.com/lindong28/kafka KAFKA-5879

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

    https://github.com/apache/kafka/pull/3840.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 #3840
    
----
commit 54160a4d1780e58317e14f75754b40cefb5ac79a
Author: Dong Lin <lindong28@gmail.com>
Date:   2017-09-12T22:38:26Z

    KAFKA-5879; Controller should read the latest IsrChangeNotification znodes when handling
IsrChangeNotification event

----


> Controller should read the latest IsrChangeNotification znodes when handling IsrChangeNotification
event
> --------------------------------------------------------------------------------------------------------
>
>                 Key: KAFKA-5879
>                 URL: https://issues.apache.org/jira/browse/KAFKA-5879
>             Project: Kafka
>          Issue Type: Bug
>            Reporter: Dong Lin
>            Assignee: Dong Lin
>            Priority: Critical
>
> Currently controller can be very inefficient in handling IsrChangeNotification event
because it may need to access znode O(n^2) times to handle O( n ) IsrChangeNotification znodes.
> For example, say there are 100 IsrChangeNotification nodes added to the zookeeper. This
will generate 100 IsrChangeNotification events with children [1], [1, 2], [1, 2, 3], ... [1,
2, .. 100]. Let's say the controller now needs to handle the IsrChangeNotification event with
children [1, 2, ... 100]. Controller will read zookeeper 100 times, delete these 100 znodes,
which further generates 100 IsrChangeNotification events with children count from 0 to 99.
> The main cause of the problem is that, controller will attempt to access zookeeper n
times, where n is the count of the children at the time the IsrChangeNotification event is
generated, even though there is no IsrChangeNotification znodes in the zookeeper.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message