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

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


The following commit(s) were added to refs/heads/master by this push:
     new 149d0554ef Set ThreadFactory for Executor in EntryLoggerAllocator 
(#4562)
149d0554ef is described below

commit 149d0554efa86c340934a8134c191bb3c039943e
Author: Yike Xiao <[email protected]>
AuthorDate: Sat Mar 8 16:41:33 2025 +0800

    Set ThreadFactory for Executor in EntryLoggerAllocator (#4562)
---
 .../main/java/org/apache/bookkeeper/bookie/EntryLoggerAllocator.java  | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git 
a/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/EntryLoggerAllocator.java
 
b/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/EntryLoggerAllocator.java
index 70b76aaf37..c229e5e816 100644
--- 
a/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/EntryLoggerAllocator.java
+++ 
b/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/EntryLoggerAllocator.java
@@ -28,6 +28,7 @@ import com.google.common.annotations.VisibleForTesting;
 import io.netty.buffer.ByteBuf;
 import io.netty.buffer.ByteBufAllocator;
 import io.netty.buffer.Unpooled;
+import io.netty.util.concurrent.DefaultThreadFactory;
 import java.io.BufferedWriter;
 import java.io.File;
 import java.io.FileOutputStream;
@@ -76,7 +77,8 @@ class EntryLoggerAllocator {
         this.preallocatedLogId = logId;
         this.recentlyCreatedEntryLogsStatus = recentlyCreatedEntryLogsStatus;
         this.entryLogPreAllocationEnabled = 
conf.isEntryLogFilePreAllocationEnabled();
-        this.allocatorExecutor = Executors.newSingleThreadExecutor();
+        this.allocatorExecutor = Executors.newSingleThreadExecutor(
+                new DefaultThreadFactory("EntryLoggerAllocator"));
 
         // Initialize the entry log header buffer. This cannot be a static 
object
         // since in our unit tests, we run multiple Bookies and thus 
EntryLoggers

Reply via email to