Skip to content

[Bug] BucketDelayedDeliveryTracker.containsMessage is not thread-safe, but it's called from another thread #23190

Description

@lhotari

Search before asking

  • 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.

Version

any released version of Pulsar

Minimal reproduce step

There's code that calls BucketDelayedDeliveryTracker.containsMessage.containsMessage from another thread

if (deliveryTracker instanceof BucketDelayedDeliveryTracker) {
skipCondition = position -> ((BucketDelayedDeliveryTracker) deliveryTracker)
.containsMessage(position.getLedgerId(), position.getEntryId());
}

What did you expect to see?

Having thread-safety aspects considered in the BucketDelayedDeliveryTracker implementation.

What did you see instead?

There seem to be thread safety issues in BucketDelayedDeliveryTracker

Anything else?

No response

Are you willing to submit a PR?

  • I'm willing to submit a PR!

Metadata

Metadata

Assignees

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