floyd icon indicating copy to clipboard operation
floyd copied to clipboard

A raft consensus implementation that is simply and understandable

Results 23 floyd issues
Sort by recently updated
recently updated
newest added

kv_server.cc:156:31: error: ‘class floyd::Floyd’ has no member named ‘DirtyWrite’ Status result = floyd_->DirtyWrite(request.key(), request.value()); kv_server.cc:139:47: error: no matching function for call to ‘floyd::Floyd::GetServerStatus(std::string&)’ bool ret = floyd_->GetServerStatus(value); lots of bug...

再跑remove_server,删除节点用例,发现调用RemoveServer接口必挂。查看代码 最终删除节点命令重做时会调用rocksdb::Status FloydApply::MembershipChange(const std::string& ip_port, bool add) 函数 ![image](https://user-images.githubusercontent.com/5674585/54921806-a3239f00-4f41-11e9-97be-11c7c9996219.png)

测试add_server1用例问题发现,新加节点时,若之前集群的log量太大的化,很容易出现新节点无法正常加入到集群的情况。新节点一直无法收到心跳包,导致一直成为Candidate尝试发起新选举。 定位发现,新节点加入时,一次发送的log量太大了,一直无法处理其他请求导致超时。 ![image](https://user-images.githubusercontent.com/5674585/54757789-e7532e80-4c25-11e9-9f36-fe26a768e2fd.png) 这里 1)能否提供个设置 uint64_t append_entries_size_once; uint64_t append_entries_count_once; 的对外接口 2)这种新加节点情况,每次都要从最原始日志开始拷贝,重做。有无优化计划

今天我在使用floyd的时候,由于floyd::init()为正确完成初始化,析构时由于worker_等空指针出core,个人感觉指针在释放之前应该进行nullptr判断。

从api列表上看只是支持kv形式的读写,有开放的接口让用户自己定义在raft状态机成功之后的行为吗?如果有很多复杂的逻辑不能通过读写kv来执行。

Fix by checking new commit index, rather than checking the match index

Maybe the commit index shouldn't be persistent in RaftMeta, instead, it will be set correctly by new leader after the first log entry being appended on quorum.

duplicate
question

https://github.com/PikaLabs/floyd/blob/01a6979f4e20d6e0bb72c961a66ac40b39ecd4c7/floyd/src/floyd_impl.cc#L385-L391 这里是不是可以支持一下多线程写,像leveldb那样的多个写合并到一个中

https://github.com/PikaLabs/floyd/blob/01a6979f4e20d6e0bb72c961a66ac40b39ecd4c7/floyd/src/floyd_impl.cc#L555-L557 如果这里用异步客户端,可以并发处理多个转发到leader的操作,是不是会加速。

A new server who is not added into cluster yet, will constantly send RequestVote RPC with new term number to others, and this will cause new raft election. But the...

bug