Re: Compatibility of Sling with Oak 1.2

2015-09-16 Thread Konrad Windszus
Unfortunately not as I need the fix for 
https://issues.apache.org/jira/browse/SLING-4974 
 (JCR Resource 2.5.6).
But the compatibility to Oak 1.2 was removed with 
https://issues.apache.org/jira/browse/SLING-4820 
 (JCR Resource 2.5.2)

Konrad

> On 16 Sep 2015, at 11:41, Bertrand Delacretaz  wrote:
> 
> Hi,
> 
> On Tue, Sep 15, 2015 at 11:35 AM, Konrad Windszus  wrote:
>> ...In the case of https://issues.apache.org/jira/browse/SLING-4820
>> there is no simple solution to support both Oak 1.2 and 1.3
> 
> I'm not sure what to suggest...would using older released versions of
> the affected Sling modules work for you?
> 
> -Bertrand



[jira] [Updated] (SLING-4617) Cluster voting picking up non exiting path and complains about missing sling id

2015-09-16 Thread Stefan Egli (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-4617?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Stefan Egli updated SLING-4617:
---
Fix Version/s: (was: Discovery Impl 1.1.8)

> Cluster voting picking up non exiting path and complains about missing sling 
> id
> ---
>
> Key: SLING-4617
> URL: https://issues.apache.org/jira/browse/SLING-4617
> Project: Sling
>  Issue Type: Bug
>  Components: Extensions
>Affects Versions: Discovery Impl 1.0.8
>Reporter: Rajeev Nair
>Assignee: Stefan Egli
>
> The behaviour is observed in a setup which is not part of cluster with other 
> instances. The voting looks for nodes under  
> "/var/discovery/impl/ongoingVotings/" which does not exist at all and 
> complains about missing member. Also noticed that the node it looks for under 
> "/var/discovery/impl/ongoingVotings/" changes randomly and does not match 
> with what I noticed as 
> "/var/discovery/impl/ongoingVotings/b22b7211-24eb-4980-8948-de657c06c5c4".
> I was not expecting to witness any node under 
> "/var/discovery/impl/ongoingVotings" here. But not sure why there is one.
> Log entry:
> 13.04.2015 06:30:03.446 *ERROR* [pool-5-thread-4] 
> org.apache.sling.discovery.impl.cluster.voting.VotingView vote: no 
> memberResource found for slingId=d53d275c-67c9-4d45-ad7f-5a4a3017adeb, 
> resource=JcrNodeResource, type=sling:Folder, superType=null, 
> path=/var/discovery/impl/ongoingVotings/314f4acb-709d-47fd-af95-6316ad786d0d
> 13.04.2015 06:30:03.446 *ERROR* [pool-5-thread-4] 
> org.apache.sling.discovery.impl.cluster.voting.VotingView vote: no 
> memberResource found for slingId=d53d275c-67c9-4d45-ad7f-5a4a3017adeb, 
> resource=JcrNodeResource, type=sling:Folder, superType=null, 
> path=/var/discovery/impl/ongoingVotings/314f4acb-709d-47fd-af95-6316ad786d0d
> 13.04.2015 06:30:03.447 *ERROR* [pool-5-thread-4] 
> org.apache.sling.discovery.impl.cluster.voting.VotingView vote: no 
> memberResource found for slingId=d53d275c-67c9-4d45-ad7f-5a4a3017adeb, 
> resource=JcrNodeResource, type=sling:Folder, superType=null, 
> path=/var/discovery/impl/ongoingVotings/314f4acb-709d-47fd-af95-6316ad786d0d
> 13.04.2015 06:30:03.447 *ERROR* [pool-5-thread-4] 
> org.apache.sling.discovery.impl.cluster.voting.VotingView vote: no 
> memberResource found for slingId=d53d275c-67c9-4d45-ad7f-5a4a3017adeb, 
> resource=JcrNodeResource, type=sling:Folder, superType=null, 
> path=/var/discovery/impl/ongoingVotings/314f4acb-709d-47fd-af95-6316ad786d0d
> 13.04.2015 06:39:26.272 *ERROR* [pool-5-thread-1] 
> org.apache.sling.discovery.impl.cluster.voting.VotingView vote: no 
> memberResource found for slingId=d53d275c-67c9-4d45-ad7f-5a4a3017adeb, 
> resource=JcrNodeResource, type=sling:Folder, superType=null, 
> path=/var/discovery/impl/ongoingVotings/ba264b32-38e0-4a47-8b8b-d3070f91b650
> 13.04.2015 06:39:26.272 *ERROR* [pool-5-thread-1] 
> org.apache.sling.discovery.impl.cluster.voting.VotingView vote: no 
> memberResource found for slingId=d53d275c-67c9-4d45-ad7f-5a4a3017adeb, 
> resource=JcrNodeResource, type=sling:Folder, superType=null, 
> path=/var/discovery/impl/ongoingVotings/ba264b32-38e0-4a47-8b8b-d3070f91b650
> 13.04.2015 06:39:26.273 *ERROR* [pool-5-thread-1] 
> org.apache.sling.discovery.impl.cluster.voting.VotingView vote: no 
> memberResource found for slingId=d53d275c-67c9-4d45-ad7f-5a4a3017adeb, 
> resource=JcrNodeResource, type=sling:Folder, superType=null, 
> path=/var/discovery/impl/ongoingVotings/ba264b32-38e0-4a47-8b8b-d3070f91b650
> 13.04.2015 06:39:26.273 *ERROR* [pool-5-thread-1] 
> org.apache.sling.discovery.impl.cluster.voting.VotingView vote: no 
> memberResource found for slingId=d53d275c-67c9-4d45-ad7f-5a4a3017adeb, 
> resource=JcrNodeResource, type=sling:Folder, superType=null, 
> path=/var/discovery/impl/ongoingVotings/ba264b32-38e0-4a47-8b8b-d3070f91b650
> 13.04.2015 06:57:52.010 *ERROR* [pool-5-thread-4] 
> org.apache.sling.discovery.impl.cluster.voting.VotingView vote: no 
> memberResource found for slingId=d53d275c-67c9-4d45-ad7f-5a4a3017adeb, 
> resource=JcrNodeResource, type=sling:Folder, superType=null, 
> path=/var/discovery/impl/ongoingVotings/8c5b9530-af6b-45ae-a79e-fab65a36975b
> 13.04.2015 06:57:52.010 *ERROR* [pool-5-thread-4] 
> org.apache.sling.discovery.impl.cluster.voting.VotingView vote: no 
> memberResource found for slingId=d53d275c-67c9-4d45-ad7f-5a4a3017adeb, 
> resource=JcrNodeResource, type=sling:Folder, superType=null, 
> path=/var/discovery/impl/ongoingVotings/8c5b9530-af6b-45ae-a79e-fab65a36975b
> 13.04.2015 06:57:52.011 *ERROR* [pool-5-thread-4] 
> org.apache.sling.discovery.impl.cluster.voting.VotingView vote: no 
> memberResource found for slingId=d53d275c-67c9-4d45-ad7f-5a4a3017adeb, 
> resource=JcrNodeResource, type=sling:Folder, superType=null, 
> 

[jira] [Resolved] (SLING-4829) ClusterTest.testConnectorSwitching4139 failures

2015-09-16 Thread Stefan Egli (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-4829?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Stefan Egli resolved SLING-4829.

Resolution: Fixed

not having seen this recently anymore

> ClusterTest.testConnectorSwitching4139 failures
> ---
>
> Key: SLING-4829
> URL: https://issues.apache.org/jira/browse/SLING-4829
> Project: Sling
>  Issue Type: Bug
>  Components: Extensions
>Affects Versions: Discovery Impl 1.1.6
>Reporter: Stefan Egli
>Assignee: Stefan Egli
> Fix For: Discovery Impl 1.1.8
>
> Attachments: failure1.txt, failure2.txt
>
>
> https://builds.apache.org/job/sling-trunk-1.7/org.apache.sling$org.apache.sling.discovery.impl/1928/testReport/junit/org.apache.sling.discovery.impl.cluster/ClusterTest/testConnectorSwitching4139/
>  fails at times



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


Re: Compatibility of Sling with Oak 1.2

2015-09-16 Thread Bertrand Delacretaz
Hi,

On Tue, Sep 15, 2015 at 11:35 AM, Konrad Windszus  wrote:
> ...In the case of https://issues.apache.org/jira/browse/SLING-4820
> there is no simple solution to support both Oak 1.2 and 1.3

I'm not sure what to suggest...would using older released versions of
the affected Sling modules work for you?

-Bertrand


[jira] [Updated] (SLING-4617) Cluster voting picking up non exiting path and complains about missing sling id

2015-09-16 Thread Stefan Egli (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-4617?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Stefan Egli updated SLING-4617:
---
Fix Version/s: Discovery Impl 1.1.10

> Cluster voting picking up non exiting path and complains about missing sling 
> id
> ---
>
> Key: SLING-4617
> URL: https://issues.apache.org/jira/browse/SLING-4617
> Project: Sling
>  Issue Type: Bug
>  Components: Extensions
>Affects Versions: Discovery Impl 1.0.8
>Reporter: Rajeev Nair
>Assignee: Stefan Egli
> Fix For: Discovery Impl 1.1.10
>
>
> The behaviour is observed in a setup which is not part of cluster with other 
> instances. The voting looks for nodes under  
> "/var/discovery/impl/ongoingVotings/" which does not exist at all and 
> complains about missing member. Also noticed that the node it looks for under 
> "/var/discovery/impl/ongoingVotings/" changes randomly and does not match 
> with what I noticed as 
> "/var/discovery/impl/ongoingVotings/b22b7211-24eb-4980-8948-de657c06c5c4".
> I was not expecting to witness any node under 
> "/var/discovery/impl/ongoingVotings" here. But not sure why there is one.
> Log entry:
> 13.04.2015 06:30:03.446 *ERROR* [pool-5-thread-4] 
> org.apache.sling.discovery.impl.cluster.voting.VotingView vote: no 
> memberResource found for slingId=d53d275c-67c9-4d45-ad7f-5a4a3017adeb, 
> resource=JcrNodeResource, type=sling:Folder, superType=null, 
> path=/var/discovery/impl/ongoingVotings/314f4acb-709d-47fd-af95-6316ad786d0d
> 13.04.2015 06:30:03.446 *ERROR* [pool-5-thread-4] 
> org.apache.sling.discovery.impl.cluster.voting.VotingView vote: no 
> memberResource found for slingId=d53d275c-67c9-4d45-ad7f-5a4a3017adeb, 
> resource=JcrNodeResource, type=sling:Folder, superType=null, 
> path=/var/discovery/impl/ongoingVotings/314f4acb-709d-47fd-af95-6316ad786d0d
> 13.04.2015 06:30:03.447 *ERROR* [pool-5-thread-4] 
> org.apache.sling.discovery.impl.cluster.voting.VotingView vote: no 
> memberResource found for slingId=d53d275c-67c9-4d45-ad7f-5a4a3017adeb, 
> resource=JcrNodeResource, type=sling:Folder, superType=null, 
> path=/var/discovery/impl/ongoingVotings/314f4acb-709d-47fd-af95-6316ad786d0d
> 13.04.2015 06:30:03.447 *ERROR* [pool-5-thread-4] 
> org.apache.sling.discovery.impl.cluster.voting.VotingView vote: no 
> memberResource found for slingId=d53d275c-67c9-4d45-ad7f-5a4a3017adeb, 
> resource=JcrNodeResource, type=sling:Folder, superType=null, 
> path=/var/discovery/impl/ongoingVotings/314f4acb-709d-47fd-af95-6316ad786d0d
> 13.04.2015 06:39:26.272 *ERROR* [pool-5-thread-1] 
> org.apache.sling.discovery.impl.cluster.voting.VotingView vote: no 
> memberResource found for slingId=d53d275c-67c9-4d45-ad7f-5a4a3017adeb, 
> resource=JcrNodeResource, type=sling:Folder, superType=null, 
> path=/var/discovery/impl/ongoingVotings/ba264b32-38e0-4a47-8b8b-d3070f91b650
> 13.04.2015 06:39:26.272 *ERROR* [pool-5-thread-1] 
> org.apache.sling.discovery.impl.cluster.voting.VotingView vote: no 
> memberResource found for slingId=d53d275c-67c9-4d45-ad7f-5a4a3017adeb, 
> resource=JcrNodeResource, type=sling:Folder, superType=null, 
> path=/var/discovery/impl/ongoingVotings/ba264b32-38e0-4a47-8b8b-d3070f91b650
> 13.04.2015 06:39:26.273 *ERROR* [pool-5-thread-1] 
> org.apache.sling.discovery.impl.cluster.voting.VotingView vote: no 
> memberResource found for slingId=d53d275c-67c9-4d45-ad7f-5a4a3017adeb, 
> resource=JcrNodeResource, type=sling:Folder, superType=null, 
> path=/var/discovery/impl/ongoingVotings/ba264b32-38e0-4a47-8b8b-d3070f91b650
> 13.04.2015 06:39:26.273 *ERROR* [pool-5-thread-1] 
> org.apache.sling.discovery.impl.cluster.voting.VotingView vote: no 
> memberResource found for slingId=d53d275c-67c9-4d45-ad7f-5a4a3017adeb, 
> resource=JcrNodeResource, type=sling:Folder, superType=null, 
> path=/var/discovery/impl/ongoingVotings/ba264b32-38e0-4a47-8b8b-d3070f91b650
> 13.04.2015 06:57:52.010 *ERROR* [pool-5-thread-4] 
> org.apache.sling.discovery.impl.cluster.voting.VotingView vote: no 
> memberResource found for slingId=d53d275c-67c9-4d45-ad7f-5a4a3017adeb, 
> resource=JcrNodeResource, type=sling:Folder, superType=null, 
> path=/var/discovery/impl/ongoingVotings/8c5b9530-af6b-45ae-a79e-fab65a36975b
> 13.04.2015 06:57:52.010 *ERROR* [pool-5-thread-4] 
> org.apache.sling.discovery.impl.cluster.voting.VotingView vote: no 
> memberResource found for slingId=d53d275c-67c9-4d45-ad7f-5a4a3017adeb, 
> resource=JcrNodeResource, type=sling:Folder, superType=null, 
> path=/var/discovery/impl/ongoingVotings/8c5b9530-af6b-45ae-a79e-fab65a36975b
> 13.04.2015 06:57:52.011 *ERROR* [pool-5-thread-4] 
> org.apache.sling.discovery.impl.cluster.voting.VotingView vote: no 
> memberResource found for slingId=d53d275c-67c9-4d45-ad7f-5a4a3017adeb, 
> resource=JcrNodeResource, 

Re: Compatibility of Sling with Oak 1.2

2015-09-16 Thread Bertrand Delacretaz
On Wed, Sep 16, 2015 at 11:44 AM, Konrad Windszus  wrote:
>> On 16 Sep 2015, at 11:41, Bertrand Delacretaz  wrote:
>> ...I'm not sure what to suggest...would using older released versions of
>> the affected Sling modules work for you?..

> Unfortunately not as I need the fix for 
> https://issues.apache.org/jira/browse/SLING-4974 
>  (JCR Resource 2.5.6).
> But the compatibility to Oak 1.2 was removed with 
> https://issues.apache.org/jira/browse/SLING-4820 
>  (JCR Resource 2.5.2)...

So I guess the only way is to backport the changes that you need to an
older version of that bundle, and keep it compatible with Oak 1.2 ?

-Bertrand


[jira] [Updated] (SLING-4135) Make discovery implementation independent from JCR

2015-09-16 Thread Stefan Egli (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-4135?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Stefan Egli updated SLING-4135:
---
Fix Version/s: (was: Discovery Impl 1.1.8)
   Discovery Impl 1.1.10

> Make discovery implementation independent from JCR
> --
>
> Key: SLING-4135
> URL: https://issues.apache.org/jira/browse/SLING-4135
> Project: Sling
>  Issue Type: Improvement
>  Components: Extensions
>Reporter: Carsten Ziegeler
> Fix For: Discovery Impl 1.1.10
>
>
> There are only a few calls to the JCR api - in order to make it completely 
> use just the Sling API these places should be changed to the Sling API as 
> well.



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


[jira] [Assigned] (SLING-4831) Clarify topology connectors are cross-cluster, not intra-cluster

2015-09-16 Thread Stefan Egli (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-4831?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Stefan Egli reassigned SLING-4831:
--

Assignee: Stefan Egli

> Clarify topology connectors are cross-cluster, not intra-cluster
> 
>
> Key: SLING-4831
> URL: https://issues.apache.org/jira/browse/SLING-4831
> Project: Sling
>  Issue Type: Task
>  Components: Extensions
>Reporter: Stefan Egli
>Assignee: Stefan Egli
>
> It was voiced that 
> https://sling.apache.org/documentation/bundles/discovery-api-and-impl.html 
> does not point out clearly enough that connectors are cross-cluster and not 
> intra-cluster. Make this point thus clearer.



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


[jira] [Updated] (SLING-4380) Use sling mocks for the discovery impl tests

2015-09-16 Thread Stefan Egli (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-4380?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Stefan Egli updated SLING-4380:
---
Fix Version/s: (was: Discovery Impl 1.1.8)
   Discovery Impl 1.1.10

> Use sling mocks for the discovery impl tests
> 
>
> Key: SLING-4380
> URL: https://issues.apache.org/jira/browse/SLING-4380
> Project: Sling
>  Issue Type: Improvement
>  Components: Extensions, Testing
>Affects Versions: Discovery Impl 1.0.12
>Reporter: Robert Munteanu
> Fix For: Discovery Impl 1.1.10
>
>
> The org.apache.sling.discovery.impl has its own utility mocks in 
> https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/discovery/impl/src/test/java/org/apache/sling/discovery/impl/setup/
>  . Most of these can be replaced by the new Sling mocks.
> The benefits would be:
> - less maintenance for the discovery impl project
> - more exposure/coverage for the Sling mocks



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


[jira] [Updated] (SLING-4831) Clarify topology connectors are cross-cluster, not intra-cluster

2015-09-16 Thread Stefan Egli (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-4831?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Stefan Egli updated SLING-4831:
---
Fix Version/s: (was: Discovery Impl 1.1.8)

> Clarify topology connectors are cross-cluster, not intra-cluster
> 
>
> Key: SLING-4831
> URL: https://issues.apache.org/jira/browse/SLING-4831
> Project: Sling
>  Issue Type: Task
>  Components: Extensions
>Reporter: Stefan Egli
>Assignee: Stefan Egli
>
> It was voiced that 
> https://sling.apache.org/documentation/bundles/discovery-api-and-impl.html 
> does not point out clearly enough that connectors are cross-cluster and not 
> intra-cluster. Make this point thus clearer.



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


[jira] [Created] (SLING-5028) [Sling Mocks] Running a query with condition doesn't return any results

2015-09-16 Thread Daniel Platon (JIRA)
Daniel Platon created SLING-5028:


 Summary: [Sling Mocks] Running a query with condition doesn't 
return any results
 Key: SLING-5028
 URL: https://issues.apache.org/jira/browse/SLING-5028
 Project: Sling
  Issue Type: Bug
  Components: Testing
Affects Versions: Testing Sling Mock 1.5.0
Reporter: Daniel Platon


Running a query that uses a WHERE condition returns no results when using 
JCR_JACKRABBIT provider. 

The query 
{{SELECT * FROM [nt:unstructured] as N}} return the correct number of results. 
However, running {{SELECT * FROM [nt:unstructured] as N WHERE 
ISDESCENDANTNODE(N,"/content')}} returns no results.

I've set up a small project to illustrate this at 
https://github.com/dplaton/sling-testing



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


[jira] [Updated] (SLING-5028) [Sling Mocks] Running a query with condition doesn't return any results

2015-09-16 Thread Daniel Platon (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-5028?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Daniel Platon updated SLING-5028:
-
Description: 
Running a query that uses a WHERE condition returns no results when using 
JCR_JACKRABBIT provider. 

The query 
{{SELECT * FROM [nt:unstructured] as N}} returns the correct number of results. 
However, running {{SELECT * FROM [nt:unstructured] as N WHERE 
ISDESCENDANTNODE(N,"/content')}} returns no results.

I've set up a small project to illustrate this at 
https://github.com/dplaton/sling-testing

  was:
Running a query that uses a WHERE condition returns no results when using 
JCR_JACKRABBIT provider. 

The query 
{{SELECT * FROM [nt:unstructured] as N}} return the correct number of results. 
However, running {{SELECT * FROM [nt:unstructured] as N WHERE 
ISDESCENDANTNODE(N,"/content')}} returns no results.

I've set up a small project to illustrate this at 
https://github.com/dplaton/sling-testing


> [Sling Mocks] Running a query with condition doesn't return any results
> ---
>
> Key: SLING-5028
> URL: https://issues.apache.org/jira/browse/SLING-5028
> Project: Sling
>  Issue Type: Bug
>  Components: Testing
>Affects Versions: Testing Sling Mock 1.5.0
>Reporter: Daniel Platon
>
> Running a query that uses a WHERE condition returns no results when using 
> JCR_JACKRABBIT provider. 
> The query 
> {{SELECT * FROM [nt:unstructured] as N}} returns the correct number of 
> results. 
> However, running {{SELECT * FROM [nt:unstructured] as N WHERE 
> ISDESCENDANTNODE(N,"/content')}} returns no results.
> I've set up a small project to illustrate this at 
> https://github.com/dplaton/sling-testing



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


[jira] [Commented] (SLING-4761) Latest view seems to get marked as not current

2015-09-16 Thread Stefan Egli (JIRA)

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

Stefan Egli commented on SLING-4761:


I think this could go into the argument whether 
# 
[{{isCurrent()}}|https://github.com/apache/sling/blob/trunk/bundles/extensions/discovery/api/src/main/java/org/apache/sling/discovery/TopologyView.java#L41]
 should return true even if the properties are not current. I was under the 
assumption that if *anything* changes in the view - ie if a new TopologyView 
object must be created as a result - then (all) the previous one(s) would be 
marked as not current.
# the counter-view could be that {{isCurrent}} only is about the 
instance/cluster part and not the properties ..

I'd vote to stick to 1 as is currently the case .. wdyt?

> Latest view seems to get marked as not current
> --
>
> Key: SLING-4761
> URL: https://issues.apache.org/jira/browse/SLING-4761
> Project: Sling
>  Issue Type: Bug
>  Components: Extensions
>Affects Versions: Discovery Impl 1.1.0, Discovery Impl 1.1.2
>Reporter: Carsten Ziegeler
>Assignee: Carsten Ziegeler
>




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


[jira] [Updated] (SLING-4761) Latest view seems to get marked as not current

2015-09-16 Thread Stefan Egli (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-4761?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Stefan Egli updated SLING-4761:
---
 Assignee: Carsten Ziegeler  (was: Stefan Egli)
Fix Version/s: (was: Discovery Impl 1.1.8)
  Description: [~cziegeler], assuming the above assumptions hold, then this 
would not be an issue. Hence removed fix-version for now and assigned to you 
for a review, thx!

> Latest view seems to get marked as not current
> --
>
> Key: SLING-4761
> URL: https://issues.apache.org/jira/browse/SLING-4761
> Project: Sling
>  Issue Type: Bug
>  Components: Extensions
>Affects Versions: Discovery Impl 1.1.0, Discovery Impl 1.1.2
>Reporter: Carsten Ziegeler
>Assignee: Carsten Ziegeler
>
> [~cziegeler], assuming the above assumptions hold, then this would not be an 
> issue. Hence removed fix-version for now and assigned to you for a review, 
> thx!



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


[jira] [Commented] (SLING-4761) Latest view seems to get marked as not current

2015-09-16 Thread Stefan Egli (JIRA)

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

Stefan Egli commented on SLING-4761:


[~cziegeler], assuming the above assumptions hold, then this would not be an 
issue. Hence removed fix-version for now and assigned to you for a review, thx!

> Latest view seems to get marked as not current
> --
>
> Key: SLING-4761
> URL: https://issues.apache.org/jira/browse/SLING-4761
> Project: Sling
>  Issue Type: Bug
>  Components: Extensions
>Affects Versions: Discovery Impl 1.1.0, Discovery Impl 1.1.2
>Reporter: Carsten Ziegeler
>Assignee: Carsten Ziegeler
>




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


[jira] [Updated] (SLING-4761) Latest view seems to get marked as not current

2015-09-16 Thread Stefan Egli (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-4761?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Stefan Egli updated SLING-4761:
---
Description: (was: [~cziegeler], assuming the above assumptions hold, 
then this would not be an issue. Hence removed fix-version for now and assigned 
to you for a review, thx!)

> Latest view seems to get marked as not current
> --
>
> Key: SLING-4761
> URL: https://issues.apache.org/jira/browse/SLING-4761
> Project: Sling
>  Issue Type: Bug
>  Components: Extensions
>Affects Versions: Discovery Impl 1.1.0, Discovery Impl 1.1.2
>Reporter: Carsten Ziegeler
>Assignee: Carsten Ziegeler
>




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


[jira] [Commented] (SLING-4761) Latest view seems to get marked as not current

2015-09-16 Thread Stefan Egli (JIRA)

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

Stefan Egli commented on SLING-4761:


[~cziegeler], good news is I was able to reproduce. Bad news is I don't know 
why the direct 'current'-check makes tests fail..

Here's more details as to what seems happening:
* during startup discovery.impl typically sends out multiple 
{{PROPERTIES_CHANGED}}, this is 'legal'
* in {{JobManagerConfiguration.handleTopologyEvent}} there is a mechanism which 
[ignores the event if only properties have changed but no job-relevant 
ones|https://github.com/apache/sling/blob/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/config/JobManagerConfiguration.java#L548]
* so if the capabilities-properties do change - even though the view is 
otherwise the same - then this will result in a sequence of 
{{stopProcessing}}/{{startProcessing}}
* in {{startProcessing}} there is a mechanism to [trigger an async job after 
10sec|https://github.com/apache/sling/blob/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/config/JobManagerConfiguration.java#L527]
 (I guess to avoid blocking the handleTopologyEvent)
* so, what can happen is that such a delay-job is started, then a 
PROPERTIES_CHANGED comes in, that one will have correctly marked the (previous) 
view of the delay-job as not-current
* thus once that delay-job wakes up it *can* see that the view is not current, 
so that is legal

What very likely adds to the confusion of the output you noticed, is the fact 
that +{{TopologyViewImpl}} overwrites hashCode()+ for internal and testing 
purpose (to have topologyViews comparable/'equalable'). So just from the fact 
that you output the hashCode above and given they are equal as a just received 
PROPERTIES_CHANGED event, doesn't make it the *same* view object. In fact, 
adding more logging output showed that they were indeed different views - and 
thus in this case it was valid/correct that the view is not current (the event 
for that change was received 10sec earlier, which is before the last received 
event in your log).

So to reply to the initial reported issues:
bq. It seems that the last view you get via a topology listener might get mark 
as old (not current)
that would then not be true - this view here was marked !current 10 sec before:
{code} 28.05.2015 19:59:06.995 active check, hash code 2037323133, current : 
false{code}
bq. The interesting thing is that the properties changed event is received 
twice, with the same new view object, ten seconds later the view is not current 
anymore but no topology event / change has been received by the listener.
Same here - given the hashCode is the way it is, these assumptions do not hold 
- the views were likely different

Which brings me to the actual issue: I don't know why enabling that direct 
'current' check on makes tests fail. But I suspect the problem is not the 
'current' itself..

> Latest view seems to get marked as not current
> --
>
> Key: SLING-4761
> URL: https://issues.apache.org/jira/browse/SLING-4761
> Project: Sling
>  Issue Type: Bug
>  Components: Extensions
>Affects Versions: Discovery Impl 1.1.0, Discovery Impl 1.1.2
>Reporter: Carsten Ziegeler
>Assignee: Stefan Egli
> Fix For: Discovery Impl 1.1.8
>
>




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


[jira] [Commented] (SLING-4761) Latest view seems to get marked as not current

2015-09-16 Thread Carsten Ziegeler (JIRA)

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

Carsten Ziegeler commented on SLING-4761:
-

[~egli] If I understand this correctly, this means:
a) the view changes if just properties change
b) as the job handling only acts on change on some properties, it does not 
handle all view changes
c) due to a) and b) the issue needs to be solved in the jobs handling
Is this correct?

> Latest view seems to get marked as not current
> --
>
> Key: SLING-4761
> URL: https://issues.apache.org/jira/browse/SLING-4761
> Project: Sling
>  Issue Type: Bug
>  Components: Extensions
>Affects Versions: Discovery Impl 1.1.0, Discovery Impl 1.1.2
>Reporter: Carsten Ziegeler
>Assignee: Carsten Ziegeler
>




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


[jira] [Commented] (SLING-4761) Latest view seems to get marked as not current

2015-09-16 Thread Stefan Egli (JIRA)

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

Stefan Egli commented on SLING-4761:


bq.  a) the view changes if just properties change
yes, the view 'object' changes - but not the content of the view, ie the list 
of instances is the same
bq.  b) as the job handling only acts on change on some properties, it does not 
handle all view changes
hm, as I read the 
[code|https://github.com/apache/sling/blob/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/config/JobManagerConfiguration.java#L567]
 it should already also handle the TOPOLOGY_CHANGED case - so I'm assuming it 
already handles view changes. so I dont quite see a bug yet in that 
handleTopologyEvent.. perhaps a subtle one: when only irrelevant properties 
change, then it doesn't stop/start - which will maybe leave the job handler to 
eventually stop as it's swallowing the latest (and thus current) event.
bq.  c) due to a) and b) the issue needs to be solved in the jobs handling
yes. probably the safest is to [not swallow the 
event|https://github.com/apache/sling/blob/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/config/JobManagerConfiguration.java#L551]
 for irrelevant property changes

> Latest view seems to get marked as not current
> --
>
> Key: SLING-4761
> URL: https://issues.apache.org/jira/browse/SLING-4761
> Project: Sling
>  Issue Type: Bug
>  Components: Extensions
>Affects Versions: Discovery Impl 1.1.0, Discovery Impl 1.1.2
>Reporter: Carsten Ziegeler
>Assignee: Carsten Ziegeler
>




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


[jira] [Commented] (SLING-4634) Directly check if view is still current

2015-09-16 Thread Stefan Egli (JIRA)

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

Stefan Egli commented on SLING-4634:


lgtm

> Directly check if view is still current
> ---
>
> Key: SLING-4634
> URL: https://issues.apache.org/jira/browse/SLING-4634
> Project: Sling
>  Issue Type: Improvement
>  Components: Extensions
>Affects Versions: Event 3.6.0
>Reporter: Carsten Ziegeler
>Assignee: Carsten Ziegeler
> Fix For: Event 3.7.6
>
>
> Currently, the job handler continues until it receives a topology event 
> (changing/changed/init). However , the current view object can directly be 
> checked whether it's current



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


[jira] [Commented] (SLING-4634) Directly check if view is still current

2015-09-16 Thread Carsten Ziegeler (JIRA)

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

Carsten Ziegeler commented on SLING-4634:
-

As noted in SLING-4761, the topology implementation is actually acting correct, 
what happens is:
- if properties change, a properties changed event is sent with a new view 
which make the new view the current one, the old view returning false for is 
current
- as the JobManagerConfiguration class is ignoring some properties changed 
events (which are not relevant for the job handling), it might happen that:
- a valid change event is sent which is then processed async (10 sec delay)
- within that delay a prop change event arrives which is discarded
- once the async thread starts, that view is not current anymore
I've created a test case verifying that behaviour and based on this fixed the 
implementation.

The only downside is now that every event in the topology causes the job 
handling to sleep for 10 seconds

FYI [~egli]

> Directly check if view is still current
> ---
>
> Key: SLING-4634
> URL: https://issues.apache.org/jira/browse/SLING-4634
> Project: Sling
>  Issue Type: Improvement
>  Components: Extensions
>Affects Versions: Event 3.6.0
>Reporter: Carsten Ziegeler
>Assignee: Carsten Ziegeler
> Fix For: Event 3.7.6
>
>
> Currently, the job handler continues until it receives a topology event 
> (changing/changed/init). However , the current view object can directly be 
> checked whether it's current



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


[jira] [Commented] (SLING-4761) Latest view seems to get marked as not current

2015-09-16 Thread Carsten Ziegeler (JIRA)

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

Carsten Ziegeler commented on SLING-4761:
-

[~egli] My impression was more towards 2 but thinkint about it, 1 is the better 
option

> Latest view seems to get marked as not current
> --
>
> Key: SLING-4761
> URL: https://issues.apache.org/jira/browse/SLING-4761
> Project: Sling
>  Issue Type: Bug
>  Components: Extensions
>Affects Versions: Discovery Impl 1.1.0, Discovery Impl 1.1.2
>Reporter: Carsten Ziegeler
>Assignee: Carsten Ziegeler
>




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


[jira] [Resolved] (SLING-4761) Latest view seems to get marked as not current

2015-09-16 Thread Carsten Ziegeler (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-4761?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Carsten Ziegeler resolved SLING-4761.
-
Resolution: Not A Problem

Let's continue the discussion in SLING-4634

> Latest view seems to get marked as not current
> --
>
> Key: SLING-4761
> URL: https://issues.apache.org/jira/browse/SLING-4761
> Project: Sling
>  Issue Type: Bug
>  Components: Extensions
>Affects Versions: Discovery Impl 1.1.0, Discovery Impl 1.1.2
>Reporter: Carsten Ziegeler
>Assignee: Carsten Ziegeler
>




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


[jira] [Commented] (SLING-4634) Directly check if view is still current

2015-09-16 Thread Carsten Ziegeler (JIRA)

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

Carsten Ziegeler commented on SLING-4634:
-

I'll work on improving the mechanism to avoid additional wait times if just the 
properties change

> Directly check if view is still current
> ---
>
> Key: SLING-4634
> URL: https://issues.apache.org/jira/browse/SLING-4634
> Project: Sling
>  Issue Type: Improvement
>  Components: Extensions
>Affects Versions: Event 3.6.0
>Reporter: Carsten Ziegeler
>Assignee: Carsten Ziegeler
> Fix For: Event 3.7.6
>
>
> Currently, the job handler continues until it receives a topology event 
> (changing/changed/init). However , the current view object can directly be 
> checked whether it's current



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