{"push_id":832773922,"size":1,"distinct_size":1,"ref":"refs/heads/raft-block","head":"7be0e5e4b930d085c5c0c647fce73047f0706501","before":"1f0a45518d9fa23711e3f739aa89daffe9573a45","commits":[{"sha":"7be0e5e4b930d085c5c0c647fce73047f0706501","author":{"email":"dbdc2bcc4fe4ffeb04d7be7c33b5056afbbee89a@gmail.com","name":"Yicheng Qin"},"message":"etcdserver: fix raft state machine may block\n\nWhen snapshot store requests raft snapshot from etcdserver apply loop,\nit may block on the channel for some time, or wait some time for KV to\nsnapshot. This is unexpected because raft state machine should be unblocked.\n\nEven worse, this block may lead to deadlock:\n1. raft state machine waits on getting snapshot from raft memory storage\n2. raft memory storage waits snapshot store to get snapshot\n3. snapshot store requests raft snapshot from apply loop\n4. apply loop is applying entries, and waits raftNode loop to finish\nmessages sending\n5. raftNode loop waits peer loop in Transport to send out messages\n6. peer loop in Transport waits for raft state machine to process message\n\nFix it by changing the logic of getSnap to be asynchronously creation.","distinct":true,"url":"https://api.github.com/repos/yichengq/etcd/commits/7be0e5e4b930d085c5c0c647fce73047f0706501"}]}