[jira] [Commented] (OAK-5022) add includeSubtreeOnDelete flag to OakEventFilter

2016-11-01 Thread Stefan Egli (JIRA)

[ 
https://issues.apache.org/jira/browse/OAK-5022?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15625169#comment-15625169
 ] 

Stefan Egli commented on OAK-5022:
--

[test case for beforeValue 
added|http://svn.apache.org/viewvc?rev=1767476=rev]

> add includeSubtreeOnDelete flag to OakEventFilter
> -
>
> Key: OAK-5022
> URL: https://issues.apache.org/jira/browse/OAK-5022
> Project: Jackrabbit Oak
>  Issue Type: Improvement
>  Components: jcr
>Affects Versions: 1.5.12
>Reporter: Stefan Egli
>Assignee: Stefan Egli
> Fix For: 1.5.13
>
>
> (Originally reported as JCR-4037, but moved to Oak as a result of introducing 
> the OakEventFilter in OAK-5013. From the original description: )
> In some cases of observation it would be useful to receive events of child 
> node or properties of a parent/grandparent that was deleted. Currently (in 
> Oak at least) one only receives a deleted event for the node that was deleted 
> and none of the children.
> Suggesting to (re)introduce a flag, eg as follows to the 
> JackrabbitEventFilter:
> {code}
> boolean includeSubtreeOnRemove;
> {code}
> (Open for any better name of course)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (OAK-5022) add includeSubtreeOnDelete flag to OakEventFilter

2016-10-31 Thread Stefan Egli (JIRA)

[ 
https://issues.apache.org/jira/browse/OAK-5022?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15622353#comment-15622353
 ] 

Stefan Egli commented on OAK-5022:
--

Added main implementation 
[here|http://svn.apache.org/viewvc?rev=1767295=rev], this introduces:
{code}
public abstract OakEventFilter withIncludeSubtreeOnRemove();
{code}
to the OakEventFilter and does not do a {{deleteSubtree()}} as is otherwise the 
default (ie includes the deleted node of a subtree-removal)

> add includeSubtreeOnDelete flag to OakEventFilter
> -
>
> Key: OAK-5022
> URL: https://issues.apache.org/jira/browse/OAK-5022
> Project: Jackrabbit Oak
>  Issue Type: Improvement
>  Components: jcr
>Affects Versions: 1.5.12
>Reporter: Stefan Egli
>Assignee: Stefan Egli
>
> (Originally reported as JCR-4037, but moved to Oak as a result of introducing 
> the OakEventFilter in OAK-5013. From the original description: )
> In some cases of observation it would be useful to receive events of child 
> node or properties of a parent/grandparent that was deleted. Currently (in 
> Oak at least) one only receives a deleted event for the node that was deleted 
> and none of the children.
> Suggesting to (re)introduce a flag, eg as follows to the 
> JackrabbitEventFilter:
> {code}
> boolean includeSubtreeOnRemove;
> {code}
> (Open for any better name of course)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (OAK-5022) add includeSubtreeOnDelete flag to OakEventFilter

2016-10-31 Thread Stefan Egli (JIRA)

[ 
https://issues.apache.org/jira/browse/OAK-5022?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15621846#comment-15621846
 ] 

Stefan Egli commented on OAK-5022:
--

I think where this has an impact is if we include subtree-removal in 
prefiltering, as that's synchronous.

> add includeSubtreeOnDelete flag to OakEventFilter
> -
>
> Key: OAK-5022
> URL: https://issues.apache.org/jira/browse/OAK-5022
> Project: Jackrabbit Oak
>  Issue Type: Improvement
>  Components: jcr
>Affects Versions: 1.5.12
>Reporter: Stefan Egli
>Assignee: Stefan Egli
>
> (Originally reported as JCR-4037, but moved to Oak as a result of introducing 
> the OakEventFilter in OAK-5013. From the original description: )
> In some cases of observation it would be useful to receive events of child 
> node or properties of a parent/grandparent that was deleted. Currently (in 
> Oak at least) one only receives a deleted event for the node that was deleted 
> and none of the children.
> Suggesting to (re)introduce a flag, eg as follows to the 
> JackrabbitEventFilter:
> {code}
> boolean includeSubtreeOnRemove;
> {code}
> (Open for any better name of course)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (OAK-5022) add includeSubtreeOnDelete flag to OakEventFilter

2016-10-31 Thread JIRA

[ 
https://issues.apache.org/jira/browse/OAK-5022?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15621798#comment-15621798
 ] 

Michael Dürig commented on OAK-5022:


bq. Could this be handled lazily

In the current implementation this would be lazy by default. That is, the diff 
would only be calculated as much as is required and as long as you keep calling 
{{EventIterator.next()}}. 

> add includeSubtreeOnDelete flag to OakEventFilter
> -
>
> Key: OAK-5022
> URL: https://issues.apache.org/jira/browse/OAK-5022
> Project: Jackrabbit Oak
>  Issue Type: Improvement
>  Components: jcr
>Affects Versions: 1.5.12
>Reporter: Stefan Egli
>Assignee: Stefan Egli
>
> (Originally reported as JCR-4037, but moved to Oak as a result of introducing 
> the OakEventFilter in OAK-5013. From the original description: )
> In some cases of observation it would be useful to receive events of child 
> node or properties of a parent/grandparent that was deleted. Currently (in 
> Oak at least) one only receives a deleted event for the node that was deleted 
> and none of the children.
> Suggesting to (re)introduce a flag, eg as follows to the 
> JackrabbitEventFilter:
> {code}
> boolean includeSubtreeOnRemove;
> {code}
> (Open for any better name of course)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (OAK-5022) add includeSubtreeOnDelete flag to OakEventFilter

2016-10-31 Thread Stefan Egli (JIRA)

[ 
https://issues.apache.org/jira/browse/OAK-5022?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15621644#comment-15621644
 ] 

Stefan Egli commented on OAK-5022:
--

[~mmarth], re
bq. Re "includeSubtreeOnRemove": need to careful to not make this a very 
expensive operation for large subtrees. 
Agreed. Removal of a large subtree will probably be at the same cost as 
removing a large subtree. As either way the subtree needs to be traversed 
(either in prefiltering or if prefiltering doesn't result in an exclude with 
the actual finer-grade filter).
bq. Could this be handled lazily?
Not sure what exactly you're referring to, not handling this in prefiltering 
but only in the affected filter (which is by definition async)?

> add includeSubtreeOnDelete flag to OakEventFilter
> -
>
> Key: OAK-5022
> URL: https://issues.apache.org/jira/browse/OAK-5022
> Project: Jackrabbit Oak
>  Issue Type: Improvement
>  Components: jcr
>Affects Versions: 1.5.12
>Reporter: Stefan Egli
>Assignee: Stefan Egli
>
> (Originally reported as JCR-4037, but moved to Oak as a result of introducing 
> the OakEventFilter in OAK-5013. From the original description: )
> In some cases of observation it would be useful to receive events of child 
> node or properties of a parent/grandparent that was deleted. Currently (in 
> Oak at least) one only receives a deleted event for the node that was deleted 
> and none of the children.
> Suggesting to (re)introduce a flag, eg as follows to the 
> JackrabbitEventFilter:
> {code}
> boolean includeSubtreeOnRemove;
> {code}
> (Open for any better name of course)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (OAK-5022) add includeSubtreeOnDelete flag to OakEventFilter

2016-10-30 Thread Michael Marth (JIRA)

[ 
https://issues.apache.org/jira/browse/OAK-5022?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15620015#comment-15620015
 ] 

Michael Marth commented on OAK-5022:


2 comments:

* Hooray for being able (in the application) to access property values of 
deleted nodes. This is a long standing feature request - which should be rather 
doable in MVCC.
* Re "includeSubtreeOnRemove": need to careful to not make this a very 
expensive operation for large subtrees. Could this be handled lazily?

> add includeSubtreeOnDelete flag to OakEventFilter
> -
>
> Key: OAK-5022
> URL: https://issues.apache.org/jira/browse/OAK-5022
> Project: Jackrabbit Oak
>  Issue Type: Improvement
>  Components: jcr
>Affects Versions: 1.5.12
>Reporter: Stefan Egli
>Assignee: Stefan Egli
>
> (Originally reported as JCR-4037, but moved to Oak as a result of introducing 
> the OakEventFilter in OAK-5013. From the original description: )
> In some cases of observation it would be useful to receive events of child 
> node or properties of a parent/grandparent that was deleted. Currently (in 
> Oak at least) one only receives a deleted event for the node that was deleted 
> and none of the children.
> Suggesting to (re)introduce a flag, eg as follows to the 
> JackrabbitEventFilter:
> {code}
> boolean includeSubtreeOnRemove;
> {code}
> (Open for any better name of course)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)