prestodb / presto

The official home of the Presto distributed SQL query engine for big data
http://prestodb.io
Apache License 2.0
15.98k stars 5.36k forks source link

When aggregation spills, unspilling should allocate memory from operator's context #8304

Closed findepi closed 6 years ago

findepi commented 7 years ago

Currently the unspilling declares memory allocation in system context (com.facebook.presto.operator.aggregation.builder.SpillableHashAggregationBuilder#mergeFromDisk, com.facebook.presto.operator.aggregation.builder.SpillableHashAggregationBuilder#mergeFromDiskAndMemory contain operatorContext.getSystemMemoryContext().newAggregatedMemoryContext()).

Instead, it should allocate in "normal" memory pool (via operator's context).

cc @losipiuk

findepi commented 6 years ago

@nezihyigitbasi with system memory being merged with user memory, is there a point in keeping this issue around?

nezihyigitbasi commented 6 years ago

@findepi I don't think so.