cckellogg commented on a change in pull request #560:
URL: https://github.com/apache/pulsar-client-go/pull/560#discussion_r697165157
##########
File path: pulsar/internal/key_based_batch_builder.go
##########
@@ -203,21 +205,23 @@ func (bc *keyBasedBatchContainer) FlushBatches() (
sort.Strings(sortedKeys)
for _, k := range sortedKeys {
container := bc.batches.containers[k]
- b, s, c := container.Flush()
+ b, s, c, err := container.Flush()
if b != nil {
batchesData[idx] = b
sequenceIDs[idx] = s
callbacks[idx] = c
+ } else if err != nil {
Review comment:
Should the error be set with the other arrays so they are always the
same length? the only way `b` can be nil is if there are no messages right.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]