About Apache Pulsar

Apache Pulsar is a top-level project of the Apache Software Foundation. It is a next-generation cloud-native distributed message flow platform that integrates messaging, storage, and lightweight functional computing. Multi-machine room and cross-region data replication, with streaming data storage features such as strong consistency, high throughput, low latency, and high scalability.

GitHub address: http://github.com/apache/pulsar/

Recently, the Apache Pulsar community released Pulsar version 2.7.4! The new release includes improvements and bug fixes from 32 contributors, and 98 changes were committed.

version highlights

  • Upgraded Log4j to version 2.17.0 - CVE-2021-45105[1]. PR-13392[2]
  • OpAddEntry can be referenced correctly when recycling ManagedLedger . PR-12103[3]
  • NPE does not occur OpAddEntry when ManagedLedger is closed. PR-12364[4]

This blog presents the most noteworthy developments in version 2.7.4, grouped by project feature updates. For a complete list of all performance upgrades and bug fixes, please see Pulsar 2.7.4 Release Notes [5] .

Bug fixes and feature enhancements

PR-13392[6]: Upgrade log4j to version 2.17.0 - CVE-2021-45105[7]

Issue: A critical vulnerability in Log4j allows remote execution by an attacker. The vulnerability is described and tracked CVE-2021-44228[8]

solution: upgrade log4j to version 2.17.0. For details, refer to blog .

PR-12103 [. 9]: recovered OpAddEntry correctly referenced by ManagerLedger .

Issue: , after a failed write, a task was scheduled in the background to force the shutdown of the ledger and trigger the creation of a new ledger. May cause NPE or undefined behavior if the OpAddEntry

solution: ManagedLedgerImpl object reference is copied to final variable, background task will not depend on OpAddEntry instance.

PR-12123[10]: No potential race condition in BlobStoreBackedReadHandler

Issue: this release, BlobStoreBackedReadHandler entered an infinite loop while reading the offload ledger. There is a race condition between reading the entry and closing the BlobStoreBackedReadHandler.

solution: adds a status check before reading entry and makes BlobStoreBackedReadHandler exit the loop entryID greater than lastEntryID

PR-12364[11]: NPE does not occur OpAddEntry

issue: this release, the ManagedLedgerBkTest#managedLedgerClosed test closed the ManagedLedger object on some asyncAddEntry operations and failed with NPE.

Solution: Close OpAddEntry when ManagedLedger notifies OpAddEntry failure. This correctly recycles the OpAddEntry object and successfully triggers the failed callback.

PR-11294[12]: Correctly set topic policy by partition's topic name.
Issue: this release, the topic name of a partition could not be used to set topic policies.

solution: allows setting topic policies by partition's topic name by converting the partition's topic name in SystemTopicBasedTopicPoliciesService

PR-8611[13]: Schedule rate limiter in effect for consumers.
issue: this release, since acquiredPermits resets to 0 every second, the scheduling rate limiter does not take effect if all consumers start reading in the next second.

solution: DispatchRateLimiter the behavior of permits every second instead of acquiredPermits to 0. Consumers temporarily stop reading the entry, until acquiredPermits the value returned is less than permits .

PR-11310[14]: NPE does not occur when unload bundle operation is performed.
Issue: NPE occurs when unload bundle operation is performed when stress testing persistent partition topic. At the same time, the producer does not write the message.

solution: adds more security checks to fix this.

PR-11346[15]: Fix inconsistent behavior of namespace bundle cache.
Issue: this release of 161f1068fb51ce, the namespace bundle cache was not invalidated after the namespace was deleted.

Solution: The namespace policy cache is invalidated when the bundle cache is invalidated.

PR-11342[16]: Shut down the replicator and replication client after deleting the cluster.
Issue: , the replicator and replication client did not shut down after deleting the cluster. The producer of the replicator keeps trying to reconnect to the deleted cluster.

Solution: Shut down the corresponding replication machine and replication client.

