From 53f98337a65f98ce512fc62e7421d831c31f1810 Mon Sep 17 00:00:00 2001 From: Robin Han Date: Fri, 17 Nov 2023 15:22:30 +0800 Subject: [PATCH] feat(s3stream): replace useless scheduler executor (#663) Signed-off-by: Robin Han --- s3stream/src/main/java/com/automq/stream/s3/S3Storage.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/s3stream/src/main/java/com/automq/stream/s3/S3Storage.java b/s3stream/src/main/java/com/automq/stream/s3/S3Storage.java index e7a46d7aa..f59b999ec 100644 --- a/s3stream/src/main/java/com/automq/stream/s3/S3Storage.java +++ b/s3stream/src/main/java/com/automq/stream/s3/S3Storage.java @@ -77,9 +77,9 @@ public class S3Storage implements Storage { private final Queue walCommitQueue = new LinkedList<>(); private final List> inflightWALUploadTasks = new CopyOnWriteArrayList<>(); - private final ScheduledExecutorService mainWriteExecutor = Threads.newSingleThreadScheduledExecutor( + private final ExecutorService mainWriteExecutor = Threads.newFixedThreadPool(1, ThreadUtils.createThreadFactory("s3-storage-main-write", false), LOGGER); - private final ScheduledExecutorService mainReadExecutor = Threads.newSingleThreadScheduledExecutor( + private final ExecutorService mainReadExecutor = Threads.newFixedThreadPool(1, ThreadUtils.createThreadFactory("s3-storage-main-read", false), LOGGER); private final ScheduledExecutorService backgroundExecutor = Threads.newSingleThreadScheduledExecutor( ThreadUtils.createThreadFactory("s3-storage-background", true), LOGGER); @@ -165,6 +165,7 @@ static void recover0(WriteAheadLog deltaWAL, StreamManager streamManager, Object .toArray(CompletableFuture[]::new) ).get(); } + static LogCache.LogCacheBlock recoverContinuousRecords(Iterator it, List openingStreams) { return recoverContinuousRecords(it, openingStreams, LOGGER); }