Re: UncleanLeaderElectionsPerSec metric and Raft

2023-10-24 Thread Justine Olshan
Hey folks,
Thanks for replying. If we could file a JIRA to track this work, that would
be great.

Thanks,
Justine

On Tue, Oct 24, 2023 at 11:55 AM Colin McCabe  wrote:

> Hi Neil,
>
> Yes, I think we should probably report the UncleanLeaderElectionsPerSec
> metric in KRaft. We don't have it currently.
>
> We do have the concept of unclean leader election in KRaft, but it has to
> be triggered by the leader election tool currently. We've been talking
> about adding configuration-based unclean leader election as part of the
> KIP-966 work.
>
> best,
> Colin
>
>
> On Wed, Oct 18, 2023, at 10:27, Neil Buesing wrote:
> > Development,
> >
> > with Raft controllers, is the unclean leader election / sec metric supose
> > to be available?
> >
> > kafka.controller:type=ControllerStats,name=UncleanLeaderElectionsPerSec
> >
> > Nothing in documentation indicates that it isn’t as well as in code
> > navigation nothing indicates to me that it wouldn’t show up, but even
> added
> > unclean leader election to true for both brokers and controllers and
> > nothing.
> >
> > (set this for all controllers and brokers)
> >   KAFKA_UNCLEAN_LEADER_ELECTION_ENABLE: true
> >
> > Happy to report a Jira, but wanted to figure out if the bug was in the
> > documentation or the metric not being available?
> >
> > Thanks,
> >
> > Neil
> >
> > P.S. I did confirm that others have seen and wondered about this,
> > https://github.com/strimzi/strimzi-kafka-operator/issues/8169, but that
> is
> > about the only other report on this I have found.
>


Re: UncleanLeaderElectionsPerSec metric and Raft

2023-10-24 Thread Colin McCabe
Hi Neil,

Yes, I think we should probably report the UncleanLeaderElectionsPerSec metric 
in KRaft. We don't have it currently.

We do have the concept of unclean leader election in KRaft, but it has to be 
triggered by the leader election tool currently. We've been talking about 
adding configuration-based unclean leader election as part of the KIP-966 work.

best,
Colin


On Wed, Oct 18, 2023, at 10:27, Neil Buesing wrote:
> Development,
>
> with Raft controllers, is the unclean leader election / sec metric supose
> to be available?
>
> kafka.controller:type=ControllerStats,name=UncleanLeaderElectionsPerSec
>
> Nothing in documentation indicates that it isn’t as well as in code
> navigation nothing indicates to me that it wouldn’t show up, but even added
> unclean leader election to true for both brokers and controllers and
> nothing.
>
> (set this for all controllers and brokers)
>   KAFKA_UNCLEAN_LEADER_ELECTION_ENABLE: true
>
> Happy to report a Jira, but wanted to figure out if the bug was in the
> documentation or the metric not being available?
>
> Thanks,
>
> Neil
>
> P.S. I did confirm that others have seen and wondered about this,
> https://github.com/strimzi/strimzi-kafka-operator/issues/8169, but that is
> about the only other report on this I have found.


Re: UncleanLeaderElectionsPerSec metric and Raft

2023-10-24 Thread José Armando García Sancio
Hi Neil,

You are correct. I don't think we have implemented the unclean
election configuration.

The kafka-leader-election CLI works with KRaft. Have you looked at
that option for performing unclean leader elections with the CLI? Does
it meet your requirements?

In general using the unclean leader election config is extremely
unsafe and I recommend using the CLI if it meets your requirements.

Thanks,
José

On Wed, Oct 18, 2023 at 10:28 AM Neil Buesing  wrote:
>
> Development,
>
> with Raft controllers, is the unclean leader election / sec metric supose
> to be available?
>
> kafka.controller:type=ControllerStats,name=UncleanLeaderElectionsPerSec
>
> Nothing in documentation indicates that it isn’t as well as in code
> navigation nothing indicates to me that it wouldn’t show up, but even added
> unclean leader election to true for both brokers and controllers and
> nothing.
>
> (set this for all controllers and brokers)
>   KAFKA_UNCLEAN_LEADER_ELECTION_ENABLE: true
>
> Happy to report a Jira, but wanted to figure out if the bug was in the
> documentation or the metric not being available?
>
> Thanks,
>
> Neil
>
> P.S. I did confirm that others have seen and wondered about this,
> https://github.com/strimzi/strimzi-kafka-operator/issues/8169, but that is
> about the only other report on this I have found.



-- 
-José


Re: UncleanLeaderElectionsPerSec metric and Raft

