[
https://issues.apache.org/jira/browse/IGNITE-28957?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Vladislav Pyatkov updated IGNITE-28957:
---------------------------------------
Description:
h2. Motivation
`ExecutionServiceImpl#tryExecuteForUpdate` calls
`ListFieldsQueryCursor#getAll()` for the inner SELECT before acquiring row
locks:
{code}
ListFieldsQueryCursor<?> innerCursor = mapAndExecutePlan(qry, plan.innerPlan());
List<List<?>> rows = innerCursor.getAll();
{code}
As a result, the complete query result is materialized on the coordinator.
A broad SELECT FOR UPDATE, especially one involving large values or joins, may
consume an unbounded amount of heap and eventually cause an OutOfMemoryError.
h2. Definition of done
The implementation should avoid keeping the entire result set in memory more
than it is quoted.
was:
h2. Motivation
`ExecutionServiceImpl#tryExecuteForUpdate` calls
`ListFieldsQueryCursor#getAll()` for the inner SELECT before acquiring row
locks:
{code}
ListFieldsQueryCursor<?> innerCursor = mapAndExecutePlan(qry, plan.innerPlan());
List<List<?>> rows = innerCursor.getAll();
{code}
As a result, the complete query result is materialized on the coordinator.
A broad SELECT FOR UPDATE, especially one involving large values or joins, may
consume an unbounded amount of heap and eventually cause an OutOfMemoryError.
h2. Definition of done
The implementation should avoid keeping the entire result set in memory.
> Calcite SELECT FOR UPDATE may cause OOM by materializing the entire result set
> ------------------------------------------------------------------------------
>
> Key: IGNITE-28957
> URL: https://issues.apache.org/jira/browse/IGNITE-28957
> Project: Ignite
> Issue Type: Bug
> Components: sql
> Reporter: Vladislav Pyatkov
> Assignee: Vladislav Pyatkov
> Priority: Major
> Labels: calcite, sql
> Time Spent: 10m
> Remaining Estimate: 0h
>
> h2. Motivation
> `ExecutionServiceImpl#tryExecuteForUpdate` calls
> `ListFieldsQueryCursor#getAll()` for the inner SELECT before acquiring row
> locks:
> {code}
> ListFieldsQueryCursor<?> innerCursor = mapAndExecutePlan(qry,
> plan.innerPlan());
> List<List<?>> rows = innerCursor.getAll();
> {code}
> As a result, the complete query result is materialized on the coordinator.
> A broad SELECT FOR UPDATE, especially one involving large values or joins,
> may consume an unbounded amount of heap and eventually cause an
> OutOfMemoryError.
> h2. Definition of done
> The implementation should avoid keeping the entire result set in memory more
> than it is quoted.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)