You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by Junyang Liu <th...@126.com> on 2022/09/20 18:08:25 UTC

Delete quota node in zookeeper when configs are empty

Hi,


When configuring flow control quota for users and clients, Kafka will add a child node to /config/users or /config/clients in zookeeper. When deleting a flow control quota config, the existing node in zookeeper will not be deleted even if the configs in the node are empty. So if a client repeatedly configure and delete flow control quota for different users and clients, the node in zookeeper will increase continuously, which may leads to severe problems such as memory leak.


I suggest that we can delete the node in zookeeper (child nodes under /config/users and /config/clients) if the configs in the node are empty.


Thanks,
-- Junyang Liu

Re:Re: Delete quota node in zookeeper when configs are empty

Posted by Junyang Liu <th...@126.com>.
Hi,
Thank you for your advice.
I have opened a JIRA for this improvement: 
    https://issues.apache.org/jira/browse/KAFKA-14285
And I have submitted a PR for it: 
    https://github.com/apache/kafka/pull/12727


Thank you.
-- Junyang Liu

At 2022-09-21 11:24:31, "Luke Chen" <sh...@gmail.com> wrote:
>Hi Junyang,
>
>Could you open a JIRA for this improvement?
>Also, if you're interested, welcome to submit a PR for it.
>
>Thank you.
>Luke
>
>On Wed, Sep 21, 2022 at 2:08 AM Junyang Liu <th...@126.com> wrote:
>
>> Hi,
>>
>>
>> When configuring flow control quota for users and clients, Kafka will add
>> a child node to /config/users or /config/clients in zookeeper. When
>> deleting a flow control quota config, the existing node in zookeeper will
>> not be deleted even if the configs in the node are empty. So if a client
>> repeatedly configure and delete flow control quota for different users and
>> clients, the node in zookeeper will increase continuously, which may leads
>> to severe problems such as memory leak.
>>
>>
>> I suggest that we can delete the node in zookeeper (child nodes under
>> /config/users and /config/clients) if the configs in the node are empty.
>>
>>
>> Thanks,
>> -- Junyang Liu

Re: Delete quota node in zookeeper when configs are empty

Posted by Luke Chen <sh...@gmail.com>.
Hi Junyang,

Could you open a JIRA for this improvement?
Also, if you're interested, welcome to submit a PR for it.

Thank you.
Luke

On Wed, Sep 21, 2022 at 2:08 AM Junyang Liu <th...@126.com> wrote:

> Hi,
>
>
> When configuring flow control quota for users and clients, Kafka will add
> a child node to /config/users or /config/clients in zookeeper. When
> deleting a flow control quota config, the existing node in zookeeper will
> not be deleted even if the configs in the node are empty. So if a client
> repeatedly configure and delete flow control quota for different users and
> clients, the node in zookeeper will increase continuously, which may leads
> to severe problems such as memory leak.
>
>
> I suggest that we can delete the node in zookeeper (child nodes under
> /config/users and /config/clients) if the configs in the node are empty.
>
>
> Thanks,
> -- Junyang Liu