[
https://issues.apache.org/jira/browse/OPENJPA-2989?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18119686#comment-18119686
]
ASF subversion and git services commented on OPENJPA-2989:
----------------------------------------------------------
Commit 237123ad87396015a97641ff6a0987ef26ffa534 in openjpa's branch
refs/heads/OPENJPA-2989 from Richard Zowalla
[ https://gitbox.apache.org/repos/asf?p=openjpa.git;h=237123ad8 ]
[OPENJPA-2989] Add a compatibility option to restore lazy query result lists
Query.getResultList() copies the kernel ResultList into an ArrayList since
the Jakarta Persistence 3.2 work, so the complete result is materialized and
openjpa.FetchBatchSize no longer streams rows to the caller. Keep that as the
default and add the MaterializeQueryResultList compatibility option, which
restores the lazy ResultList for applications that rely on streaming, and
document the memory implication in the migration considerations.
> Results always materialized, lazy ResultList behavior lost
> ----------------------------------------------------------
>
> Key: OPENJPA-2989
> URL: https://issues.apache.org/jira/browse/OPENJPA-2989
> Project: OpenJPA
> Issue Type: Sub-task
> Components: jpa
> Affects Versions: 4.2.0
> Reporter: Maxim Solodovnik
> Priority: Major
> Fix For: 4.2.0
>
>
> Discussion thread:
> https://github.com/apache/openjpa/pull/144#discussion_r3683006506
> **(high)** Several assertions here (and in TestQueryTimeout) were inverted
> from "iterator must be invalid after query/EM close" to "iterator still works
> because results are now an ArrayList snapshot". Which JPA 3.2 clause requires
> this? More importantly, does this mean the lazy ResultList
> (openjpa.FetchBatchSize streaming results) is gone and results are always
> fully materialized? That would be a significant memory/perf behavior change
> deserving explicit discussion and release-noting, not just adjusted tests.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)