From f070e4e30c5a7e916d8eb5bf58d6aa5d62d9411f Mon Sep 17 00:00:00 2001 From: PiteXChen <44110731+CLFutureX@users.noreply.github.com> Date: Thu, 15 Aug 2024 10:26:19 +0800 Subject: [PATCH] =?UTF-8?q?feat(s3stream):=20optimize=20the=20execution=20?= =?UTF-8?q?sequence=20to=20avoid=20deep=20depende=E2=80=A6=20(#1790)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(s3stream): optimize the execution sequence to avoid deep dependencies * feat(s3stream): optimize the execution sequence to avoid deep dependencies * feat(s3stream): optimize the execution sequence * feat(s3stream): optimize the execution sequence * feat(s3stream): optimize the execution sequence --- s3stream/src/main/java/com/automq/stream/s3/S3Stream.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/s3stream/src/main/java/com/automq/stream/s3/S3Stream.java b/s3stream/src/main/java/com/automq/stream/s3/S3Stream.java index f08439f875..168542a4a5 100644 --- a/s3stream/src/main/java/com/automq/stream/s3/S3Stream.java +++ b/s3stream/src/main/java/com/automq/stream/s3/S3Stream.java @@ -162,12 +162,11 @@ public CompletableFuture append(AppendContext context, RecordBatch }, LOGGER, "append"); pendingAppends.add(cf); pendingAppendTimestamps.push(startTimeNanos); - cf.whenComplete((nil, ex) -> { + return cf.whenComplete((nil, ex) -> { StreamOperationStats.getInstance().appendStreamLatency.record(TimerUtil.durationElapsedAs(startTimeNanos, TimeUnit.NANOSECONDS)); pendingAppends.remove(cf); pendingAppendTimestamps.pop(); }); - return cf; } finally { readLock.unlock(); }