@@ -622,16 +633,24 @@ func (s *EtcdServer) linearizableReadLoop() {
for!timeout&&!done{
select{
casers=<-s.r.readStateC:
done=bytes.Equal(rs.RequestCtx,ctx)
done=bytes.Equal(rs.RequestCtx,ctxToSend)
if!done{
// a previous request might time out. now we should ignore the response of it and
// continue waiting for the response of the current requests.
plog.Warningf("ignored out-of-date read index response (want %v, got %v)",rs.RequestCtx,ctx)
id2:=uint64(0)
iflen(rs.RequestCtx)==8{
id2=binary.BigEndian.Uint64(rs.RequestCtx)
}
plog.Warningf("ignored out-of-date read index response; local node read indexes queueing up and waiting to be in sync with leader (request ID want %d, got %d)",id1,id2)
slowReadIndex.Inc()
}
case<-time.After(s.Cfg.ReqTimeout()):
plog.Warningf("timed out waiting for read index response")