Hi fellows
We use Calcite's materialization view in our product env, and it OOM times,
I dig the memory dump and found there all of RelOptMaterialization instance.

We will call Planner#clear before every query, and inside the dump, there
are lots of planner instance, soI suspect it is a circular reference that
JVM can not gc them, here's the chain:

1. org.apache.calcite.plan.volcano.VolcanoPlanner#materializations:
List<RelOptMaterialization> 2.
org.apache.calcite.plan.RelOptMaterialization#queryRel: AbstractRelNode 3.
org.apache.calcite.rel.AbstractRelNode#cluster: RelOptCluster 4.
org.apache.calcite.plan.RelOptCluster#planner: VolcanoPlanner 5.
org.apache.calcite.plan.volcano.VolcanoPlanner#materializations:
List<RelOptMaterialization>

Regards!

Aron Tao

Reply via email to