PR-10384[17]: Post rate limiter works as expected.
issue: this release, if preciseTopicPublishRateLimiterEnable set to true for rate limiting, the following issues occurred:

  • When changing a limit from a bounded limit to an unbounded limit, the updated limit does not set the bounds.
  • Each topic creates a dispatch thread for each limiter instance.
  • Topics do not publish scheduling threads when topics are unloaded or operations are closed.
  • Updating the limit does not shut down the scheduling thread associated with the replaced limiter instance.

solution

  • Clean up previous limiter instances before creating new ones.
  • Use brokerService.pulsar().getExecutor() as the scheduler for the rate limiter instance.
  • Added resource cleanup hook for theme shutdown (uninstall).

PR-12015[18]: Clean up newly created ledger if the ZNode list cannot be updated.
Issue: When updating the ZNode list, ZooKeeper throws an exception and does not clean up the created ledger. managedLedger are not indexed into the topic 061f1068fb54e6 list and therefore cannot be kept clear as topics. Also, if a ZNode version mismatch exception is thrown, the number of ZNodes will increase in ZooKeeper.

Solution: When ZNode list update fails, regardless of exception type, delete created ledger from broker cache and BookKeeper.

participate

Use the new version

Welcome everyone download [19] and use the new version! If you encounter problems during use, you can raise questions and communicate with the community issue[20]

Join the Apache Pulsar community

The growth of the Pulsar project comes from and is rooted in the community. The preparation and release of new versions are inseparable from the contributions of community partners. Would you like to be one of them? Participating in open source can gain recognition from inside and outside the company and the community, and make friends with like-minded partners from various fields; at the same time, it can also improve personal influence and promote personal development. Participating in open source is not exclusive to coders. Community, documentation and other aspects can allow everyone to use their skills.

As a global open source project, as of now, Apache Pulsar has 480 contributors, 10.2 K+ Stars, and 2.6 K+ Forks. We have provided a participation guide for everyone, and welcome more and more small partners to help the continuous development and progress of the Apache Pulsar project.

Related Reading

Citation link

[1] CVE-2021-45105: https://pulsar.apache.org/blog/2021/12/11/Log4j-CVE/

[2] PR-13392: https://github.com/apache/pulsar/pull/13392

[3] PR-12103: https://github.com/apache/pulsar/pull/12103

[4] PR-12364: https://github.com/apache/pulsar/pull/12364

[5] Pulsar 2.7.4 release notes: https://pulsar.apache.org/release-notes/#274

[6] PR-13392: https://github.com/apache/pulsar/pull/13392

[7] CVE-2021-45105: https://pulsar.apache.org/blog/2021/12/11/Log4j-CVE/

[8] CVE-2021-44228: https://nvd.nist.gov/vuln/detail/CVE-2021-44228

[9] PR-12103: https://github.com/apache/pulsar/pull/12103

[10] PR-12123: https://github.com/apache/pulsar/pull/12123

[11] PR-12364: https://github.com/apache/pulsar/pull/12364

[12] PR-11294: https://github.com/apache/pulsar/pull/11294

[13] PR-8611: https://github.com/apache/pulsar/pull/8611

[14] PR-11310: https://github.com/apache/pulsar/pull/11310

[15] PR-11346: https://github.com/apache/pulsar/pull/11346

[16] PR-11342: https://github.com/apache/pulsar/pull/11342

[17] PR-10384: https://github.com/apache/pulsar/pull/10384

[18] PR-12015: https://github.com/apache/pulsar/pull/12015

[19] Downloads: https://pulsar.apache.org/en/download/

[20] : https://github.com/apache/pulsar/issues

[21] Apache Pulsar Official Contribution Guide: http://pulsar.apache.org/en/contributing/

Follow public account " " 161f1068fb5bf2 to get dry goods and news

joined Apache Pulsar Chinese exchange group 👇🏻


ApachePulsar
192 声望939 粉丝

Apache软件基金会顶级项目,下一代云原生分布式消息系统