You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by lh...@apache.org on 2025/04/29 19:57:40 UTC

(pulsar) branch branch-3.0 updated (64f574a706f -> 72eb29fcc7e)

This is an automated email from the ASF dual-hosted git repository.

lhotari pushed a change to branch branch-3.0
in repository https://gitbox.apache.org/repos/asf/pulsar.git


    from 64f574a706f [fix][client] Fix incorrect producer.getPendingQueueSize due to incomplete queue implementation (#24184)
     new b4e1c93d2c8 Fix presto-distribution/LICENSE
     new 72eb29fcc7e [fix][broker] Fix ByteBuf memory leak in REST API for publishing messages (#24228)

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../org/apache/pulsar/broker/rest/TopicsBase.java  | 11 +++++--
 pulsar-sql/presto-distribution/LICENSE             | 38 +++++++++++-----------
 2 files changed, 28 insertions(+), 21 deletions(-)


(pulsar) 01/02: Fix presto-distribution/LICENSE

Posted by lh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

lhotari pushed a commit to branch branch-3.0
in repository https://gitbox.apache.org/repos/asf/pulsar.git

commit b4e1c93d2c8b2e084abae71853a487c802fc2394
Author: Lari Hotari <lh...@apache.org>
AuthorDate: Mon Apr 28 15:18:39 2025 +0300

    Fix presto-distribution/LICENSE
---
 pulsar-sql/presto-distribution/LICENSE | 38 +++++++++++++++++-----------------
 1 file changed, 19 insertions(+), 19 deletions(-)

diff --git a/pulsar-sql/presto-distribution/LICENSE b/pulsar-sql/presto-distribution/LICENSE
index 26441210af9..3e866cbe3c3 100644
--- a/pulsar-sql/presto-distribution/LICENSE
+++ b/pulsar-sql/presto-distribution/LICENSE
@@ -231,21 +231,21 @@ The Apache Software License, Version 2.0
     - commons-compress-1.26.0.jar
     - commons-lang3-3.11.jar
  * Netty
-    - netty-buffer-4.1.119.Final.jar
-    - netty-codec-4.1.119.Final.jar
-    - netty-codec-dns-4.1.119.Final.jar
-    - netty-codec-http-4.1.119.Final.jar
-    - netty-codec-haproxy-4.1.119.Final.jar
-    - netty-codec-socks-4.1.119.Final.jar
-    - netty-handler-proxy-4.1.119.Final.jar
-    - netty-common-4.1.119.Final.jar
-    - netty-handler-4.1.119.Final.jar
+    - netty-buffer-4.1.121.Final.jar
+    - netty-codec-4.1.121.Final.jar
+    - netty-codec-dns-4.1.121.Final.jar
+    - netty-codec-http-4.1.121.Final.jar
+    - netty-codec-haproxy-4.1.121.Final.jar
+    - netty-codec-socks-4.1.121.Final.jar
+    - netty-handler-proxy-4.1.121.Final.jar
+    - netty-common-4.1.121.Final.jar
+    - netty-handler-4.1.121.Final.jar
     - netty-reactive-streams-2.0.6.jar
-    - netty-resolver-4.1.119.Final.jar
-    - netty-resolver-dns-4.1.119.Final.jar
-    - netty-resolver-dns-classes-macos-4.1.119.Final.jar
-    - netty-resolver-dns-native-macos-4.1.119.Final-osx-aarch_64.jar
-    - netty-resolver-dns-native-macos-4.1.119.Final-osx-x86_64.jar
+    - netty-resolver-4.1.121.Final.jar
+    - netty-resolver-dns-4.1.121.Final.jar
+    - netty-resolver-dns-classes-macos-4.1.121.Final.jar
+    - netty-resolver-dns-native-macos-4.1.121.Final-osx-aarch_64.jar
+    - netty-resolver-dns-native-macos-4.1.121.Final-osx-x86_64.jar
     - netty-tcnative-boringssl-static-2.0.70.Final.jar
     - netty-tcnative-boringssl-static-2.0.70.Final-linux-aarch_64.jar
     - netty-tcnative-boringssl-static-2.0.70.Final-linux-x86_64.jar
@@ -253,11 +253,11 @@ The Apache Software License, Version 2.0
     - netty-tcnative-boringssl-static-2.0.70.Final-osx-x86_64.jar
     - netty-tcnative-boringssl-static-2.0.70.Final-windows-x86_64.jar
     - netty-tcnative-classes-2.0.70.Final.jar
-    - netty-transport-4.1.119.Final.jar
-    - netty-transport-classes-epoll-4.1.119.Final.jar
-    - netty-transport-native-epoll-4.1.119.Final-linux-aarch_64.jar
-    - netty-transport-native-epoll-4.1.119.Final-linux-x86_64.jar
-    - netty-transport-native-unix-common-4.1.119.Final.jar
+    - netty-transport-4.1.121.Final.jar
+    - netty-transport-classes-epoll-4.1.121.Final.jar
+    - netty-transport-native-epoll-4.1.121.Final-linux-aarch_64.jar
+    - netty-transport-native-epoll-4.1.121.Final-linux-x86_64.jar
+    - netty-transport-native-unix-common-4.1.121.Final.jar
     - netty-incubator-transport-classes-io_uring-0.0.26.Final.jar
     - netty-incubator-transport-native-io_uring-0.0.26.Final-linux-x86_64.jar
     - netty-incubator-transport-native-io_uring-0.0.26.Final-linux-aarch_64.jar


(pulsar) 02/02: [fix][broker] Fix ByteBuf memory leak in REST API for publishing messages (#24228)

Posted by lh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

lhotari pushed a commit to branch branch-3.0
in repository https://gitbox.apache.org/repos/asf/pulsar.git

commit 72eb29fcc7e15032e799bdea3f473e659cc697fd
Author: Lari Hotari <lh...@users.noreply.github.com>
AuthorDate: Tue Apr 29 18:19:35 2025 +0300

    [fix][broker] Fix ByteBuf memory leak in REST API for publishing messages (#24228)
    
    (cherry picked from commit 0c8e88cf983a8793a117f05a14c37c755464ca89)
---
 .../main/java/org/apache/pulsar/broker/rest/TopicsBase.java   | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/rest/TopicsBase.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/rest/TopicsBase.java
index 075c6227b73..fabd0c13a3c 100644
--- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/rest/TopicsBase.java
+++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/rest/TopicsBase.java
@@ -60,6 +60,7 @@ import org.apache.pulsar.broker.authentication.AuthenticationParameters;
 import org.apache.pulsar.broker.lookup.LookupResult;
 import org.apache.pulsar.broker.namespace.LookupOptions;
 import org.apache.pulsar.broker.service.BrokerServiceException;
+import org.apache.pulsar.broker.service.Topic;
 import org.apache.pulsar.broker.service.schema.SchemaRegistry;
 import org.apache.pulsar.broker.service.schema.exceptions.SchemaException;
 import org.apache.pulsar.broker.web.RestException;
@@ -279,8 +280,14 @@ public class TopicsBase extends PersistentTopicsBase {
                         .remove(topicName.getPartitionIndex());
             } else {
                 try {
-                    t.get().publishMessage(messageToByteBuf(message),
-                            RestMessagePublishContext.get(publishResult, t.get(), System.nanoTime()));
+                    ByteBuf headersAndPayload = messageToByteBuf(message);
+                    try {
+                        Topic topicObj = t.get();
+                        topicObj.publishMessage(headersAndPayload,
+                                RestMessagePublishContext.get(publishResult, topicObj, System.nanoTime()));
+                    } finally {
+                        headersAndPayload.release();
+                    }
                 } catch (Exception e) {
                     if (log.isDebugEnabled()) {
                         log.debug("Fail to publish single messages to topic  {}: {} ",