baidu / braft

An industrial-grade C++ implementation of RAFT consensus algorithm based on brpc, widely used inside Baidu to build highly-available distributed systems.
Apache License 2.0
3.84k stars 862 forks source link

fix an issue with forgetting to unlock #430

Closed mengqingzhong closed 6 months ago

mengqingzhong commented 6 months ago

这里好像忘了放锁,可能导致系统卡住。 其中一个可能卡住的点是:由于这里没有放锁,导致check_dead_nodes卡住(拿不到replicator的锁);但是check_dead_nodes已经在handle_stepdown_timeout持有braft::NodeImpl::_mutex。进而导致后续所有需要拿braft::NodeImpl::_mutex的地方都被卡住。整个Node不可用。