Skip to content

Commit

Permalink
feat(s3stream): optimize the execution sequence to avoid deep depende… (
Browse files Browse the repository at this point in the history
#1790)

* 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
  • Loading branch information
CLFutureX authored Aug 15, 2024
1 parent 23d7c02 commit f070e4e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions s3stream/src/main/java/com/automq/stream/s3/S3Stream.java
Original file line number Diff line number Diff line change
Expand Up @@ -162,12 +162,11 @@ public CompletableFuture<AppendResult> 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();
}
Expand Down

0 comments on commit f070e4e

Please sign in to comment.