Skip to content

Commit

Permalink
feat(s3stream): replace useless scheduler executor (#663)
Browse files Browse the repository at this point in the history
Signed-off-by: Robin Han <[email protected]>
  • Loading branch information
superhx authored Nov 17, 2023
1 parent 2310863 commit 53f9833
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions s3stream/src/main/java/com/automq/stream/s3/S3Storage.java
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ public class S3Storage implements Storage {
private final Queue<DeltaWALUploadTaskContext> walCommitQueue = new LinkedList<>();
private final List<CompletableFuture<Void>> 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);
Expand Down Expand Up @@ -165,6 +165,7 @@ static void recover0(WriteAheadLog deltaWAL, StreamManager streamManager, Object
.toArray(CompletableFuture[]::new)
).get();
}

static LogCache.LogCacheBlock recoverContinuousRecords(Iterator<WriteAheadLog.RecoverResult> it, List<StreamMetadata> openingStreams) {
return recoverContinuousRecords(it, openingStreams, LOGGER);
}
Expand Down

0 comments on commit 53f9833

Please sign in to comment.