Skip to content

Commit

Permalink
Cache AccumulatorFactory instances basing on last access time
Browse files Browse the repository at this point in the history
Currently, AccumulatorFactory instances are flushed after one hour
has elapsed. It can cause a lot of deoptimzation as an side effect.
  • Loading branch information
radek-kondziolka authored and raunaqmorarka committed May 20, 2023
1 parent 062bea6 commit 150d340
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -437,10 +437,10 @@ public class LocalExecutionPlanner

private final NonEvictableCache<FunctionKey, AccumulatorFactory> accumulatorFactoryCache = buildNonEvictableCache(CacheBuilder.newBuilder()
.maximumSize(1000)
.expireAfterWrite(1, HOURS));
.expireAfterAccess(1, HOURS));
private final NonEvictableCache<FunctionKey, AggregationWindowFunctionSupplier> aggregationWindowFunctionSupplierCache = buildNonEvictableCache(CacheBuilder.newBuilder()
.maximumSize(1000)
.expireAfterWrite(1, HOURS));
.expireAfterAccess(1, HOURS));

@Inject
public LocalExecutionPlanner(
Expand Down

0 comments on commit 150d340

Please sign in to comment.