pulsar icon indicating copy to clipboard operation
pulsar copied to clipboard

[fix][client] Release semaphore before discarding messages in batchMessageContainer

Open RobertIndie opened this issue 3 years ago • 0 comments

Fixes #17014

Motivation

The root cause of #17014 is a race condition in the batchMessageContainer when discarding the messages and releasing the semaphore. We need to release semaphore first and then discard messages. Otherwise, the user may observe that the semaphore has not been released after receiving the callback of that message.

Modifications

  • Release semaphore before discarding messages in batchMessageContainer

Documentation

Check the box below or label this PR directly.

Need to update docs?

  • [ ] doc-required (Your PR needs to update docs and you will update later)

  • [x] doc-not-needed (Please explain why)

  • [ ] doc (Your PR contains doc changes)

  • [ ] doc-complete (Docs have been already added)

RobertIndie avatar Aug 09 '22 10:08 RobertIndie

@RobertIndie Please provide a correct documentation label for your PR. Instructions see Pulsar Documentation Label Guide.

github-actions[bot] avatar Aug 11 '22 01:08 github-actions[bot]