[ 
https://issues.apache.org/jira/browse/SLING-3380?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13901179#comment-13901179
 ] 

Felix Meschberger commented on SLING-3380:
------------------------------------------

This first solution actually breaks the event listener mappings: If a node is 
created change events in addition to added events are generated. When 
processing the added events (empty events for added nodes), though, all changed 
events (containing the properties set) for the same nodes are removed.

Thus the set of properties added when creating the nodes are essentially lost 
which in turn leads to EventAdmin listeners not receiving events. In our case 
this ultimately causes the VanityPath integration tests to be stuck waiting 
forever because the ResourceResolver mapper does not get the change events and 
thus the ResourceResolverMapping/CHANGED events are not fired.

While I agree that the changed events should not be sent if an added event is 
sent for the same node, the properties pertaining to the respective changed 
events must, though, be folded into the added event.

> Reduce memory footprint of JcrResourceListener
> ----------------------------------------------
>
>                 Key: SLING-3380
>                 URL: https://issues.apache.org/jira/browse/SLING-3380
>             Project: Sling
>          Issue Type: Improvement
>          Components: JCR
>    Affects Versions: JCR Resource 2.2.8
>            Reporter: Michael Dürig
>            Assignee: Carsten Ziegeler
>             Fix For: JCR Resource 2.3.2
>
>
> JcrResourceListener.onEvent(EventIterator) keeps references to all Event 
> instances in the passed iterator. This has turned out as a memory bottleneck 
> e.g. in the scenario where a large sub-tree is copied and NODE_ADDED events 
> for all nodes in that sub-tree are generated. 
> Furthermore Oak will be able to handle arbitrarily large transactions 
> (Session.save). In such cases the EventIterator might contains millions of 
> events.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to