[ 
https://issues.apache.org/jira/browse/IGNITE-28957?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18105497#comment-18105497
 ] 

Vladislav Pyatkov commented on IGNITE-28957:
--------------------------------------------

Merged 822971b5e0687766ffac8d998287b6811e926acb

> 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
>             Fix For: 2.19
>
>          Time Spent: 20m
>  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)

Reply via email to