braft icon indicating copy to clipboard operation
braft copied to clipboard

An industrial-grade C++ implementation of RAFT consensus algorithm based on brpc, widely used inside Baidu to build highly-available distributed systems.

Results 195 braft issues
Sort by recently updated
recently updated
newest added

你好,我在使用 Braft 时遇到了一个问题,情况如下: 我们有一个三节点集群,节点 A、B、C。其中,B 节点的 raftlog 和 snapshot 数据被清空后重启。重启后,B 成功加入集群,成为 follower,并能收到 leader 的心跳。但在不写入新日志的情况下(即日志没有新增 index),B 节点不会触发 snapshot 拉取,始终卡在 `(index=0, term=45)`,状态如下所示: B 节点状态(被清空后重启): ``` state: FOLLOWER readonly: 0 term: 45 conf_index:...

### usage mode I use the Block example. In the block example, the original data is written to a file. I write the original data to the storage engine. ###...

现象: 1个peer断网后恢复,发起pre_vote请求总能成功,导致leader切换 问题: 在开启了leader_lease时,handle_pre_vote_request处理pre_vote请求,判断了follower_lease.votable_time_from_now。 follower会返回granted = false。 但是leader会返回true。 为什么不在leader节点判断leader_lease.votable_time_from_now呢?

Current master branch code compile command > mkdir build && cd build && cmake .. -DCMAKE_INSTALL_PREFIX=/home/guoyande/guoyande/lib/braft -DBRPC_INCLUDE_PATH=/home/guoyande/guoyande/lib/brpc/include -DBRPC_LIB=/home/guoyande/guoyande/lib/brpc/lib64 && make -j8 error > [ 93%] Linking CXX shared library ../output/lib/libbraft.so...

I have a scenario now. Raft receives data and writes the data to the index engine at the same time. The index engine also stores the data persistently. So I...

Brpc already supports IPv6. Braft needed some changes to support it. The main motivation to support IPv6 is operational simplicity. For instance, otherwise we need to know which IPv4 maps...

## 问题 目前 braft 中的 election_timer 定时器的周期是 election_timeout_ms (braft 默认 1000,我们的项目配置2000为了避免网络波动导致集群震荡),会间隔 2s 检查一次 leader 是否超时未更新 lease,这使得在leader 故障场景, follower 发起选举时间会最多滞后 4s。 ## 想法 在 braft/Node 中引入 election_timer_interval_ms 参数(默认配置 500) 目的是缩短检查周期以快速检查到leader超时。 ##...

当前braft使用leveldb 存储 raft的log等数据, 有没有考虑支持 rocksdb 作为存储引擎. 首先我先说一下提出这个问题的原因: 1. rocksdb 和 leveldb 在读写接口上差距很小, 如果要实现改动不大 2. 很多数据库都会采用 rocksdb作为存储引擎, 如果想使用 braft 支持分布式, 还需要多一个leveldb的依赖,如果braft支持rocksdb, 那么可以少一个依赖 3. rocksdb的性能大多数场景下会强于leveldb, 替换后可能会提升braft的性能 不知道 有没有实现这个 feature 的计划