The Apache Pulsar community releases version 2.10.4! 37 contributors provided improvements and bug fixes that delivered 12 commits. Thanks for all your contributions.
This blog walks through the most noteworthy changes. For the complete list, including all feature enhancements and bug fixes, check out the Pulsar 2.10.4 Release Notes.
In earlier versions, Key_Shared subscriptions suffered from performance issues due to the lack of a ref count for sticky hash.
A significant performance improvement has been made to the Key_Shared subscriptions by adding a ref count for sticky hash. This optimization reduces the time required to check if messages contain the hash from a given sticky hash set, resulting in improved performance and efficiency.
AbstractBatchedMetadataStore - Use AlreadyClosedException instead of IllegalStateException (PR-19284)
In earlier versions, when the broker was shutting down, the
AbstractBatchedMetadataStore would complete pending operations with a generic
IllegalStateException. However, code dependent on the
MetadataStore usually expected instances of
MetadataStoreException and might not react properly to this error.
This PR improves the error handling during broker shutdown by completing pending operations with an
AlreadyClosedException instead of
IllegalStateException. This ensures that the dependent code responds more appropriately to the error, even if the broker is shutting down.
In earlier versions, called
ledger.openCursor("xxx", null) with a null
initialPosition parameter would result in the cursor being set to the earliest position, causing unexpected behavior. The root cause of this issue was due to incorrect handling of the
This PR fixes the issue by ensuring that the correct initial position is used when opening a cursor with a null
initialPosition. The code now sets the cursor to the latest position, as expected.
In previous versions, when there were many concurrent subscriptions in a topic, broker performance would degrade due to many io-threads waiting for the lock, synchronized (activeCursors) while calling checkBackloggedCursors.
This PR adds an
isActive variable in
ManagedCursorImpl to minimize the access to
ManagedLedgerImpl, which reduces the contention on the lock and improves the broker performance with many concurrent subscriptions.
In earlier versions, although users could create partitioned topics using the client when partitioned type auto-creation was enabled, there was no support for deleting these partitioned topics.
This PR adds support for deleting partitioned topics using the keyword
-partition-, making it easier for users to manage their partitioned topics.
If you are interested in learning more about Pulsar 2.10.4, you can download and try it out now!