道君- Tao Jiuming
道君- Tao Jiuming
### Search before asking - [X] I searched in the [issues](https://github.com/apache/pulsar/issues) and found nothing similar. ### Read release policy - [X] I understand that unsupported versions don't get bug fixes....
### Motivation We initialize `DelayedDeliveryTracker` when [dispatch messages](https://github.com/apache/pulsar/blob/master/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentDispatcherMultipleConsumers.java#L1161-L1183) by calling `DelayedDeliveryTrackerFactory.newTracker` in [`AbstractBaseDispatcher`](https://github.com/apache/pulsar/blob/master/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/AbstractBaseDispatcher.java#L218). However, when we set `delayedDeliveryTrackerFactoryClassName` to `org.apache.pulsar.broker.delayed.BucketDelayedDeliveryTrackerFactory`, `BucketDelayedDeliveryTracker` has a chance to recover failed(see [here](https://github.com/apache/pulsar/blob/master/pulsar-broker/src/main/java/org/apache/pulsar/broker/delayed/bucket/BucketDelayedDeliveryTracker.java#L136-L139) ), it...
### Motivation [PersistentTopic#getLastDispatchablePosition](https://github.com/apache/pulsar/blob/master/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentTopic.java#L3776-L3788) is using by [Reader#hasMessageAvailable](https://github.com/apache/pulsar/blob/master/pulsar-client-api/src/main/java/org/apache/pulsar/client/api/Reader.java#L116) , [ConsumerImpl#hasMessageAvailable](https://github.com/apache/pulsar/blob/master/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerImpl.java#L2440-L2448), [Consumer#getLastMessageIdAsync](https://github.com/apache/pulsar/blob/master/pulsar-client-api/src/main/java/org/apache/pulsar/client/api/Consumer.java#L591-L615). The current implementation is read entries from Bookkeeper(or sth else), which leads to low throughput, high latency and heavy load,...
Fixes https://github.com/apache/pulsar/issues/22748 ### Motivation see: https://github.com/apache/pulsar/issues/22748#issuecomment-2121171595 ### Modifications ### Verifying this change - [ ] Make sure that the change passes the CI checks. *(Please pick either of the following...
Fixes https://github.com/apache/pulsar/issues/14875 ### Motivation The client connections can be closed when doing handshake, add `ConnectionFailedException` to make this kind of exception more clear. ### Modifications ### Verifying this change...
### Motivation In https://github.com/apache/pulsar/pull/22908 we introduced `ConcurrentRoaringBitSet` which is based on `StampLock` and `RoaringBitmap` to optimize the memory usage and GC pause on `BitSet`. However, there is a concurrency issue...
### Motivation Trim BucketDelayedDeliveryTracker buckets if the topic ledgers trimmed. ### Modifications ### Verifying this change - [ ] Make sure that the change passes the CI checks. *(Please pick...
### Motivation https://github.com/apache/pulsar/pull/6404 is to fix duplicated messages after broker restart(Especially for delayed messages). However, since we introduced https://github.com/apache/pulsar/pull/19035, it has to some extent solved this problem, but this logic...
### Motivation For BucketDelayedDeliveryTracker, we store the Bucket metadata(position) in Cursor#properties, and remove the property *before* delete `ImmutableBucket`. There is a corner case that it could remove Cursor#properties succeed but...
Fixes https://github.com/apache/pulsar/issues/22129 ### Motivation Pulsar uses binary search to find the message by timestamp, it will reduce the number of iterations to find the message, and make it more efficient...