cubefs/depends/tiglabs/raft
shuqiang-zheng 5635b02677 fix(master): fix panic caused by lack of locking during concurrent access to the rafts map.
close: #1000356742

Signed-off-by: shuqiang-zheng <zhengshuqiang@oppo.com>
2025-09-26 11:01:25 +08:00
..
etcd feature: enable go mod and update vendor 2022-04-13 15:57:55 +08:00
logger feature: enable go mod and update vendor 2022-04-13 15:57:55 +08:00
proto feat(master): minor code and comment refactoring 2024-02-29 14:43:00 +08:00
storage feat(raft): remove raft log rotate in start up.#1000005968 2025-05-16 10:13:34 +08:00
util feat(master): minor code and comment refactoring 2024-02-29 14:43:00 +08:00
.gitignore feature: enable go mod and update vendor 2022-04-13 15:57:55 +08:00
config.go feat(raft): add preCandidate in raft 2023-08-30 20:05:32 +08:00
diff_test.go feat(raft): add raft paper test 2023-08-30 20:05:32 +08:00
errors.go feature: enable go mod and update vendor 2022-04-13 15:57:55 +08:00
future.go feature: enable go mod and update vendor 2022-04-13 15:57:55 +08:00
LICENSE feature: enable go mod and update vendor 2022-04-13 15:57:55 +08:00
monitor.go fix(raft): when raft replicas or raft partitions are deleted, delete them from raft monitor accordingly 2023-07-20 10:58:50 +08:00
NOTICE feature: enable go mod and update vendor 2022-04-13 15:57:55 +08:00
pool.go feature: enable go mod and update vendor 2022-04-13 15:57:55 +08:00
raft_fsm_candidate_test.go style(raft): add unit test for raft 2023-08-30 20:05:32 +08:00
raft_fsm_candidate.go refactor(raft): use decimal format to print number in raft log. 2024-12-26 09:24:22 +08:00
raft_fsm_follower.go fix(raft): fix raft append log bug 2023-08-30 20:05:32 +08:00
raft_fsm_leader_test.go refactor(raft): use decimal format to print number in raft log. 2024-12-26 09:24:22 +08:00
raft_fsm_leader.go fix(master): if the replica being decommissioned is the one intended for decommissioning, no error is reported. 2024-12-26 09:24:22 +08:00
raft_fsm_state.go style(raft): add unit test for raft 2023-08-30 20:05:32 +08:00
raft_fsm_test.go fix(raft): fix raft append log bug 2023-08-30 20:05:32 +08:00
raft_fsm.go refactor(raft): use decimal format to print number in raft log. 2024-12-26 09:24:22 +08:00
raft_log_test.go feat(raft): add raft paper test 2023-08-30 20:05:32 +08:00
raft_log_unstable_test.go feat(raft): add raft paper test 2023-08-30 20:05:32 +08:00
raft_log_unstable.go feature: enable go mod and update vendor 2022-04-13 15:57:55 +08:00
raft_log.go fix(raft): fix raft append log bug 2023-08-30 20:05:32 +08:00
raft_paper_test.go refactor(raft): use decimal format to print number in raft log. 2024-12-26 09:24:22 +08:00
raft_replica.go add feature: support one replica of data storage 2022-04-13 15:57:55 +08:00
raft_snapshot.go chore(raft): Add debug logs to track the raft peers changing.#22834621 2025-04-01 11:05:01 +08:00
raft.go chore(raft): Add debug logs to track the raft peers changing.#22834621 2025-04-01 11:05:01 +08:00
read_only.go feature: enable go mod and update vendor 2022-04-13 15:57:55 +08:00
README.md feature: enable go mod and update vendor 2022-04-13 15:57:55 +08:00
server_test.go refactor(log): reduce log output 2023-09-01 13:23:35 +08:00
server.go fix(master): fix panic caused by lack of locking during concurrent access to the rafts map. 2025-09-26 11:01:25 +08:00
statemachine.go feature: enable go mod and update vendor 2022-04-13 15:57:55 +08:00
status.go fix(raft): if the previous member change did not return, reject the submission of the next member change 2024-12-26 09:24:22 +08:00
transport_heartbeat.go fix(master): modify logic for reporting metric for diskError 2024-12-26 09:24:22 +08:00
transport_multi.go feature: enable go mod and update vendor 2022-04-13 15:57:55 +08:00
transport_replicate.go fix(master): modify logic for reporting metric for diskError 2024-12-26 09:24:22 +08:00
transport_sender.go feature: enable go mod and update vendor 2022-04-13 15:57:55 +08:00
transport.go feature: enable go mod and update vendor 2022-04-13 15:57:55 +08:00

Raft

A multi-raft implementation built on top of the CoreOS etcd raft library.

Installation

Download and install to GOPATH:

go get -u github.com/cubefs/cubefs/depends/tiglabs/raft

Features

The CoreOS etc/raft implementation has been modified to add the following features.

  • multi-raft support
  • snapshot manager
  • merged and compressed heartbeat message
  • check down replica
  • single raft's panic is allowed, detectable
  • new wal implementation
  • export more run status
  • implementation batch commit

License

Licensed under the Apache License, Version 2.0. For detail see LICENSE and NOTICE.