fix(perf): rebuild cached integration plans containing null function refs - #3460
Merged
Conversation
…refs On Lucee 7 the cached component-integration plan (#3236) can come back with a function reference resolved to Java null — e.g. when the plan was first built while the engine was still compiling the mixin component. $integrateFunctions then copies the null into every materialized model/controller/mapper instance, and Lucee throws a bare NullPointerException (no stack) when it later enumerates the component (#3457). The failure is flaky and cleared by a reload, which rebuilds the plan. - $buildComponentIntegrationPlan no longer caches null refs (skips + warns). - $componentIntegrationPlan validates the cached plan once per request and rebuilds it in place when poisoned. - Adds IntegrationPlanSpec: fresh plans contain no null refs, poisoned entries are detected, and a poisoned cached plan is rebuilt. Signed-off-by: Peter Amiri <peter@alurium.com>
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.
Closes #3457.
On Lucee 7 the cached component-integration plan (#3236) can come back with a function reference resolved to Java null — e.g. when the plan was first built while the engine was still compiling the mixin component.
$integrateFunctionsthen copies the null into every materialized model/controller/mapper instance, and Lucee throws a bareNullPointerException(no stack) when it later enumerates the component. The failure is flaky and cleared by a reload, which rebuilds the plan.$buildComponentIntegrationPlanno longer caches null refs (skips + logs a one-time warning).$componentIntegrationPlanvalidates the cached plan once per request (request-scope struct flag — dotted request-scope keys don't round-trip on RustCFML) and rebuilds it in place when poisoned.IntegrationPlanSpec(global area): fresh plans contain no null refs, poisoned entries are detected, and a poisoned cached plan is rebuilt.Verification
migrationSpec :: addIndexfailure — no new failures vstools/rustcfml/baseline.json.