FLUID-6706: Race condition overwrites top-level resources entry with fast synchronous resource

Metadata

Source
FLUID-6706
Type
Bug
Priority
Major
Status
Closed
Resolution
Fixed
Assignee
Antranig Basman
Reporter
Antranig Basman
Created
2021-12-16T12:01:23.344-0500
Updated
2024-07-17T08:07:50.326-0400
Versions
  1. 4.0
Fixed Versions
  1. 4.0
Component
  1. Framework

Description

Demanding the fetch of a fast synchronous resource (e.g. a renderer template) ends up overwriting the resources entry with a "FetchOne" entry rather than the actual resourceSpec. This is because the entire transform event initialising "resource" concludes before the framework finishes the process of assigning the placeholder "FetchOne" entry mounted by fluid.resourceFromRecord

Best route is probably to install a specific guard in fluid.resourceFromRecord which returns any existing value found for the resource. This stateful handling of resources is deeply regrettable but at this point unavoidable.

Comments