braft
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.
Suppose a raft group ng0 consists of three nodes(A(localhost:8001), B(localhost:8011), C(localhost:8021)), timeline is as follows: T1: A is elected as the leader of group ng0. term 2. T2: Restart B....
**1. 使用counter的例子。 2. run_server端将sync 'false' 置为false。 线程设置为128。 DEFINE_string sync 'false' 'fsync each time' server运行参数为:-bthread_concurrency=128 -crash_on_fatal_log=true -raft_max_segment_size=8388608 -raft_sync=false -port=8100 -conf=127.0.0.1:8100:0, 3. 客户端执行线程数改为50,没有sleep直接满压运行。 客户端运行参数为:./counter_client --add_percentage=100 --bthread_concurrency=100 --conf=127.0.0.1:8100:0, --crash_on_fatal_log=true --log_each_request=false --thread_num=50 --use_bthread=true --timeout_ms=1000**...
I have a raft group ng0 consists of three nodes(A(localhost:8001), B(localhost:8011), C(localhost:8021)), timeline is as follows: T1: A is elected as the leader of group ng0. term 2. T2: Restart...
大概是在什么时机,判断什么条件来进行持久化?另外,可以建个QQ群交流嘛?
``` root@smfast:~/wayne/braft/bld# cmake .. CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required): Compatibility with CMake < 2.8.12 will be removed from a future version of CMake. Update the VERSION argument value or...
I've a cluster where the nodes are far apart geographically, so there is high network latency between the nodes. In such a case, I find the snapshot install from the...
复现步骤: 1. 修改 example 中的测试用例,将日志重定向到日志文件,我使用的是 /var/log/braft/counter.log 这个路径  2. 在服务稳定工作一段时间后,dd 一个大文件,使日志所在根分区满,dd if=/dev/urandom of=/var/log/braft/bigfile bs=1024k count= status=progress  3. 观察此时braft 无法正常工作 4. 删除 bigfile,空间恢复,braft 日志正常输出,但是日志里都是 is not active的报错,且一直无法恢复,除非通过手动重启服务  问题: 我们期望的效果是:在空间释放后,braft...
This commit implements raft arbiter. An arbiter does not have a copy of data and only participates in elections. The concept is similar to MongoDB arbiter (https://docs.mongodb.com/manual/core/replica-set-arbiter). The motivation behind...