mirror of https://github.com/tikv/client-go.git
Signed-off-by: longfangsong <longfangsong@icloud.com>
This commit is contained in:
parent
095b94dc24
commit
9577439310
2
go.mod
2
go.mod
|
|
@ -51,4 +51,4 @@ require (
|
|||
google.golang.org/grpc v1.19.0
|
||||
gopkg.in/alecthomas/kingpin.v2 v2.2.6 // indirect
|
||||
gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect
|
||||
)
|
||||
)
|
||||
|
|
|
|||
|
|
@ -390,6 +390,10 @@ func (a *connArray) batchSendLoop() {
|
|||
}
|
||||
|
||||
length := len(requests)
|
||||
if uint(length) == 0 {
|
||||
// The batch command channel is closed.
|
||||
return
|
||||
}
|
||||
maxBatchID := atomic.AddUint64(&batchCommandsClient.idAlloc, uint64(length))
|
||||
for i := 0; i < length; i++ {
|
||||
requestID := uint64(i) + maxBatchID - uint64(length)
|
||||
|
|
|
|||
Loading…
Reference in New Issue