apache / apache/pulsar

[improve][broker]: DelayedDeliveryTracker init and addMessage

Open
#17,094 1 comment 0 reactions 0 assignees View on GitHub
Stale
Dominant language
Java
Stars
15.3k
Forks
3.8k
Avg merge
1d 14h
Merged PRs (30d)
160

Description

### Search before asking

- [X] I searched in the [issues](https://github.com/apache/pulsar/issues) and found nothing similar.

### Motivation

1. PersistentDispatcherMultipleConsumers.java use double check lock init DelayedDeliveryTracker
2. PersistentDispatcherMultipleConsumers.java not lock when msgMetadata.hasDeliverAtTime return false
3. InMemoryDelayedDeliveryTracker.java `addMessage` method add lock to ensure thread safe

### Solution

https://github.com/apache/pulsar/pull/17092

### Alternatives

_No response_

### Anything else?

_No response_

### Are you willing to submit a PR?

- [X] I'm willing to submit a PR!

Contributor guide

Open the contributing guide

Research direction

Start with PersistentDispatcherMultipleConsumers.java and InMemoryDelayedDeliveryTracker.java, focusing on DelayedDeliveryTracker initialization, msgMetadata.hasDeliverAtTime handling, and addMessage. Review the linked pull request for context, then confirm the three listed concurrency concerns are addressed and covered by the project's relevant checks.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend, distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.