Skip to content

Commit

Permalink
[Controller] fix standalone
Browse files Browse the repository at this point in the history
  • Loading branch information
jin-xiaofeng committed Jan 15, 2024
1 parent 0cfd837 commit 6c0a645
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions server/controller/election/election.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@ func getID() string {
}

func GetLeader() string {
if common.IsStandaloneRunningMode() {
// in standalone mode, the local machine is the master node because of all in one deployment
return getID()
}
return leaderData.GetLeader()
}

Expand Down

0 comments on commit 6c0a645

Please sign in to comment.