Perform writes synchronously in the MultiRaft Ready loop.
Perform writes synchronously in the MultiRaft Ready loop.

Asynchronous writes allow a limited amount of raft processing to
continue while disk I/O happens on another thread. However, this
processing is often undesired: Ticks can cause heartbeat and election
messages to be queued for sending, even though they cannot actually be
sent until the disk thread has been unblocked. This leads to
pathological cases like the advancing term numbers reported in #1131.

Operations other than Tick are less problematic, but it does not appear
that performance is substantially improved by making writes
asynchronous (since most operations are just queued up until the disk
thread unblocks anyway). Performing the writes synchronously effectively
stops raft time during the I/O and is more consistent with typical use
of raft in single-use deployments.

This commit makes a localized change to multiraft.state.start() to
perform writes synchronously. If this doesn't uncover any new problems,
a future commit will simplify the code by removing the channels intended
to make writes asynchronous.

All my attempts to add tests for this change (with BlockableStorage)
resulted in deadlocks, but at least it passes all existing test.

nkhuyu/cockroach,c4pt0r/cockroach,cockroachdb/cockroach,petermattis/cockroach,linearb/cockroach,sunya123/cockroach,maxlang/cockroach,cuongdo/cockroach,mbonaci/cockroach,veteranlu/cockroach,il9ue/cockroach,yiixiansheng/cockroach,alunarbeach/cockroach,marcuswestin/cockroach,vivekmenezes/cockroach,briceburg/cockroach,jess-edwards/cockroach,SustainFund/cockroach,hassyma/cockroach,cuongdo/cockroach,linearb/cockroach,alex/cockroach,c4pt0r/cockroach,nieyy/cockroach,domluna/cockroach,jamesgraves/cockroach,nieyy/cockroach,bg451/cockroach,veteranlu/cockroach,mbertschler/cockroach,SustainFund/cockroach,paperstreet/cockroach,jgautheron/cockroach,marcuswestin/cockroach,hassyma/cockroach,cockroachdb/cockroach,SustainFund/cockroach,jmank88/cockroach,veteranlu/cockroach,hassyma/cockroach,slavau/cockroach,paperstreet/cockroach,cockroachdb/cockroach,loucash/cockroach,ngaut/cockroach,cuongdo/cockroach,mbertschler/cockroach,paperstreet/cockroach,alex/cockroach,arypurnomoz/cockroach,mbonaci/cockroach,ngaut/cockroach,vivekmenezes/cockroach,yiixiansheng/cockroach,maxlang/cockroach,bg451/cockroach,glycerine/cockroach,arjun4084346/cockroach,vaibhavarora/cockroach,paperstreet/cockroach,sunya123/cockroach,veteranlu/cockroach,paperstreet/cockroach,mbonaci/cockroach,freakynit/cockroach,mbertschler/cockroach,Abioy/cockroach,cockroachdb/cockroach,chrisseto/cockroach,briceburg/cockroach,alex/cockroach,slavau/cockroach,maxlang/cockroach,yosiat/cockroach,yiixiansheng/cockroach,maxlang/cockroach,domluna/cockroach,arjun4084346/cockroach,glycerine/cockroach,jgautheron/cockroach,maxlang/cockroach,il9ue/cockroach,yosiat/cockroach,SustainFund/cockroach,chrisseto/cockroach,arypurnomoz/cockroach,GokulSrinivas/cockroach,cockroachdb/cockroach,chrisseto/cockroach,domluna/cockroach,freakynit/cockroach,ngaut/cockroach,vaibhavarora/cockroach,chrisseto/cockroach,vivekmenezes/cockroach,ngaut/cockroach,petermattis/cockroach,vivekmenezes/cockroach,maxlang/cockroach,bg451/cockroach,arypurnomoz/cockroach,yosiat/cockroach,cockroachdb/cockroach,sunya123/cockroach,il9ue/cockroach,bg451/cockroach,hassyma/cockroach,jgautheron/cockroach,ajayaa/cockroach,alunarbeach/cockroach,bg451/cockroach,jmank88/cockroach,il9ue/cockroach,nieyy/cockroach,briceburg/cockroach,loucash/cockroach,veteranlu/cockroach,mbonaci/cockroach,vivekmenezes/cockroach,loucash/cockroach,XisiHuang/cockroach,vivekmenezes/cockroach,domluna/cockroach,paperstreet/cockroach,sunya123/cockroach,yiixiansheng/cockroach,mbertschler/cockroach,cockroachdb/cockroach,ajayaa/cockroach,vivekmenezes/cockroach,vaibhavarora/cockroach,freakynit/cockroach,vivekmenezes/cockroach,fengshao0907/cockroach,XisiHuang/cockroach,chrisseto/cockroach,XisiHuang/cockroach,alunarbeach/cockroach,linearb/cockroach,yosiat/cockroach,petermattis/cockroach,yosiat/cockroach,linearb/cockroach,jamesgraves/cockroach,bg451/cockroach,alex/cockroach,jgautheron/cockroach,jamesgraves/cockroach,alunarbeach/cockroach,glycerine/cockroach,XisiHuang/cockroach,jamesgraves/cockroach,Abioy/cockroach,fengshao0907/cockroach,marcuswestin/cockroach,ajayaa/cockroach,marcuswestin/cockroach,jess-edwards/cockroach,jess-edwards/cockroach,vaibhavarora/cockroach,nieyy/cockroach,XisiHuang/cockroach,arjun4084346/cockroach,alex/cockroach,petermattis/cockroach,marcuswestin/cockroach,marcuswestin/cockroach,yosiat/cockroach,cuongdo/cockroach,nkhuyu/cockroach,jess-edwards/cockroach,jmank88/cockroach,fengshao0907/cockroach,mbertschler/cockroach,jmank88/cockroach,loucash/cockroach,briceburg/cockroach,XisiHuang/cockroach,jmank88/cockroach,paperstreet/cockroach,nkhuyu/cockroach,freakynit/cockroach,ngaut/cockroach,sunya123/cockroach,abhishekgahlot/cockroach,ngaut/cockroach,arjun4084346/cockroach,jamesgraves/cockroach,jgautheron/cockroach,nieyy/cockroach,vaibhavarora/cockroach,fengshao0907/cockroach,nkhuyu/cockroach,domluna/cockroach,loucash/cockroach,Abioy/cockroach,veteranlu/cockroach,vaibhavarora/cockroach,arypurnomoz/cockroach,mbonaci/cockroach,alunarbeach/cockroach,veteranlu/cockroach,c4pt0r/cockroach,abhishekgahlot/cockroach,slavau/cockroach,cuongdo/cockroach,linearb/cockroach,freakynit/cockroach,abhishekgahlot/cockroach,cuongdo/cockroach,GokulSrinivas/cockroach,jess-edwards/cockroach,il9ue/cockroach,mbonaci/cockroach,hassyma/cockroach,mbertschler/cockroach,maxlang/cockroach,jess-edwards/cockroach,sunya123/cockroach,jgautheron/cockroach,marcuswestin/cockroach,vaibhavarora/cockroach,vaibhavarora/cockroach,ajayaa/cockroach,il9ue/cockroach,fengshao0907/cockroach,Abioy/cockroach,hassyma/cockroach,c4pt0r/cockroach,briceburg/cockroach,arypurnomoz/cockroach,SustainFund/cockroach,domluna/cockroach,arjun4084346/cockroach,cockroachdb/cockroach,glycerine/cockroach,maxlang/cockroach,c4pt0r/cockroach,linearb/cockroach,chrisseto/cockroach,nieyy/cockroach,freakynit/cockroach,abhishekgahlot/cockroach,arjun4084346/cockroach,jamesgraves/cockroach,Abioy/cockroach,abhishekgahlot/cockroach,nieyy/cockroach,domluna/cockroach,arypurnomoz/cockroach,nieyy/cockroach,petermattis/cockroach,il9ue/cockroach,GokulSrinivas/cockroach,GokulSrinivas/cockroach,il9ue/cockroach,glycerine/cockroach,nkhuyu/cockroach,slavau/cockroach,jmank88/cockroach,jess-edwards/cockroach,marcuswestin/cockroach,petermattis/cockroach,c4pt0r/cockroach,arjun4084346/cockroach,jamesgraves/cockroach,GokulSrinivas/cockroach,yiixiansheng/cockroach,arjun4084346/cockroach,SustainFund/cockroach,glycerine/cockroach,loucash/cockroach,fengshao0907/cockroach,slavau/cockroach,slavau/cockroach,alunarbeach/cockroach,Abioy/cockroach,glycerine/cockroach,mbertschler/cockroach,ajayaa/cockroach,linearb/cockroach,ngaut/cockroach,cuongdo/cockroach,yiixiansheng/cockroach,bg451/cockroach,ajayaa/cockroach,sunya123/cockroach,GokulSrinivas/cockroach,paperstreet/cockroach,jmank88/cockroach,briceburg/cockroach,abhishekgahlot/cockroach,glycerine/cockroach,cuongdo/cockroach,sunya123/cockroach,nkhuyu/cockroach,alex/cockroach,veteranlu/cockroach,petermattis/cockroach,petermattis/cockroach