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

mmerli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git


The following commit(s) were added to refs/heads/master by this push:
     new 011ebcef4d6 [Broker] Close transactionBufferClient before closing the 
internal Pulsar client (#15922)
011ebcef4d6 is described below

commit 011ebcef4d639371bddf5b11668b34a20a798365
Author: Lari Hotari <[email protected]>
AuthorDate: Fri Jun 3 20:54:15 2022 +0300

    [Broker] Close transactionBufferClient before closing the internal Pulsar 
client (#15922)
    
    - transactionBufferClient uses the Pulsar client
---
 .../src/main/java/org/apache/pulsar/broker/PulsarService.java     | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git 
a/pulsar-broker/src/main/java/org/apache/pulsar/broker/PulsarService.java 
b/pulsar-broker/src/main/java/org/apache/pulsar/broker/PulsarService.java
index b0a5385f16f..9cc2878df0a 100644
--- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/PulsarService.java
+++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/PulsarService.java
@@ -487,6 +487,10 @@ public class PulsarService implements AutoCloseable, 
ShutdownService {
                 transactionBufferSnapshotService = null;
             }
 
+            if (transactionBufferClient != null) {
+                transactionBufferClient.close();
+            }
+
             if (client != null) {
                 client.close();
                 client = null;
@@ -519,10 +523,6 @@ public class PulsarService implements AutoCloseable, 
ShutdownService {
                 protocolHandlers = null;
             }
 
-            if (transactionBufferClient != null) {
-                transactionBufferClient.close();
-            }
-
             if (coordinationService != null) {
                 coordinationService.close();
             }

Reply via email to