Skip to content

Commit

Permalink
address comment
Browse files Browse the repository at this point in the history
Signed-off-by: crazycs520 <[email protected]>
  • Loading branch information
crazycs520 committed Apr 1, 2024
1 parent 958fe70 commit 5475b4a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions internal/client/client_batch.go
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@ func (c *batchCommandsClient) send(forwardedHost string, req *tikvpb.BatchComman
zap.String("forwardedHost", forwardedHost),
zap.Error(err),
)
c.fastFailRequests(err, req.RequestIds)
c.failRequestsByIDs(err, req.RequestIds) // fast fail requests.
return
}

Expand All @@ -604,7 +604,7 @@ func (c *batchCommandsClient) send(forwardedHost string, req *tikvpb.BatchComman
zap.Uint64s("requestIDs", req.RequestIds),
zap.Error(err),
)
c.fastFailRequests(err, req.RequestIds)
c.failRequestsByIDs(err, req.RequestIds) // fast fail requests.
}
}

Expand All @@ -631,8 +631,8 @@ func (c *batchCommandsClient) failPendingRequests(err error, forwardedHost strin
})
}

// fastFailRequests fast fails requests by requestID.
func (c *batchCommandsClient) fastFailRequests(err error, requestIDs []uint64) {
// failRequestsByIDs fails requests by requestID.
func (c *batchCommandsClient) failRequestsByIDs(err error, requestIDs []uint64) {
for _, requestID := range requestIDs {
value, ok := c.batched.Load(requestID)
if !ok {
Expand Down

0 comments on commit 5475b4a

Please sign in to comment.