Skip to content
This repository has been archived by the owner on Dec 1, 2022. It is now read-only.

speed up first election #387

Merged
merged 2 commits into from
Mar 18, 2021
Merged

Conversation

critical27
Copy link
Contributor

The quick path for first election term_ == 0 is not activated quite long ago. The first election will be triggered after raft_heartbeat_interval_secs, by default is 30s in configuration.

Just add it back, once I know who is leader(elected as leader/vote for other/receive valid logs), no more shortcut.

@darionyaphet
Copy link
Contributor

The quick path for first election term_ == 0 is not activated quite long ago. The first election will be triggered after raft_heartbeat_interval_secs, by default is 30s in configuration.

Just add it back, once I know who is leader(elected as leader/vote for other/receive valid logs), no more shortcut.

It seems to solve the problem that the leader didn't start the election for a period of time when it started?

@critical27
Copy link
Contributor Author

The quick path for first election term_ == 0 is not activated quite long ago. The first election will be triggered after raft_heartbeat_interval_secs, by default is 30s in configuration.
Just add it back, once I know who is leader(elected as leader/vote for other/receive valid logs), no more shortcut.

It seems to solve the problem that the leader didn't start the election for a period of time when it started?

Yeah, for reboot the cluster.

Copy link
Contributor

@liuyu85cn liuyu85cn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bright-starry-sky bright-starry-sky merged commit a67731f into vesoft-inc:master Mar 18, 2021
@critical27 critical27 deleted the speedup branch March 18, 2021 03:56
bright-starry-sky added a commit that referenced this pull request Mar 18, 2021
* fix index is missing during balance data (#391)

* speed up first election (#387)

Co-authored-by: yaphet <[email protected]>

* Delete the BR tool (move to https://github.com/vesoft-inc/nebula-br). (#395)

Co-authored-by: CBS <[email protected]>

* Upgrade tool forced type conversion (#392)

* support type default value

* address critical27's comments

* fix wrong error info (#397)

Co-authored-by: Doodle <[email protected]>
Co-authored-by: yaphet <[email protected]>
Co-authored-by: Simon Liu <[email protected]>
Co-authored-by: CBS <[email protected]>
Co-authored-by: panda-sheep <[email protected]>
critical27 added a commit that referenced this pull request Mar 21, 2021
* fix index is missing during balance data (#391)

* speed up first election (#387)

Co-authored-by: yaphet <[email protected]>

* Delete the BR tool (move to https://github.com/vesoft-inc/nebula-br). (#395)

Co-authored-by: CBS <[email protected]>

* Upgrade tool forced type conversion (#392)

* support type default value

* address critical27's comments

* fix wrong error info (#397)

* add cmake link obj (#385)

* removed resource in storage, just use graph's when package (#396)

* removed resource in storage, just use graph's when package

* fix build error

Co-authored-by: CBS <[email protected]>

* corrected template for listener (#401)

* apply change loadLeader (#400)

Co-authored-by: Doodle <[email protected]>
Co-authored-by: yaphet <[email protected]>
Co-authored-by: Simon Liu <[email protected]>
Co-authored-by: CBS <[email protected]>
Co-authored-by: panda-sheep <[email protected]>
Co-authored-by: kyle.cao <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
ready-for-testing PR: ready for the CI test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants