Gilthoniel opened a new pull request, #1261:
URL: https://github.com/apache/pulsar-client-go/pull/1261
Fixes #1258
### Motivation
While flushing, the data channel is switched if a new allocated one which
can cause the loss of messages because the length can be zero which would stop
the procedure and at the same time a new message can be sent to the channel.
### Modifications
Instead of allocating a new channel, it empties the existing one up to the
length of the buffer of the channel before proceeding with the flush.
### Verifying this change
- [ ] Make sure that the change passes the CI checks.
This change is already covered by existing tests, such as
*TestFlushInProducer*.
### Documentation
- Does this pull request introduce a new feature? no
--
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]