raft: get rid of allocation
Merge pull request #1897 from xiang90/raft

raft: get rid of the using of defer in critical path