You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Vladislav Pyatkov (Jira)" <ji...@apache.org> on 2026/08/06 18:24:00 UTC
[jira] [Created] (IGNITE-28957) Calcite SELECT FOR UPDATE may cause OOM by materializing the entire result set
Vladislav Pyatkov created IGNITE-28957:
------------------------------------------
Summary: 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
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.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)