kv: use last range if streaming response does not contain a range entry (#13062)

This commit is contained in:
Feng Liyuan
2019-11-04 15:30:40 +08:00
committed by pingcap-github-bot
parent 66a311c945
commit 0201f4f878

View File

@ -765,10 +765,9 @@ func (worker *copIteratorWorker) handleCopStreamResult(bo *Backoffer, rpcCtx *RP
}
return worker.buildCopTasksFromRemain(bo, lastRange, task)
}
if resp.Range == nil {
return nil, errors.New("streaming response should contain a range entry")
if resp.Range != nil {
lastRange = resp.Range
}
lastRange = resp.Range
}
}