[jira] [Commented] (SLING-6148) MapEntries get CHANGED event right after DELETE

2016-10-14 Thread Carsten Ziegeler (JIRA)

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

Carsten Ziegeler commented on SLING-6148:
-

Thanks, I just committed a fix for the JcrResourceListener which should 
correctly handle the observation events now.
Still the tests don't pass. I've also committed a couple of fixes for the 
MapEntries and start getting a feeling how all the stuff works

> MapEntries get CHANGED event right after DELETE
> ---
>
> Key: SLING-6148
> URL: https://issues.apache.org/jira/browse/SLING-6148
> Project: Sling
>  Issue Type: Bug
>  Components: ResourceResolver
>Reporter: Bertrand Delacretaz
>Assignee: Carsten Ziegeler
>Priority: Critical
> Fix For: JCR Resource 2.8.2, Resource Resolver 1.5.0
>
>
> Investigating SLING-6147 I see this in the logs when deleting a /content node:
> {code}
> 13.10.2016 16:20:23.895 *DEBUG* [oak-executor-17] 
> org.apache.sling.resourceresolver.impl.mapping.MapEntries onChange, 
> type=REMOVED, path=/content
> 13.10.2016 16:20:23.895 *DEBUG* [oak-executor-17] 
> org.apache.sling.resourceresolver.impl.mapping.MapEntries onChange, 
> type=CHANGED, path=/content
> 13.10.2016 16:20:23.895 *DEBUG* [oak-executor-17] 
> org.apache.sling.resourceresolver.impl.mapping.MapEntries doAddVanity getting 
> /content
> {code}
> And MapEntries.isValidVanityPath() then fails as it's getting a null resource.
> [~cziegeler] I suppose this is related to recent listener mechanism changes? 
> Getting a CHANGED event after the DELETE doesn't seem correct.



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


[jira] [Commented] (SLING-6148) MapEntries get CHANGED event right after DELETE

2016-10-14 Thread Bertrand Delacretaz (JIRA)

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

Bertrand Delacretaz commented on SLING-6148:


Ok, let me know if I can help improve JcrResourceListener testing or otherwise.

> MapEntries get CHANGED event right after DELETE
> ---
>
> Key: SLING-6148
> URL: https://issues.apache.org/jira/browse/SLING-6148
> Project: Sling
>  Issue Type: Bug
>  Components: ResourceResolver
>Reporter: Bertrand Delacretaz
>Assignee: Carsten Ziegeler
>Priority: Critical
> Fix For: JCR Resource 2.8.2, Resource Resolver 1.5.0
>
>
> Investigating SLING-6147 I see this in the logs when deleting a /content node:
> {code}
> 13.10.2016 16:20:23.895 *DEBUG* [oak-executor-17] 
> org.apache.sling.resourceresolver.impl.mapping.MapEntries onChange, 
> type=REMOVED, path=/content
> 13.10.2016 16:20:23.895 *DEBUG* [oak-executor-17] 
> org.apache.sling.resourceresolver.impl.mapping.MapEntries onChange, 
> type=CHANGED, path=/content
> 13.10.2016 16:20:23.895 *DEBUG* [oak-executor-17] 
> org.apache.sling.resourceresolver.impl.mapping.MapEntries doAddVanity getting 
> /content
> {code}
> And MapEntries.isValidVanityPath() then fails as it's getting a null resource.
> [~cziegeler] I suppose this is related to recent listener mechanism changes? 
> Getting a CHANGED event after the DELETE doesn't seem correct.



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


[jira] [Commented] (SLING-6148) MapEntries get CHANGED event right after DELETE

2016-10-14 Thread Carsten Ziegeler (JIRA)

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

Carsten Ziegeler commented on SLING-6148:
-

Thanks [~bdelacretaz]
The unused JcrResourceListener seems to have some bugs - so it looks like we 
just tested the oak observer in the past...

> MapEntries get CHANGED event right after DELETE
> ---
>
> Key: SLING-6148
> URL: https://issues.apache.org/jira/browse/SLING-6148
> Project: Sling
>  Issue Type: Bug
>  Components: ResourceResolver
>Reporter: Bertrand Delacretaz
>Assignee: Carsten Ziegeler
>Priority: Critical
> Fix For: JCR Resource 2.8.2, Resource Resolver 1.5.0
>
>
> Investigating SLING-6147 I see this in the logs when deleting a /content node:
> {code}
> 13.10.2016 16:20:23.895 *DEBUG* [oak-executor-17] 
> org.apache.sling.resourceresolver.impl.mapping.MapEntries onChange, 
> type=REMOVED, path=/content
> 13.10.2016 16:20:23.895 *DEBUG* [oak-executor-17] 
> org.apache.sling.resourceresolver.impl.mapping.MapEntries onChange, 
> type=CHANGED, path=/content
> 13.10.2016 16:20:23.895 *DEBUG* [oak-executor-17] 
> org.apache.sling.resourceresolver.impl.mapping.MapEntries doAddVanity getting 
> /content
> {code}
> And MapEntries.isValidVanityPath() then fails as it's getting a null resource.
> [~cziegeler] I suppose this is related to recent listener mechanism changes? 
> Getting a CHANGED event after the DELETE doesn't seem correct.



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


[jira] [Commented] (SLING-6148) MapEntries get CHANGED event right after DELETE

