mirror of
https://github.com/talent-plan/tinykv.git
synced 2025-01-13 22:00:07 +08:00
chore: fix typo (#180)
This commit is contained in:
parent
e620983e76
commit
b4a7a561f8
@ -51,7 +51,7 @@ type MessageType int32
|
|||||||
|
|
||||||
const (
|
const (
|
||||||
// 'MessageType_MsgHup' is a local message used for election. If an election timeout happened,
|
// 'MessageType_MsgHup' is a local message used for election. If an election timeout happened,
|
||||||
// the node should passes 'MessageType_MsgHup' to its Step method and start a new election.
|
// the node should pass 'MessageType_MsgHup' to its Step method and start a new election.
|
||||||
MessageType_MsgHup MessageType = 0
|
MessageType_MsgHup MessageType = 0
|
||||||
// 'MessageType_MsgBeat' is a local message that signals the leader to send a heartbeat
|
// 'MessageType_MsgBeat' is a local message that signals the leader to send a heartbeat
|
||||||
// of the 'MessageType_MsgHeartbeat' type to its followers.
|
// of the 'MessageType_MsgHeartbeat' type to its followers.
|
||||||
@ -219,7 +219,7 @@ func (m *Entry) GetData() []byte {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// SnapshotMetadata cantains the log index and term of the last log applied to this
|
// SnapshotMetadata contains the log index and term of the last log applied to this
|
||||||
// Snapshot, along with the membership information of the time the last log applied.
|
// Snapshot, along with the membership information of the time the last log applied.
|
||||||
type SnapshotMetadata struct {
|
type SnapshotMetadata struct {
|
||||||
ConfState *ConfState `protobuf:"bytes,1,opt,name=conf_state,json=confState" json:"conf_state,omitempty"`
|
ConfState *ConfState `protobuf:"bytes,1,opt,name=conf_state,json=confState" json:"conf_state,omitempty"`
|
||||||
|
@ -23,7 +23,7 @@ message Entry {
|
|||||||
bytes data = 4;
|
bytes data = 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
// SnapshotMetadata cantains the log index and term of the last log applied to this
|
// SnapshotMetadata contains the log index and term of the last log applied to this
|
||||||
// Snapshot, along with the membership information of the time the last log applied.
|
// Snapshot, along with the membership information of the time the last log applied.
|
||||||
message SnapshotMetadata {
|
message SnapshotMetadata {
|
||||||
ConfState conf_state = 1;
|
ConfState conf_state = 1;
|
||||||
@ -40,7 +40,7 @@ message Snapshot {
|
|||||||
// also use the Step method to handle
|
// also use the Step method to handle
|
||||||
enum MessageType {
|
enum MessageType {
|
||||||
// 'MessageType_MsgHup' is a local message used for election. If an election timeout happened,
|
// 'MessageType_MsgHup' is a local message used for election. If an election timeout happened,
|
||||||
// the node should passes 'MessageType_MsgHup' to its Step method and start a new election.
|
// the node should pass 'MessageType_MsgHup' to its Step method and start a new election.
|
||||||
MsgHup = 0;
|
MsgHup = 0;
|
||||||
// 'MessageType_MsgBeat' is a local message that signals the leader to send a heartbeat
|
// 'MessageType_MsgBeat' is a local message that signals the leader to send a heartbeat
|
||||||
// of the 'MessageType_MsgHeartbeat' type to its followers.
|
// of the 'MessageType_MsgHeartbeat' type to its followers.
|
||||||
|
Loading…
Reference in New Issue
Block a user