Closed amuraru closed 4 years ago
Hi @amuraru This is indeed intentional -- i.e.PreferredLeaderElectionGoal
is not intended to be used as part of the goal violation detection and this error message is expected. It is used for triggering an on-demand PLE operation to move the leadership within partitions to their most preferred replicas in their replica list.
Hope it helps!
Right - I get that it's not meant be used as a detection goal, what I tried though is to use it as a self.healing goal only. Is that any different than running it theough manual PLE? (Fwiw running manually a rebalance using this goal works so was wondering can it be used in self.healing similarlt)
@efeg I see now that the PLE on-demand request is actually using the rebalance API with PLEGoal. But still have this question: would it override any other goal decision if used as a last priority goal in self.healing.goals list?
In my environment I am seeing quite often partions served by non preferred leaders and wondering if we can automate the PLE via self.healing mechanims and always run PLEGoal whenever the goal violation detector detects imbalances via other goals.
Thanks
In my environment I am seeing quite often partions served by non preferred leaders
Why is this is a problem? As long as the self healing goals are satisfied, would it matter whether the leader is currently in a preferred replica or not?
would it override any other goal decision if used as a last priority goal in self.healing.goals list?
Current implementation does not support running PreferredLeaderElectionGoal
alongside the other goals. It is intended to be used either by itself for a PLE
operation or (internally) by the demote operation. Hypothetically, running it as the last self-healing goal would have overridden other goal decisions.
makes sense @efeg - closing this issue now
I am trying to use
PreferredLeaderElectionGoal
as a self.healing goal (not included as anomaly.detection goal it seems that it cannot be used in the detector)Trying to use this, though I get the same error
PreferredLeaderElectionGoal goal does not support use by goal violation detector
. Is this expected? Doing a cluster rebalance with this goal seems to work though: