Results 18 issues of Dongsheng He

related issue: https://github.com/baidu/braft/issues/405 Server remains in follower state as long as it receives valid RPCs from a leader or candidate.

**Is your feature request related to a problem? (你需要的功能是否与某个问题有关?)** 当前 brpc 代码默认使用的 C++ 标准为 11,不支持 align new (since c++17 https://en.cppreference.com/w/cpp/memory/new/operator_new) . 如果某个 class 指定了 alignment 要求(例如 BAIDU_CACHELINE_ALIGNMENT),代码中使用 new 的方式来分配其对象时,地址有可能并不是严格按照其对齐方式的。 >...

`on_leader_stop(const braft::LeaderChangeContext&)` shuold be `on_leader_stop(const butil::Status&)`

issue: https://github.com/baidu/braft/issues/421 ``` [ RUN ] NodeTestWithPipelineReplication/NodeTest.change_peers_chaos_with_snapshot/0 F20240403 18:24:26.618824 18633 log_manager.cpp:321] Can't truncate logs before _applied_id=692, last_log_kept=0 ``` 当且仅当具有最小日志 index 的 send entries 的请求不匹配时,才去缩小 _next_index. 当 pipeline 开启,但是 cache 未开启时,具有较大日志的请求如果先被处理,`response->success...

NodeTest.LeaderFailWithWitness 测试用例: https://github.com/baidu/braft/blob/b37c610039aa34d6df2e5bda12f830003561b08b/test/test_node.cpp#L462-L477 这段逻辑应该是 2 个 Replica 和一个 Witness 节点,当选出 leader 后,杀死leader,并用 follower 进行日志提交。 但是在这个 for 循环之前,有可能该 follower 已经成为 leader 了,导致 followers 的个数只有 1 个,使用 nodes[1] 会越界。 @lintanghui

**(PLEASE DELETE ALL THESE AFTER READING)** Thank you for the pull request! `you-get` is a growing open source project, which would not have been possible without contributors like you. Here...

support github workflow

The protected pointer placed in hprec_ (`store`) should not be reordered after to read hazptr_obj (`load`). `folly::asymmetric_thread_fence_light` on Linux only prevents compiler reordering, but cannot prevent CPU reordering (x86 allows...

CLA Signed