Skip to content

Commit 14fd9a0

Browse files
committed
Doc: add change log 0.8.2
1 parent 29e8b72 commit 14fd9a0

File tree

2 files changed

+145
-0
lines changed

2 files changed

+145
-0
lines changed

change-log.md

+74
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,77 @@
1+
## v0.8.2
2+
3+
### Changed:
4+
5+
- Changed: [342d0de2](https://github.com/datafuselabs/openraft/commit/342d0de2b885388dfa5de64430384bd3275d3697) rename variants in ChangeMembers, add `AddVoters`; by 张炎泼; 2023-03-01
6+
7+
Rename `ChangeMembers::AddVoter` to `AddVoterIds`, because it just
8+
updates voter ids.
9+
10+
Rename `ChangeMembers::RemoveVoter` to `RemoveVoters`.
11+
12+
Add `ChangeMembers::AddVoters(BTreeMap)` to add voters with
13+
corresponding `Node`, i.e., it adds nodes as learners and update
14+
the voter-ids in a `Membership`.
15+
16+
### Added:
17+
18+
- Added: [50821c37](https://github.com/datafuselabs/openraft/commit/50821c37035850dba9e237d9e7474e918f2bd410) impl PartialEq for Entry; by 张炎泼; 2023-03-02
19+
20+
### Fixed:
21+
22+
- Fixed: [97fa1581](https://github.com/datafuselabs/openraft/commit/97fa15815a7d51c35a3a613b11defbf5f49cf4c1) discard blank log heartbeat, revert to the standard heartbeat; by 张炎泼; 2023-03-04
23+
24+
- https://github.com/datafuselabs/openraft/issues/698
25+
26+
The blank log heartbeat design has two problems:
27+
28+
- The heartbeat that sends a blank log introduces additional I/O, as a follower has to persist every log to maintain correctness.
29+
30+
- Although `(term, log_index)` serves as a pseudo time in Raft, measuring whether a node has caught up with the leader and is capable of becoming a new leader, leadership is not solely determined by this pseudo time.
31+
Wall clock time is also taken into account.
32+
33+
There may be a case where the pseudo time is not upto date but the clock time is, and the node should not become the leader.
34+
For example, in a cluster of three nodes, if the leader (node-1) is busy sending a snapshot to node-2(it has not yet replicated the latest logs to a quorum, but node-2 received message from the leader(node-1), thus it knew there is an active leader), node-3 should not seize leadership from node-1.
35+
This is why there needs to be two types of time, pseudo time `(term, log_index)` and wall clock time, to protect leadership.
36+
37+
In the follow graph:
38+
- node-1 is the leader, has 4 log entries, and is sending a snapshot to
39+
node-2,
40+
- node-2 received several chunks of snapshot, and it perceived an active
41+
leader thus extended leader lease.
42+
- node-3 tried to send vote request to node-2, although node-2 do not have
43+
as many logs as node-3, it should still reject node-3's vote request
44+
because the leader lease has not yet expired.
45+
46+
In the obsolete design, extending pseudo time `(term, index)` with a
47+
`tick`, in this case node-3 will seize the leadership from node-2.
48+
49+
```text
50+
Ni: Node i
51+
Ei: log entry i
52+
53+
N1 E1 E2 E3 E4
54+
|
55+
v
56+
N2 snapshot
57+
+-----------------+
58+
^ |
59+
| leader lease
60+
|
61+
N3 E1 E2 E3 | vote-request
62+
---------------+----------------------------> clock time
63+
now
64+
65+
```
66+
67+
The original document is presented below for reference.
68+
69+
- Fixed: [b5caa44d](https://github.com/datafuselabs/openraft/commit/b5caa44d1aac0b539180c1c490f0883dcc83048a) Wait::members() should not count learners as members; by 张炎泼; 2023-03-04
70+
71+
`Wait::members()` waits until membership becomes the expected value.
72+
It should not check against all nodes.
73+
Instead, it should only check voters, excluding learners.
74+
175
## v0.8.1
276
377
### Added:

change-log/v0.8.2.md

+71
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
### Changed:
2+
3+
- Changed: [342d0de2](https://github.com/datafuselabs/openraft/commit/342d0de2b885388dfa5de64430384bd3275d3697) rename variants in ChangeMembers, add `AddVoters`; by 张炎泼; 2023-03-01
4+
5+
Rename `ChangeMembers::AddVoter` to `AddVoterIds`, because it just
6+
updates voter ids.
7+
8+
Rename `ChangeMembers::RemoveVoter` to `RemoveVoters`.
9+
10+
Add `ChangeMembers::AddVoters(BTreeMap)` to add voters with
11+
corresponding `Node`, i.e., it adds nodes as learners and update
12+
the voter-ids in a `Membership`.
13+
14+
### Added:
15+
16+
- Added: [50821c37](https://github.com/datafuselabs/openraft/commit/50821c37035850dba9e237d9e7474e918f2bd410) impl PartialEq for Entry; by 张炎泼; 2023-03-02
17+
18+
### Fixed:
19+
20+
- Fixed: [97fa1581](https://github.com/datafuselabs/openraft/commit/97fa15815a7d51c35a3a613b11defbf5f49cf4c1) discard blank log heartbeat, revert to the standard heartbeat; by 张炎泼; 2023-03-04
21+
22+
- https://github.com/datafuselabs/openraft/issues/698
23+
24+
The blank log heartbeat design has two problems:
25+
26+
- The heartbeat that sends a blank log introduces additional I/O, as a follower has to persist every log to maintain correctness.
27+
28+
- Although `(term, log_index)` serves as a pseudo time in Raft, measuring whether a node has caught up with the leader and is capable of becoming a new leader, leadership is not solely determined by this pseudo time.
29+
Wall clock time is also taken into account.
30+
31+
There may be a case where the pseudo time is not upto date but the clock time is, and the node should not become the leader.
32+
For example, in a cluster of three nodes, if the leader (node-1) is busy sending a snapshot to node-2(it has not yet replicated the latest logs to a quorum, but node-2 received message from the leader(node-1), thus it knew there is an active leader), node-3 should not seize leadership from node-1.
33+
This is why there needs to be two types of time, pseudo time `(term, log_index)` and wall clock time, to protect leadership.
34+
35+
In the follow graph:
36+
- node-1 is the leader, has 4 log entries, and is sending a snapshot to
37+
node-2,
38+
- node-2 received several chunks of snapshot, and it perceived an active
39+
leader thus extended leader lease.
40+
- node-3 tried to send vote request to node-2, although node-2 do not have
41+
as many logs as node-3, it should still reject node-3's vote request
42+
because the leader lease has not yet expired.
43+
44+
In the obsolete design, extending pseudo time `(term, index)` with a
45+
`tick`, in this case node-3 will seize the leadership from node-2.
46+
47+
```text
48+
Ni: Node i
49+
Ei: log entry i
50+
51+
N1 E1 E2 E3 E4
52+
|
53+
v
54+
N2 snapshot
55+
+-----------------+
56+
^ |
57+
| leader lease
58+
|
59+
N3 E1 E2 E3 | vote-request
60+
---------------+----------------------------> clock time
61+
now
62+
63+
```
64+
65+
The original document is presented below for reference.
66+
67+
- Fixed: [b5caa44d](https://github.com/datafuselabs/openraft/commit/b5caa44d1aac0b539180c1c490f0883dcc83048a) Wait::members() should not count learners as members; by 张炎泼; 2023-03-04
68+
69+
`Wait::members()` waits until membership becomes the expected value.
70+
It should not check against all nodes.
71+
Instead, it should only check voters, excluding learners.

0 commit comments

Comments
 (0)