Exclude data sets with output parameters from the implicit result cache - #2441
Merged
merks merged 1 commit intoJul 20, 2026
Merged
Conversation
The cache stores only rows; on a cache hit the dscache DataSourceQuery returns null output parameters, so stored-procedure data sets re-executed with the same parameter values silently lose their OUT values. Fixes eclipse-birt#2440
Contributor
|
We need you to complete the ECA to be able to merge your PR. https://github.com/eclipse-birt/birt/blob/master/CONTRIBUTING.md#eclipse-contributor-agreement |
Contributor
|
I verified that your new test runs: And @hvbtup has approved by virtue of his comment in the issue ; better would be to mark the review approval in the PR itself. So if we can get the ECA in place, I plan to merge this. Thanks!! |
Author
|
thank you, eca is in place! |
Contributor
|
The changes in in the latest nightly build now |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2440
What
A data set that declares output parameters is now excluded from the implicit dataset result cache. After
EngineExecutionHints.populateCachedDataSetshas finalized the cached-candidate set, any data set whose design contains anIParameterDefinitionwithisOutputMode()is removed from it - mirroring the existing exclusion pass for extension-only filters directly below.Why
The implicit result cache stores only rows. On a cache hit the engine substitutes
dscache.DataSourceQuery, whosegetOutputParameterValue(int/String)unconditionally returnsnull, so a stored-procedure data set (SPSelectDataSet) re-executed with the same parameter values within one render silently loses its OUT parameter values (rows stay correct). See #2440 for the full analysis and a minimal reproducing report design.Excluding such a data set from the row cache is behavior-preserving: re-execution returns identical rows, only the caching optimization is lost - and it is required for correctness whenever a consumer reads
outputParams["..."].This targets the implicit cache path only; user-configured caching (
getJVMDataSetCacheConfig) is not gated byneedCacheDataSetand is out of scope for this issue.Test
OutputParameterDataSetCacheTestregisters two ODA data sets (one with an output parameter, one input-only control), each referenced by two queries so both become implicit-cache candidates, and asserts viaIEngineExecutionHints.needCacheDataSetthat only the input-only data set stays cached. Verified red/green: the test fails on the unpatched engine (the output-parameter data set is cached) and passes with this change, with the control assertion unaffected.