Fix bug where the last write gets dropped and no other write follows on the buffer. Was causing relpay to error out

pull/290/head
Paul Dix 2014-02-27 12:51:20 -05:00
parent e9d39cabaa
commit 2e41160ea4
1 changed files with 4 additions and 1 deletions

View File

@ -43,7 +43,6 @@ func (self *WriteBuffer) Write(request *protocol.Request) {
case self.writes <- request:
return
default:
log.Info("Write buffer full, pausing that shit")
select {
case self.stoppedWrites <- *request.RequestNumber:
return
@ -99,6 +98,10 @@ func (self *WriteBuffer) replayAndRecover(missedRequest uint32) {
}
}
}
if req == nil {
log.Error("REPLAY: emptied channel, but no request set")
return
}
log.Info("REPLAY: Emptied out channel")
shardIds := make([]uint32, 0)
for shardId, _ := range self.shardIds {