ENGAGE-245: Can not register multiple producers with the same source (as well as target).

Metadata

Source
ENGAGE-245
Type
Bug
Priority
Blocker
Status
Closed
Resolution
Fixed
Assignee
Justin Obara
Reporter
y z
Created
2010-01-15T17:08:05.000-0500
Updated
2014-03-03T14:15:41.933-0500
Versions
  1. 0.3b
Fixed Versions
  1. 0.3b
Component
N/A

Description

Example:
one service is registered like that:

var handler = fluid.engage.mountRenderHandler({
config: config,
app: app,
target: "exhibitions/",
source: "components/exhibition/html/",
sourceMountRelative: "engage"
});

handler.registerProducer("view", function (context, env) {
return {};
});
and the other one is:

var handler = fluid.engage.mountRenderHandler({
config: config,
app: app,
target: "exhibitions/",
source: "components/exhibition/html/",
sourceMountRelative: "engage"
});

handler.registerProducer("about", function (context, env) {
return {};
});

Comments

  • Antranig Basman commented 2010-01-20T17:31:48.000-0500

    Fixed at revision 9076. This is a (moderately) subtle issue relating to the semantics of renderHandlers and acceptors. In this case, two renderHandlers were attached at the same node in the acceptor tree, and ALSO both pointing at the same physical template directory. The first handler, noticing that it could find a template name matching the one required for the incoming segment, reported that it was the correct acceptor even though it did not have a matching producer - the producer was actually attached to the 2nd acceptor.

    This fix only marks a rHA to report acceptance if it can discover both a template AND and producer matching the incoming segment - however, a more efficient approach would have rHAs "agglomerate" since at the moment fetch error records will accumulate quadratically in the rHA caches with respect to the number of distinct acceptors held at a node.