Skip to content

fix(perf): rebuild cached integration plans containing null function refs - #3460

Merged
bpamiri merged 1 commit into
developfrom
fix/integration-plan-null-refs-3457
Aug 31, 2026
Merged

fix(perf): rebuild cached integration plans containing null function refs#3460
bpamiri merged 1 commit into
developfrom
fix/integration-plan-null-refs-3457

Conversation

@bpamiri

@bpamiri bpamiri commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator

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. $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. The failure is flaky and cleared by a reload, which rebuilds the plan.

  • $buildComponentIntegrationPlan no longer caches null refs (skips + logs a one-time warning).
  • $componentIntegrationPlan validates 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.
  • New IntegrationPlanSpec (global area): fresh plans contain no null refs, poisoned entries are detected, and a poisoned cached plan is rebuilt.

Verification

  • Local Lucee 7: global 242 pass, model 991 pass, wheelstest 255 pass, 0 fail.
  • Local RustCFML full suite: 5549 pass, only the known baseline migrationSpec :: addIndex failure — no new failures vs tools/rustcfml/baseline.json.
  • Full local Lucee suite run in progress at time of opening.

…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>
@bpamiri
bpamiri merged commit 180e4c1 into develop Aug 31, 2026
12 checks passed
@bpamiri
bpamiri deleted the fix/integration-plan-null-refs-3457 branch August 31, 2026 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flaky bare NullPointerException in model instantiation on Lucee 7 (cleared by reload)

1 participant