Skip to content

Commit

Permalink
Merge pull request #151 from Netflix/jkoch/skip-cancel
Browse files Browse the repository at this point in the history
perf: skip future cancellation when not needed
  • Loading branch information
jasonk000 authored Dec 6, 2024
2 parents d2f9c43 + b200a51 commit 9ddd6a9
Showing 1 changed file with 0 additions and 3 deletions.
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

0 comments on commit 9ddd6a9

Please sign in to comment.