Skip to content

[Bug] permit leak in chunked message discard path #26675

Description

@programmerahul

Search before reporting

  • I searched in the issues and found nothing similar.

Read release policy

  • I understand that unsupported versions don't get bug fixes. I will attempt to reproduce the issue on a supported version of Pulsar client and Pulsar broker.

User environment

Broker and client version: 4
OS: macOS Sequoia

Issue Description

When a chunked message is discarded due to expiry, etc. then permit of last chunk is not returned. Which results in permit leak, and eventually after enough leaks( receiverQueue/2) the consumptions stops. This is because on broker the permit drops to 0, and client now cannot sent permit request, because it doesn't have enough messages.

Error messages

The consumption stops

Reproducing the issue

this can be reproduced by setting the expireTimeOfIncompleteChunkedMessage to a very small value like 1ms, and on produce side, sending the chunked messages with chunks count of 10 or more. So that the chunks gets expired, and the last chunk of each message will leak 1 permit. and consumption will stop after (receiverQueue/2) leaks.

Additional information

No response

Are you willing to submit a PR?

  • I'm willing to submit a PR!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/bugThe PR fixed a bug or issue reported a bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions