Skip to content

Commit

Permalink
Check enqueueing result
Browse files Browse the repository at this point in the history
Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
  • Loading branch information
MyonKeminta committed Jul 5, 2024
1 parent d25a8c8 commit a533754
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions client/tso_stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -279,10 +279,12 @@ func (s *tsoStream) getServerURL() string {
func (s *tsoStream) processRequests(reqID uint64,
clusterID uint64, keyspaceID, keyspaceGroupID uint32, dcLocation string, count int64, batchStartTime time.Time,
) error {
s.pendingReqIDs.Push(batchedReq{
if !s.pendingReqIDs.Push(batchedReq{
reqID: reqID,
startTime: time.Now(),
})
}) {
return errors.New("channel full")
}

if err := s.stream.Send(clusterID, keyspaceID, keyspaceGroupID, dcLocation, count); err != nil {
if err == io.EOF {
Expand Down

0 comments on commit a533754

Please sign in to comment.