2016-10-14 Thread Bertrand Delacretaz (JIRA)

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

Bertrand Delacretaz commented on SLING-6148:


You can probably reproduce with launchpad/builder as well but in my case I'm 
doing this:

{code}
cd launchpad/testing
mvn clean install -Dlaunchpad.keep.running=true -Dhttp.port=8080 -Ddebug=true
{code}

Configure debug logging for {{org.apache.sling.resourceresolver}} and then

{code}
tail -F target/_-8080/sling/logs/error.log | egrep 
'MapEntries|ResourceResolverTest|java.lang.IllegalArgumentException| at '
{code}

{code}
curl -u admin:admin -X POST http://localhost:8080/content
curl -u admin:admin -X DELETE http://localhost:8080/content
{code}

And that DELETE produces the following logs:
{code}
14.10.2016 08:00:44.665 *DEBUG* [oak-executor-33] 
org.apache.sling.resourceresolver.impl.mapping.MapEntries onChange, 
type=REMOVED, path=/content
14.10.2016 08:00:44.665 *DEBUG* [oak-executor-33] 
org.apache.sling.resourceresolver.impl.mapping.MapEntries onChange, 
type=CHANGED, path=/content
14.10.2016 08:00:44.665 *DEBUG* [oak-executor-33] 
org.apache.sling.resourceresolver.impl.mapping.MapEntries doAddVanity getting 
/content
java.lang.IllegalArgumentException: Unexpected null resource
at 
org.apache.sling.resourceresolver.impl.mapping.MapEntries.isValidVanityPath(MapEntries.java:962)
at 
org.apache.sling.resourceresolver.impl.mapping.MapEntries.loadVanityPath(MapEntries.java:1245)
at 
org.apache.sling.resourceresolver.impl.mapping.MapEntries.doAddVanity(MapEntries.java:467)
at 
org.apache.sling.resourceresolver.impl.mapping.MapEntries.doUpdateVanity(MapEntries.java:481)
at 
org.apache.sling.resourceresolver.impl.mapping.MapEntries.onChange(MapEntries.java:846)
{code}

The "doAddVanity getting /content" log message was added yesterday, svn 
revision 1764697, which is what I'm using for testing this.

I suspect this is causing SLING-6147, I'll add info there about how to 
reproduce that one.

> MapEntries get CHANGED event right after DELETE
> ---
>
> Key: SLING-6148
> URL: https://issues.apache.org/jira/browse/SLING-6148
> Project: Sling
>  Issue Type: Bug
>  Components: ResourceResolver
>Reporter: Bertrand Delacretaz
>Assignee: Carsten Ziegeler
>Priority: Critical
> Fix For: JCR Resource 2.8.2, Resource Resolver 1.5.0
>
>
> Investigating SLING-6147 I see this in the logs when deleting a /content node:
> {code}
> 13.10.2016 16:20:23.895 *DEBUG* [oak-executor-17] 
> org.apache.sling.resourceresolver.impl.mapping.MapEntries onChange, 
> type=REMOVED, path=/content
> 13.10.2016 16:20:23.895 *DEBUG* [oak-executor-17] 
> org.apache.sling.resourceresolver.impl.mapping.MapEntries onChange, 
> type=CHANGED, path=/content
> 13.10.2016 16:20:23.895 *DEBUG* [oak-executor-17] 
> org.apache.sling.resourceresolver.impl.mapping.MapEntries doAddVanity getting 
> /content
> {code}
> And MapEntries.isValidVanityPath() then fails as it's getting a null resource.
> [~cziegeler] I suppose this is related to recent listener mechanism changes? 
> Getting a CHANGED event after the DELETE doesn't seem correct.



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


[jira] [Commented] (SLING-6148) MapEntries get CHANGED event right after DELETE

2016-10-13 Thread Carsten Ziegeler (JIRA)

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

Carsten Ziegeler commented on SLING-6148:
-

[~bdelacretaz] We recently removed the special Oak observation bridge and now 
are using a plain JCR listener. It looks like there is something wrong in that 
listener
What is the easiest way to debug/test this?

> MapEntries get CHANGED event right after DELETE
> ---
>
> Key: SLING-6148
> URL: https://issues.apache.org/jira/browse/SLING-6148
> Project: Sling
>  Issue Type: Bug
>  Components: ResourceResolver
>Reporter: Bertrand Delacretaz
>Priority: Minor
> Fix For: JCR Resource 2.8.2, Resource Resolver 1.5.0
>
>
> Investigating SLING-6147 I see this in the logs when deleting a /content node:
> {code}
> 13.10.2016 16:20:23.895 *DEBUG* [oak-executor-17] 
> org.apache.sling.resourceresolver.impl.mapping.MapEntries onChange, 
> type=REMOVED, path=/content
> 13.10.2016 16:20:23.895 *DEBUG* [oak-executor-17] 
> org.apache.sling.resourceresolver.impl.mapping.MapEntries onChange, 
> type=CHANGED, path=/content
> 13.10.2016 16:20:23.895 *DEBUG* [oak-executor-17] 
> org.apache.sling.resourceresolver.impl.mapping.MapEntries doAddVanity getting 
> /content
> {code}
> And MapEntries.isValidVanityPath() then fails as it's getting a null resource.
> [~cziegeler] I suppose this is related to recent listener mechanism changes? 
> Getting a CHANGED event after the DELETE doesn't seem correct.



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