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

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


The following commit(s) were added to refs/heads/master by this push:
     new 1b4f88cd9b [INLONG-11841][Sort] Release the token of GlobalBufferQueue 
when closing SortTask and release BufferQueueChannel (#11842)
1b4f88cd9b is described below

commit 1b4f88cd9b6acd5abf7c69f1f24b859e908898a3
Author: ChunLiang Lu <[email protected]>
AuthorDate: Sun Apr 27 14:28:16 2025 +0800

    [INLONG-11841][Sort] Release the token of GlobalBufferQueue when closing 
SortTask and release BufferQueueChannel (#11842)
---
 .../inlong/sort/standalone/channel/BufferQueueChannel.java     | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git 
a/inlong-sort-standalone/sort-standalone-source/src/main/java/org/apache/inlong/sort/standalone/channel/BufferQueueChannel.java
 
b/inlong-sort-standalone/sort-standalone-source/src/main/java/org/apache/inlong/sort/standalone/channel/BufferQueueChannel.java
index 5db46b11ea..8c41b1d04a 100644
--- 
a/inlong-sort-standalone/sort-standalone-source/src/main/java/org/apache/inlong/sort/standalone/channel/BufferQueueChannel.java
+++ 
b/inlong-sort-standalone/sort-standalone-source/src/main/java/org/apache/inlong/sort/standalone/channel/BufferQueueChannel.java
@@ -131,6 +131,16 @@ public class BufferQueueChannel extends AbstractChannel {
         }
     }
 
+    @Override
+    public synchronized void stop() {
+        super.stop();
+        ProfileEvent event = this.bufferQueue.pollRecord();
+        while (event != null) {
+            this.bufferQueue.release(event.getBody().length);
+            event = this.bufferQueue.pollRecord();
+        }
+    }
+
     /**
      * setReloadTimer
      */

Reply via email to