[
https://issues.apache.org/jira/browse/IGNITE-28957?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18105673#comment-18105673
]
Ignite TC Bot commented on IGNITE-28957:
----------------------------------------
Docs-required triage: removed the Docs Required flag because PR #13482 only
fixes SELECT FOR UPDATE memory accounting so the existing Calcite query memory
quota is enforced during result materialization. The behavior is already
covered by the Memory Quotas section in docs/_docs/SQL/sql-calcite.adoc, which
documents result materialization and the Query quota exceeded failure. Release
Notes Required was preserved for separate release-note triage.
> 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)