Skip to content

Implementing LeaderElectionRunnable for CostAccrual #95

Description

@kerthcet

What happened:

A plain controller-runtime manager.Runnable does not opt into leader election; runnables that do not implement LeaderElectionRunnable are started on every replica. With HA replicas this loop therefore performs competing accrual writes and splits successful windows across process-local counters, exactly the state this comment intends to prevent. Make CostAccrual implement NeedLeaderElection() bool and return true.

What you expected to happen:

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:

Environment:

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugCategorizes issue or PR as related to a bug.good first issueGood for newcomershelp wantedExtra attention is neededneeds-priorityIndicates a PR lacks a label and requires one.needs-triageIndicates an issue or PR lacks a label and requires one.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions