Since QueryCachePlan use some cache for HQLQueryPlan optimisation, it should be possible for the JVM to clear the cache on memory starvation.
Default 2048 entries in queryPlanCache could be easily filled with one request but having in clause with different size of the collection used. (Oracle could have 1000 entries, so it could occupied 1000 entries in the queryPlanCache).
Use case encountered lead to almost 50% of the JVM used by the queryPlanCache map (Xmx1G, queryPlanCache used 470Mo.
Patch provided and tested in condition of an OOM. After GC full WITH GC on SR, queryCachePlan continue to work properly
|