Skip to content

Load rules should not block leader election #10118

@rleungx

Description

@rleungx

Enhancement Task

Before a PD becomes the leader, it will do some initialization work, see

if err := l.loadRules(); err != nil {

if err := m.loadRules(); err != nil {
return err
}
if err := m.loadGroups(); err != nil {
return err
}

If one of them has too many rules, the election will be blocked. It can significantly increase the unavailable time. One possible solution is moving these kinds of jobs to the coordinator. We can also guarantee that they are loaded before the scheduling job starts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions