Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
Signed-off-by: MyonKeminta <[email protected]>
  • Loading branch information
MyonKeminta committed Sep 19, 2024
1 parent 7568524 commit c437f8f
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions client/tso_dispatcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ tsoBatchLoop:
case td.tsDeadlineCh <- dl:
}
// processRequests guarantees that the collected requests could be finished properly.
tbcConsumed, err := td.processRequests(stream, dc, batchController, done, false)
tbcConsumed, err := td.processRequests(stream, dc, batchController, done, td.useAsyncStream())
// If error happens during tso stream handling, reset stream and run the next trial.
if tbcConsumed {
// The function `processRequests` *consumed* the batchController.
Expand Down Expand Up @@ -523,14 +523,13 @@ func (td *tsoDispatcher) processRequests(
return false, err

Check warning on line 523 in client/tso_dispatcher.go

View check run for this annotation

Codecov / codecov/patch

client/tso_dispatcher.go#L522-L523

Added lines #L522 - L523 were not covered by tests
}
return true, nil

Check warning on line 525 in client/tso_dispatcher.go

View check run for this annotation

Codecov / codecov/patch

client/tso_dispatcher.go#L525

Added line #L525 was not covered by tests
} else {
result, err := stream.ProcessRequests(
clusterID, keyspaceID, reqKeyspaceGroupID, dcLocation, count, tbc.extraBatchingStartTime)
close(done)

td.handleTSOResultsForBatch(tbc, stream, result, reqKeyspaceGroupID, err)
return false, err
}
result, err := stream.ProcessRequests(
clusterID, keyspaceID, reqKeyspaceGroupID, dcLocation, count, tbc.extraBatchingStartTime)
close(done)

td.handleTSOResultsForBatch(tbc, stream, result, reqKeyspaceGroupID, err)
return false, err
}

func (td *tsoDispatcher) handleTSOResultsForBatch(tbc *tsoBatchController, stream *tsoStream, result tsoRequestResult, reqKeyspaceGroupID uint32, err error) {
Expand Down

0 comments on commit c437f8f

Please sign in to comment.