FLUID-5818: Ginger algorithm does not construct children of parent components if reference source has constructed

Metadata

Source
FLUID-5818
Type
Bug
Priority
Major
Status
Closed
Resolution
Fixed
Assignee
Antranig Basman
Reporter
Antranig Basman
Created
2015-11-12T15:48:41.539-0500
Updated
2016-01-15T11:58:44.724-0500
Versions
N/A
Fixed Versions
N/A
Component
  1. IoC System

Description

Our optimisations in support of faster invokers and listeners (FLUID-5796, FLUID-5249) have been too aggressive. We adopted a simple check at the site of a reference, whether the site itself had constructed, in order to determine whether to use the "fast route" or "slow route" for context resolution. This fails in the case where a child component has the state "constructed" but its parent does not, and the parent has further children whose contexts are only accessible via the "ginger member rule" that is our sole concession to component-level gingerness prior to FLUID-4925.

from fluid.expander.fetch:

// somewhat hack to anticipate "fits" for FLUID-4925 - we assume that if THIS component is in construction, its reference target might be too
        var component = inLocal ? localRecord[context] : fluid.resolveContext(context, options.contextThat, options.contextThat.lifecycleStatus === "constructed");
        if (component) {

In order to avoid degrading performance here, we will have to introduce a new lifecycleStatus which will be propagated by flooding to children once a parent is constructed.

Comments