From cc967725e0e35ad27a52031e886dd299b1d1bc4c Mon Sep 17 00:00:00 2001 From: Shichao Nie Date: Fri, 3 Nov 2023 17:24:47 +0800 Subject: [PATCH] fix(s3stream): fix compaction read throttle (#564) Signed-off-by: Shichao Nie --- .../java/com/automq/stream/s3/compact/CompactionManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/s3stream/src/main/java/com/automq/stream/s3/compact/CompactionManager.java b/s3stream/src/main/java/com/automq/stream/s3/compact/CompactionManager.java index eda57e243..b8a9d6c6d 100644 --- a/s3stream/src/main/java/com/automq/stream/s3/compact/CompactionManager.java +++ b/s3stream/src/main/java/com/automq/stream/s3/compact/CompactionManager.java @@ -506,7 +506,7 @@ void executeCompactionPlans(CommitWALObjectRequest request, List S3ObjectMetadata metadata = s3ObjectMetadataMap.get(streamDataBlocEntry.getKey()); List streamDataBlocks = streamDataBlocEntry.getValue(); DataBlockReader reader = new DataBlockReader(metadata, s3Operator); - reader.readBlocks(streamDataBlocks, networkBandwidth); + reader.readBlocks(streamDataBlocks, Math.min(CompactionConstants.S3_OBJECT_MAX_READ_BATCH, networkBandwidth)); } List> streamObjectCFList = new ArrayList<>(); CompletableFuture walObjectCF = null;