2023-10-24 Thread Luke Chen
Hi Justine,

Thanks for the response.
I also agree that even if after KIP-966 the unclean leader election might
be changed, we should still figure out if it's a missing feature or not,
and what's our plan for it.

Thanks.
Luke

On Mon, Oct 23, 2023 at 11:48 PM Justine Olshan
 wrote:

> Hey Neil,
>
> I was taking a look at this code, and noticed that some unclean leader
> election params were not implemented.
>
> https://github.com/apache/kafka/blob/4612fe42af0df0a4c1affaf66c55d01eb6267ce3/metadata/src/main/java/org/apache/kafka/controller/ConfigurationControlManager.java#L499
>
> I know you mentioned setting the non-topic config, but I wonder if the
> feature is generally not built out. I think that once KIP-966 is
> implemented, it will likely replace the old notion of unclean leader
> election.
>
> Still, if KRaft mode doesn't have unclean leader election, it should be
> documented. I will get back to you on this.
>
> Justine
>
> On Wed, Oct 18, 2023 at 10:30 AM Neil Buesing 
> wrote:
>
> > Development,
> >
> > with Raft controllers, is the unclean leader election / sec metric supose
> > to be available?
> >
> > kafka.controller:type=ControllerStats,name=UncleanLeaderElectionsPerSec
> >
> > Nothing in documentation indicates that it isn’t as well as in code
> > navigation nothing indicates to me that it wouldn’t show up, but even
> added
> > unclean leader election to true for both brokers and controllers and
> > nothing.
> >
> > (set this for all controllers and brokers)
> >   KAFKA_UNCLEAN_LEADER_ELECTION_ENABLE: true
> >
> > Happy to report a Jira, but wanted to figure out if the bug was in the
> > documentation or the metric not being available?
> >
> > Thanks,
> >
> > Neil
> >
> > P.S. I did confirm that others have seen and wondered about this,
> > https://github.com/strimzi/strimzi-kafka-operator/issues/8169, but that
> is
> > about the only other report on this I have found.
> >
>


Re: UncleanLeaderElectionsPerSec metric and Raft

2023-10-23 Thread Justine Olshan
Hey Neil,

I was taking a look at this code, and noticed that some unclean leader
election params were not implemented.
https://github.com/apache/kafka/blob/4612fe42af0df0a4c1affaf66c55d01eb6267ce3/metadata/src/main/java/org/apache/kafka/controller/ConfigurationControlManager.java#L499

I know you mentioned setting the non-topic config, but I wonder if the
feature is generally not built out. I think that once KIP-966 is
implemented, it will likely replace the old notion of unclean leader
election.

Still, if KRaft mode doesn't have unclean leader election, it should be
documented. I will get back to you on this.

Justine

On Wed, Oct 18, 2023 at 10:30 AM Neil Buesing  wrote:

> Development,
>
> with Raft controllers, is the unclean leader election / sec metric supose
> to be available?
>
> kafka.controller:type=ControllerStats,name=UncleanLeaderElectionsPerSec
>
> Nothing in documentation indicates that it isn’t as well as in code
> navigation nothing indicates to me that it wouldn’t show up, but even added
> unclean leader election to true for both brokers and controllers and
> nothing.
>
> (set this for all controllers and brokers)
>   KAFKA_UNCLEAN_LEADER_ELECTION_ENABLE: true
>
> Happy to report a Jira, but wanted to figure out if the bug was in the
> documentation or the metric not being available?
>
> Thanks,
>
> Neil
>
> P.S. I did confirm that others have seen and wondered about this,
> https://github.com/strimzi/strimzi-kafka-operator/issues/8169, but that is
> about the only other report on this I have found.
>


UncleanLeaderElectionsPerSec metric and Raft

2023-10-18 Thread Neil Buesing
Development,

with Raft controllers, is the unclean leader election / sec metric supose
to be available?

kafka.controller:type=ControllerStats,name=UncleanLeaderElectionsPerSec

Nothing in documentation indicates that it isn’t as well as in code
navigation nothing indicates to me that it wouldn’t show up, but even added
unclean leader election to true for both brokers and controllers and
nothing.

(set this for all controllers and brokers)
  KAFKA_UNCLEAN_LEADER_ELECTION_ENABLE: true

Happy to report a Jira, but wanted to figure out if the bug was in the
documentation or the metric not being available?

Thanks,

Neil

P.S. I did confirm that others have seen and wondered about this,
https://github.com/strimzi/strimzi-kafka-operator/issues/8169, but that is
about the only other report on this I have found.