Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf: skip future cancellation when not needed #151

Merged
merged 1 commit into from
Dec 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,6 @@ private <T> CompletableFuture<T> doAsyncGet(EVCacheKey evcKey, Transcoder<T> tc)
if (log.isDebugEnabled() && shouldLog()) log.debug("Error while building and starting the event");
return errorFuture;
}
errorFuture.cancel(false);

final long start = EVCacheMetricsFactory.getInstance().getRegistry().clock().wallTime();
StringBuilder status = new StringBuilder(EVCacheMetricsFactory.SUCCESS);
Expand Down Expand Up @@ -2375,8 +2374,6 @@ private <T> CompletableFuture<Map<String, T>> doAsyncGetBulk(Collection<String>
if (log.isDebugEnabled() && shouldLog()) log.debug("Error while building and starting the event for doAsyncGetBulk");
return errorFuture;
}
if (log.isDebugEnabled() && shouldLog()) log.debug("Cancelling the error future");
errorFuture.cancel(false);

final long start = EVCacheMetricsFactory.getInstance().getRegistry().clock().wallTime();
StringBuilder status = new StringBuilder(EVCacheMetricsFactory.SUCCESS);
Expand Down
Loading