Proto commits in xline-kv/Xline

These 41 commits are when the Protocol Buffers files have changed:

Commit:38a1c66
Author:iGxnon
Committer:mergify[bot]

chore: move crates into crates/ Signed-off-by: iGxnon <igxnon@gmail.com>

The documentation is generated from this commit.

Commit:f84628a
Author:themanforfree
Committer:mergify[bot]

chore: rename TryBeLeaderNow to TryBecomeLeaderNow Signed-off-by: themanforfree <themanforfree@gmail.com>

Commit:a115ead
Author:themanforfree
Committer:mergify[bot]

chore: some refactor rename timeout_now to try_be_leader_now add timeout for try_be_leader_now rpc check transferee when handle_conf_change and handle_publish update log and variable name Signed-off-by: themanforfree <themanforfree@gmail.com>

Commit:78369a9
Author:themanforfree
Committer:mergify[bot]

feat: support move leader Signed-off-by: themanforfree <themanforfree@gmail.com>

Commit:5dc185b
Author:themanforfree
Committer:Phoenix

fix: fix cluster shutdown after member add Signed-off-by: themanforfree <themanforfree@gmail.com>

Commit:84c685a
Author:themanforfree
Committer:themanforfree

refactor: removed node auto shutdown by election Signed-off-by: themanforfree <themanforfree@gmail.com>

Commit:a3c6840
Author:themanforfree
Committer:mergify[bot]

feat: support pre vote phase Signed-off-by: themanforfree <themanforfree@gmail.com>

Commit:d0bbca3
Author:iGxnon
Committer:iGxnon

chore: rebase on conf_change Signed-off-by: iGxnon <igxnon@gmail.com>

Commit:ae7742c
Author:iGxnon
Committer:iGxnon

feat: support multiple address listening Signed-off-by: iGxnon <igxnon@gmail.com>

Commit:057ea13
Author:Phoeniix Zhao
Committer:Phoenix

refactor: add submodule curp-proto Signed-off-by: Phoeniix Zhao <Phoenix500526@163.com>

Commit:0821d86
Author:Phoeniix Zhao
Committer:Phoenix

refactor: move appen_entries, vote and install_snapshot into InnerProtocol Signed-off-by: Phoeniix Zhao <Phoenix500526@163.com>

Commit:b2f12d1
Author:Phoeniix Zhao
Committer:Phoenix

refactor: add submodule xline-proto Signed-off-by: Phoeniix Zhao <Phoenix500526@163.com>

This commit does not contain any .proto files.

Commit:7a51907
Author:Phoeniix Zhao
Committer:Phoenix

chore: rename the proto dir name Signed-off-by: Phoeniix Zhao <Phoenix500526@163.com>

Commit:4a601ab
Author:themanforfree
Committer:mergify[bot]

chore: modify the test names and some comments Signed-off-by: themanforfree <themanforfree@gmail.com>

Commit:29bc7a8
Author:themanforfree
Committer:mergify[bot]

feature: add `apply_conf_change` method for `RawCurp` refactor data structures that need to be mutable Signed-off-by: themanforfree <themanforfree@gmail.com>

Commit:6e4769f
Author:themanforfree
Committer:themanforfree

refactor: refactor shutdown test add retry count for client fix curp group recovery Signed-off-by: themanforfree <themanforfree@gmail.com>

Commit:c41a25a
Author:themanforfree
Committer:themanforfree

refactor: add shutdown trigger and listener util Signed-off-by: themanforfree <themanforfree@gmail.com>

Commit:b573f16
Author:bsbds
Committer:Phoenix

chore: rename SyncError to WaitSyncError Signed-off-by: bsbds <69835502+bsbds@users.noreply.github.com> chore: rename `PbSerialize` to `PbCodec` Signed-off-by: bsbds <69835502+bsbds@users.noreply.github.com>

Commit:486aee6
Author:bsbds
Committer:Phoenix

refactor: move after sync result to protobuf Signed-off-by: bsbds <69835502+bsbds@users.noreply.github.com>

Commit:3bc2c67
Author:bsbds
Committer:mergify[bot]

refactor: move `Command` to protobuf definition Signed-off-by: bsbds <69835502+bsbds@users.noreply.github.com>

Commit:bb352a9
Author:themanforfree
Committer:mergify[bot]

refactor: use u64 as ServerId instead of String Signed-off-by: themanforfree <themanforfree@gmail.com>

Commit:53967c7
Author:themanforfree
Committer:themanforfree

refactor: build client without `ServerId` add client builder add `fetch_cluster` rpc allows the client to build without `ServerId`, which automatically fetch the cluster information from the server Signed-off-by: themanforfree <themanforfree@gmail.com>

Commit:20b8ada
Author:Phoeniix Zhao
Committer:Phoenix

chore: correct spelling mistakes among source code Signed-off-by: Phoeniix Zhao <Phoenix500526@163.com>

Commit:003d55f
Author:bsbds
Committer:Phoenix

refactor: move xline proto files to `xlineapi` crate This is to make the protobuf types to be public accessible to both xline server and xline client.

Commit:9c40690
Author:themanforfree
Committer:mergify[bot]

refactor kv range request when follower receives range request, it will send fetch read state request to leader, leader will return a group of propose id or commit index, follower will wait these id or index applied, then it can safely read from its own state machine and return.

Commit:5510592
Author:markcty
Committer:mergify[bot]

add curp snapshot

Commit:7a6ab6d
Author:markcty
Committer:Phoenix

add RawCurp layer In addition to adding the RawCurp layer, this commit also includes some minor changes, including: Change needs_exe to spec_executed in cmd_board: since only speculatively executed commands don't need to be executed before after sync, I flip this field's meaning. Managed leader_calibrates_follower task: before this commit, the leader can spawn multiple such tasks if heartbeat continues to fail. Now, the leader will detect if a calibration task has already been spawned.

Commit:ddfcca8
Author:markcty
Committer:mergify[bot]

add recovery on leader election

Commit:2e96afe
Author:markcty
Committer:mergify[bot]

fix bug discovered in tests fix leader should set leader id to itself when it becomes leader fix slow path might be blocked by adding a timeout fix client might be blocked: If a server loses contact with its leader, it will update its term for election. Since other servers are all right, the election will not succeed. But if the client learns about the new term and updates its term to it, it will never get the true leader. Now we will reset client's term only when the server has a leader id. fix that since the follower timeout is changed, we need to wait for a longer time for leader to be elected

Commit:212c46b
Author:markcty
Committer:mergify[bot]

client auto discover server

Commit:1ccbfa7
Author:markcty
Committer:mergify[bot]

optimize leader calibration

Commit:386be09
Author:markcty
Committer:mergify[bot]

add leader election

Commit:0a77460
Author:markcty
Committer:mergify[bot]

optimize raft and fix bugs

Commit:2af4341
Author:markcty
Committer:mergify[bot]

implement raft

Commit:2f698f7
Author:Jicheng Shi
Committer:mergify[bot]

send and handle commmit msg

Commit:059ac22
Author:Jicheng Shi
Committer:mergify[bot]

batch optimization and execution bug fix

Commit:242b8ef
Author:Jicheng Shi
Committer:mergify[bot]

replace madsim rpc with tonic

Commit:05c718a
Author:Zheng Pan
Committer:Zheng Pan

Add lock and lease proto file.

Commit:243328f
Author:Zheng Pan
Committer:Roger Shi

Add Xline server and add github CI

Commit:2513b7a
Author:Zheng Pan

Remove unnecessary context in proto files and add build script.

Commit:2920770
Author:Zheng Pan

Copy proto files from etcd.