init the log entries.
rafactor server.go
reduce one gorotine to select in peer.go flush()