Skip to content

Commit

Permalink
fix(s3stream): temporarily disable throttle for slow read (#1009)
Browse files Browse the repository at this point in the history
Signed-off-by: Shichao Nie <[email protected]>
  • Loading branch information
SCNieh authored Mar 24, 2024
1 parent d41aea3 commit 155a6c0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public CompletableFuture<FindIndexResult> find(long streamId, long startOffset,
}

public CompletableFuture<DataBlockGroup> read(DataBlockIndex block) {
CompletableFuture<ByteBuf> rangeReadCf = s3Operator.rangeRead(objectKey, block.startPosition(), block.endPosition(), ThrottleStrategy.THROTTLE_1);
CompletableFuture<ByteBuf> rangeReadCf = s3Operator.rangeRead(objectKey, block.startPosition(), block.endPosition(), ThrottleStrategy.BYPASS);
return rangeReadCf.thenApply(DataBlockGroup::new);
}

Expand Down
2 changes: 1 addition & 1 deletion s3stream/src/main/java/com/automq/stream/s3/S3Stream.java
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ public CompletableFuture<FetchResult> fetch(FetchContext context,
if (context.readOptions().fastRead()) {
networkOutboundLimiter.forceConsume(totalSize);
} else {
return networkOutboundLimiter.consume(ThrottleStrategy.THROTTLE_1, totalSize).thenApply(nil -> rs);
return networkOutboundLimiter.consume(ThrottleStrategy.BYPASS, totalSize).thenApply(nil -> rs);
}
}
return CompletableFuture.completedFuture(rs);
Expand Down

0 comments on commit 155a6c0

Please sign in to comment.