[jira] [Commented] (SLING-10624) Callback when SlingRepository init fails

2021-07-16 Thread Marcel Reutegger (Jira)


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

Marcel Reutegger commented on SLING-10624:
--

Proposed changes in PR: 
https://github.com/apache/sling-org-apache-sling-jcr-base/pull/6

> Callback when SlingRepository init fails
> 
>
> Key: SLING-10624
> URL: https://issues.apache.org/jira/browse/SLING-10624
> Project: Sling
>  Issue Type: Improvement
>  Components: JCR
>Reporter: Marcel Reutegger
>Priority: Minor
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> {{AbstractSlingRepositoryManager}} initializes the repository asynchronously 
> in a separate thread. This makes it difficult for an implementing subclass to 
> detect when initialization fails. An implementing class calls {{start()}}, 
> which returns almost immediately, while the repository is starting up 
> asynchronously. There is no way to detect that {{start()}} was successful.
> There should be a callback method that can be overwritten by the implementing 
> class. The method would be called when initialization fails, before 
> {{stop()}} is finally called.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (SLING-10624) Callback when SlingRepository init fails

2021-07-16 Thread Marcel Reutegger (Jira)
Marcel Reutegger created SLING-10624:


 Summary: Callback when SlingRepository init fails
 Key: SLING-10624
 URL: https://issues.apache.org/jira/browse/SLING-10624
 Project: Sling
  Issue Type: Improvement
  Components: JCR
Reporter: Marcel Reutegger


{{AbstractSlingRepositoryManager}} initializes the repository asynchronously in 
a separate thread. This makes it difficult for an implementing subclass to 
detect when initialization fails. An implementing class calls {{start()}}, 
which returns almost immediately, while the repository is starting up 
asynchronously. There is no way to detect that {{start()}} was successful.

There should be a callback method that can be overwritten by the implementing 
class. The method would be called when initialization fails, before {{stop()}} 
is finally called.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Resolved] (SLING-9202) Repository init may fail with ClassCastException

2020-03-13 Thread Marcel Reutegger (Jira)


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

Marcel Reutegger resolved SLING-9202.
-
Resolution: Duplicate

Indeed, this is a duplicate of SLING-9195.

> Repository init may fail with ClassCastException
> 
>
> Key: SLING-9202
> URL: https://issues.apache.org/jira/browse/SLING-9202
> Project: Sling
>  Issue Type: Bug
>  Components: Repoinit
>Affects Versions: Repoinit JCR 1.1.20
>Reporter: Marcel Reutegger
>Priority: Major
>
> A repoinit may fail when {{restriction()}} has multiple values.
> {noformat}
> java.lang.RuntimeException: Failed to set principal-based ACL (class 
> org.apache.jackrabbit.oak.plugins.value.jcr.ValueImpl cannot be cast to class 
> java.lang.Comparable (org.apache.jackrabbit.oak.plugins.value.jcr.ValueImpl 
> is in unnamed module of loader 
> org.apache.felix.framework.BundleWiringImpl$BundleClassLoader @37316529; 
> java.lang.Comparable is in module java.base of loader 'bootstrap'))
> at 
> org.apache.sling.jcr.repoinit.impl.AclVisitor.visitSetAclPrincipalBased(AclVisitor.java:109)
>  [org.apache.sling.jcr.repoinit:1.1.20]
> at 
> org.apache.sling.repoinit.parser.operations.SetAclPrincipalBased.accept(SetAclPrincipalBased.java:53)
>  [org.apache.sling.repoinit.parser:1.4.2]
> at 
> org.apache.sling.jcr.repoinit.impl.JcrRepoInitOpsProcessorImpl.apply(JcrRepoInitOpsProcessorImpl.java:54)
>  [org.apache.sling.jcr.repoinit:1.1.20]
> at 
> org.apache.sling.jcr.repoinit.impl.RepositoryInitializerFactory.processRepository(RepositoryInitializerFactory.java:126)
>  [org.apache.sling.jcr.repoinit:1.1.20]
> at 
> org.apache.sling.jcr.base.AbstractSlingRepositoryManager.executeRepositoryInitializers(AbstractSlingRepositoryManager.java:590)
>  [org.apache.sling.jcr.base:3.1.0]
> at 
> org.apache.sling.jcr.base.AbstractSlingRepositoryManager.initializeAndRegisterRepositoryService(AbstractSlingRepositoryManager.java:534)
>  [org.apache.sling.jcr.base:3.1.0]
> at 
> org.apache.sling.jcr.base.AbstractSlingRepositoryManager.access$300(AbstractSlingRepositoryManager.java:92)
>  [org.apache.sling.jcr.base:3.1.0]
> at 
> org.apache.sling.jcr.base.AbstractSlingRepositoryManager$4.run(AbstractSlingRepositoryManager.java:496)
>  [org.apache.sling.jcr.base:3.1.0]
> Caused by: java.lang.ClassCastException: class 
> org.apache.jackrabbit.oak.plugins.value.jcr.ValueImpl cannot be cast to class 
> java.lang.Comparable (org.apache.jackrabbit.oak.plugins.value.jcr.ValueImpl 
> is in unnamed module of loader 
> org.apache.felix.framework.BundleWiringImpl$BundleClassLoader @37316529; 
> java.lang.Comparable is in module java.base of loader 'bootstrap')
> at 
> java.base/java.util.ComparableTimSort.countRunAndMakeAscending(ComparableTimSort.java:320)
> at 
> java.base/java.util.ComparableTimSort.sort(ComparableTimSort.java:188)
> at java.base/java.util.Arrays.sort(Arrays.java:1249)
> at 
> org.apache.sling.jcr.repoinit.impl.AclUtil.compareArrays(AclUtil.java:315) 
> [org.apache.sling.jcr.repoinit:1.1.20]
> at 
> org.apache.sling.jcr.repoinit.impl.AclUtil$LocalAccessControlEntry.sameRestrictions(AclUtil.java:387)
>  [org.apache.sling.jcr.repoinit:1.1.20]
> at 
> org.apache.sling.jcr.repoinit.impl.AclUtil$LocalAccessControlEntry.isContainedIn(AclUtil.java:350)
>  [org.apache.sling.jcr.repoinit:1.1.20]
> at 
> org.apache.sling.jcr.repoinit.impl.AclUtil.contains(AclUtil.java:278) 
> [org.apache.sling.jcr.repoinit:1.1.20]
> at 
> org.apache.sling.jcr.repoinit.impl.AclUtil.containsEquivalentEntry(AclUtil.java:264)
>  [org.apache.sling.jcr.repoinit:1.1.20]
> at 
> org.apache.sling.jcr.repoinit.impl.AclUtil.setPrincipalAcl(AclUtil.java:190) 
> [org.apache.sling.jcr.repoinit:1.1.20]
> at 
> org.apache.sling.jcr.repoinit.impl.AclVisitor.visitSetAclPrincipalBased(AclVisitor.java:107)
>  [org.apache.sling.jcr.repoinit:1.1.20]
> ... 7 common frames omitted
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (SLING-9202) Repository init may fail with ClassCastException

2020-03-12 Thread Marcel Reutegger (Jira)
Marcel Reutegger created SLING-9202:
---

 Summary: Repository init may fail with ClassCastException
 Key: SLING-9202
 URL: https://issues.apache.org/jira/browse/SLING-9202
 Project: Sling
  Issue Type: Bug
  Components: Repoinit
Affects Versions: Repoinit JCR 1.1.20
Reporter: Marcel Reutegger


A repoinit may fail when {{restriction()}} has multiple values.

{noformat}
java.lang.RuntimeException: Failed to set principal-based ACL (class 
org.apache.jackrabbit.oak.plugins.value.jcr.ValueImpl cannot be cast to class 
java.lang.Comparable (org.apache.jackrabbit.oak.plugins.value.jcr.ValueImpl is 
in unnamed module of loader 
org.apache.felix.framework.BundleWiringImpl$BundleClassLoader @37316529; 
java.lang.Comparable is in module java.base of loader 'bootstrap'))
at 
org.apache.sling.jcr.repoinit.impl.AclVisitor.visitSetAclPrincipalBased(AclVisitor.java:109)
 [org.apache.sling.jcr.repoinit:1.1.20]
at 
org.apache.sling.repoinit.parser.operations.SetAclPrincipalBased.accept(SetAclPrincipalBased.java:53)
 [org.apache.sling.repoinit.parser:1.4.2]
at 
org.apache.sling.jcr.repoinit.impl.JcrRepoInitOpsProcessorImpl.apply(JcrRepoInitOpsProcessorImpl.java:54)
 [org.apache.sling.jcr.repoinit:1.1.20]
at 
org.apache.sling.jcr.repoinit.impl.RepositoryInitializerFactory.processRepository(RepositoryInitializerFactory.java:126)
 [org.apache.sling.jcr.repoinit:1.1.20]
at 
org.apache.sling.jcr.base.AbstractSlingRepositoryManager.executeRepositoryInitializers(AbstractSlingRepositoryManager.java:590)
 [org.apache.sling.jcr.base:3.1.0]
at 
org.apache.sling.jcr.base.AbstractSlingRepositoryManager.initializeAndRegisterRepositoryService(AbstractSlingRepositoryManager.java:534)
 [org.apache.sling.jcr.base:3.1.0]
at 
org.apache.sling.jcr.base.AbstractSlingRepositoryManager.access$300(AbstractSlingRepositoryManager.java:92)
 [org.apache.sling.jcr.base:3.1.0]
at 
org.apache.sling.jcr.base.AbstractSlingRepositoryManager$4.run(AbstractSlingRepositoryManager.java:496)
 [org.apache.sling.jcr.base:3.1.0]
Caused by: java.lang.ClassCastException: class 
org.apache.jackrabbit.oak.plugins.value.jcr.ValueImpl cannot be cast to class 
java.lang.Comparable (org.apache.jackrabbit.oak.plugins.value.jcr.ValueImpl is 
in unnamed module of loader 
org.apache.felix.framework.BundleWiringImpl$BundleClassLoader @37316529; 
java.lang.Comparable is in module java.base of loader 'bootstrap')
at 
java.base/java.util.ComparableTimSort.countRunAndMakeAscending(ComparableTimSort.java:320)
at 
java.base/java.util.ComparableTimSort.sort(ComparableTimSort.java:188)
at java.base/java.util.Arrays.sort(Arrays.java:1249)
at 
org.apache.sling.jcr.repoinit.impl.AclUtil.compareArrays(AclUtil.java:315) 
[org.apache.sling.jcr.repoinit:1.1.20]
at 
org.apache.sling.jcr.repoinit.impl.AclUtil$LocalAccessControlEntry.sameRestrictions(AclUtil.java:387)
 [org.apache.sling.jcr.repoinit:1.1.20]
at 
org.apache.sling.jcr.repoinit.impl.AclUtil$LocalAccessControlEntry.isContainedIn(AclUtil.java:350)
 [org.apache.sling.jcr.repoinit:1.1.20]
at 
org.apache.sling.jcr.repoinit.impl.AclUtil.contains(AclUtil.java:278) 
[org.apache.sling.jcr.repoinit:1.1.20]
at 
org.apache.sling.jcr.repoinit.impl.AclUtil.containsEquivalentEntry(AclUtil.java:264)
 [org.apache.sling.jcr.repoinit:1.1.20]
at 
org.apache.sling.jcr.repoinit.impl.AclUtil.setPrincipalAcl(AclUtil.java:190) 
[org.apache.sling.jcr.repoinit:1.1.20]
at 
org.apache.sling.jcr.repoinit.impl.AclVisitor.visitSetAclPrincipalBased(AclVisitor.java:107)
 [org.apache.sling.jcr.repoinit:1.1.20]
... 7 common frames omitted
{noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (SLING-7233) MockConfigurationAdmin ignores configuration PID

2017-11-08 Thread Marcel Reutegger (JIRA)

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

Marcel Reutegger commented on SLING-7233:
-

Agreed. See updated PR.

> MockConfigurationAdmin ignores configuration PID
> 
>
> Key: SLING-7233
> URL: https://issues.apache.org/jira/browse/SLING-7233
> Project: Sling
>  Issue Type: Bug
>  Components: Testing
>Reporter: Marcel Reutegger
>Priority: Minor
>
> The class currently assumes the configuration PID is always the service PID. 
> It ignores a potentially different configuration PID on the component.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Created] (SLING-7233) MockConfigurationAdmin ignores configuration PID

2017-11-08 Thread Marcel Reutegger (JIRA)
Marcel Reutegger created SLING-7233:
---

 Summary: MockConfigurationAdmin ignores configuration PID
 Key: SLING-7233
 URL: https://issues.apache.org/jira/browse/SLING-7233
 Project: Sling
  Issue Type: Bug
  Components: Testing
Reporter: Marcel Reutegger
Priority: Minor


The class currently assumes the configuration PID is always the service PID. It 
ignores a potentially different configuration PID on the component.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SLING-7223) Spikes in RRD after restart

2017-10-31 Thread Marcel Reutegger (JIRA)

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

Marcel Reutegger commented on SLING-7223:
-

I didn't know Sling is on github now. Can you please take a look at SLING-7222 
first and commit the patch there if it looks OK to you? The patch here will 
require some conflict resolution, which I can do afterwards and then create a 
PR.

> Spikes in RRD after restart
> ---
>
> Key: SLING-7223
> URL: https://issues.apache.org/jira/browse/SLING-7223
> Project: Sling
>  Issue Type: Bug
>  Components: Commons
>Affects Versions: Commons Metrics RRD4J 1.0.0
>Reporter: Marcel Reutegger
> Attachments: SLING-7223.patch
>
>
> Running the reporter for some time and then restarting the process shows 
> spikes in the collected data. These are caused by counter gauges that are 
> reset to zero after a restart. RRD interprets them as 32bit or 64bit integer 
> overflows and calculates incorrect values.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (SLING-7223) Spikes in RRD after restart

2017-10-30 Thread Marcel Reutegger (JIRA)

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

Marcel Reutegger updated SLING-7223:

Attachment: SLING-7223.patch

Attached a patch with proposed changes. Please note, this depends on SLING-7222 
and likely requires some manual conflict resolution when applied on top of 
those changes.

Whenever the RRD4JReporter is initialized or closed, a sample with unknown 
values is inserted. This indicates to rrdtool (and RRD4J) that no overflow 
occurred.

> Spikes in RRD after restart
> ---
>
> Key: SLING-7223
> URL: https://issues.apache.org/jira/browse/SLING-7223
> Project: Sling
>  Issue Type: Bug
>  Components: Commons
>Affects Versions: Commons Metrics RRD4J 1.0.0
>Reporter: Marcel Reutegger
> Attachments: SLING-7223.patch
>
>
> Running the reporter for some time and then restarting the process shows 
> spikes in the collected data. These are caused by counter gauges that are 
> reset to zero after a restart. RRD interprets them as 32bit or 64bit integer 
> overflows and calculates incorrect values.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Created] (SLING-7223) Spikes in RRD after restart

2017-10-30 Thread Marcel Reutegger (JIRA)
Marcel Reutegger created SLING-7223:
---

 Summary: Spikes in RRD after restart
 Key: SLING-7223
 URL: https://issues.apache.org/jira/browse/SLING-7223
 Project: Sling
  Issue Type: Bug
  Components: Commons
Affects Versions: Commons Metrics RRD4J 1.0.0
Reporter: Marcel Reutegger


Running the reporter for some time and then restarting the process shows spikes 
in the collected data. These are caused by counter gauges that are reset to 
zero after a restart. RRD interprets them as 32bit or 64bit integer overflows 
and calculates incorrect values.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (SLING-7222) Too frequent samples

2017-10-30 Thread Marcel Reutegger (JIRA)

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

Marcel Reutegger updated SLING-7222:

Attachment: SLING-7222.patch

Attached proposed changes with test and fix.

> Too frequent samples
> 
>
> Key: SLING-7222
> URL: https://issues.apache.org/jira/browse/SLING-7222
> Project: Sling
>  Issue Type: Bug
>  Components: Commons
>Affects Versions: Commons Metrics RRD4J 1.0.0
>Reporter: Marcel Reutegger
>Priority: Minor
> Attachments: SLING-7222.patch
>
>
> The metrics reporter sometimes logs error messages telling samples are 
> reported too frequently (more than once a second):
> {noformat}
> 29.10.2017 19:01:25.384 *ERROR* [metrics-RRD4JReporter-1-thread-1] 
> com.codahale.metrics.ScheduledReporter RuntimeException thrown from 
> RRD4JReporter#report. Exception was suppressed.
> java.lang.IllegalArgumentException: Bad sample time: 1509300085. Last update 
> time was 1509300085, at least one second step is required
> at org.rrd4j.core.RrdDb.store(RrdDb.java:517)
> at org.rrd4j.core.Sample.update(Sample.java:194)
> at 
> org.apache.sling.commons.metrics.rrd4j.impl.RRD4JReporter.report(RRD4JReporter.java:239)
> at 
> com.codahale.metrics.ScheduledReporter.report(ScheduledReporter.java:162)
> at 
> com.codahale.metrics.ScheduledReporter$1.run(ScheduledReporter.java:117)
> at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
> at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
> at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
> at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> at java.lang.Thread.run(Thread.java:748)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Created] (SLING-7222) Too frequent samples

2017-10-30 Thread Marcel Reutegger (JIRA)
Marcel Reutegger created SLING-7222:
---

 Summary: Too frequent samples
 Key: SLING-7222
 URL: https://issues.apache.org/jira/browse/SLING-7222
 Project: Sling
  Issue Type: Bug
  Components: Commons
Affects Versions: Commons Metrics RRD4J 1.0.0
Reporter: Marcel Reutegger
Priority: Minor


The metrics reporter sometimes logs error messages telling samples are reported 
too frequently (more than once a second):

{noformat}
29.10.2017 19:01:25.384 *ERROR* [metrics-RRD4JReporter-1-thread-1] 
com.codahale.metrics.ScheduledReporter RuntimeException thrown from 
RRD4JReporter#report. Exception was suppressed.
java.lang.IllegalArgumentException: Bad sample time: 1509300085. Last update 
time was 1509300085, at least one second step is required
at org.rrd4j.core.RrdDb.store(RrdDb.java:517)
at org.rrd4j.core.Sample.update(Sample.java:194)
at 
org.apache.sling.commons.metrics.rrd4j.impl.RRD4JReporter.report(RRD4JReporter.java:239)
at 
com.codahale.metrics.ScheduledReporter.report(ScheduledReporter.java:162)
at 
com.codahale.metrics.ScheduledReporter$1.run(ScheduledReporter.java:117)
at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
{noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (SLING-7090) RRD4J metrics reporter does not close file on deactivate

2017-08-29 Thread Marcel Reutegger (JIRA)

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

Marcel Reutegger updated SLING-7090:

Attachment: SLING-7090.patch

Proposed fix in [^SLING-7090.patch].

> RRD4J metrics reporter does not close file on deactivate
> 
>
> Key: SLING-7090
> URL: https://issues.apache.org/jira/browse/SLING-7090
> Project: Sling
>  Issue Type: Bug
>  Components: Commons
>Reporter: Marcel Reutegger
>Priority: Minor
> Fix For: Commons Metrics RRD4J 1.0.0
>
> Attachments: SLING-7090.patch
>
>
> The RRD4J metrics reporter does not close the underlying database file on 
> deactivate. Running the tests on windows will show the following failure:
> {noformat}
> java.lang.RuntimeException: Unable to invoke method 'activate' for class 
> org.apache.sling.commons.metrics.rrd4j.impl.CodahaleMetricsReporter
>   at 
> org.apache.sling.testing.mock.osgi.OsgiServiceUtil.invokeMethod(OsgiServiceUtil.java:320)
>   at 
> org.apache.sling.testing.mock.osgi.OsgiServiceUtil.invokeLifecycleMethod(OsgiServiceUtil.java:213)
>   at 
> org.apache.sling.testing.mock.osgi.OsgiServiceUtil.activateDeactivate(OsgiServiceUtil.java:84)
>   at 
> org.apache.sling.testing.mock.osgi.MockOsgi.activate(MockOsgi.java:171)
>   at 
> org.apache.sling.testing.mock.osgi.MockOsgi.activate(MockOsgi.java:182)
>   at 
> org.apache.sling.commons.metrics.rrd4j.impl.ReporterTest.reconfigure(ReporterTest.java:91)
>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>   at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>   at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>   at java.lang.reflect.Method.invoke(Method.java:498)
>   at 
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
>   at 
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
>   at 
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
>   at 
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
>   at 
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
>   at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48)
>   at org.junit.rules.RunRules.evaluate(RunRules.java:20)
>   at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
>   at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
>   at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
>   at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
>   at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
>   at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
>   at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
>   at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
>   at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
>   at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
>   at 
> com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
>   at 
> com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:51)
>   at 
> com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
>   at 
> com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
> Caused by: java.nio.file.FileSystemException: target\metrics\metrics.rrd -> 
> target\metrics\metrics.rrd.0: The process cannot access the file because it 
> is being used by another process.
>   at 
> sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:86)
>   at 
> sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:97)
>   at sun.nio.fs.WindowsFileCopy.move(WindowsFileCopy.java:387)
>   at 
> sun.nio.fs.WindowsFileSystemProvider.move(WindowsFileSystemProvider.java:287)
>   at java.nio.file.Files.move(Files.java:1395)
>   at 
> org.apache.sling.commons.metrics.rrd4j.impl.RRD4JReporter.rename(RRD4JReporter.java:387)
>   at 
> org.apache.sling.commons.metrics.rrd4j.impl.RRD4JReporter.renameDB(RRD4JReporter.java:369)
>   at 
> org.apache.sling.commons.metrics.rrd4j.impl.RRD4JReporter.createDB(RRD4JReporter.java:350)
>   at 
> org.apache.sling.commons.metrics.rrd4j.impl.RRD4JReporter.(RRD4JReporter.java:195)
>   at 
> org.apache.sling.commons.metrics.rrd4j.impl.RRD4JReporter$Builder.build(RRD4JReporter.java:161)
>   at 
> 

[jira] [Created] (SLING-7090) RRD4J metrics reporter does not close file on deactivate

2017-08-29 Thread Marcel Reutegger (JIRA)
Marcel Reutegger created SLING-7090:
---

 Summary: RRD4J metrics reporter does not close file on deactivate
 Key: SLING-7090
 URL: https://issues.apache.org/jira/browse/SLING-7090
 Project: Sling
  Issue Type: Bug
  Components: Commons
Reporter: Marcel Reutegger
Priority: Minor
 Fix For: Commons Metrics RRD4J 1.0.0


The RRD4J metrics reporter does not close the underlying database file on 
deactivate. Running the tests on windows will show the following failure:

{noformat}
java.lang.RuntimeException: Unable to invoke method 'activate' for class 
org.apache.sling.commons.metrics.rrd4j.impl.CodahaleMetricsReporter

at 
org.apache.sling.testing.mock.osgi.OsgiServiceUtil.invokeMethod(OsgiServiceUtil.java:320)
at 
org.apache.sling.testing.mock.osgi.OsgiServiceUtil.invokeLifecycleMethod(OsgiServiceUtil.java:213)
at 
org.apache.sling.testing.mock.osgi.OsgiServiceUtil.activateDeactivate(OsgiServiceUtil.java:84)
at 
org.apache.sling.testing.mock.osgi.MockOsgi.activate(MockOsgi.java:171)
at 
org.apache.sling.testing.mock.osgi.MockOsgi.activate(MockOsgi.java:182)
at 
org.apache.sling.commons.metrics.rrd4j.impl.ReporterTest.reconfigure(ReporterTest.java:91)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at 
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at 
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at 
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at 
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at 
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48)
at org.junit.rules.RunRules.evaluate(RunRules.java:20)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at 
com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
at 
com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:51)
at 
com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
at 
com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
Caused by: java.nio.file.FileSystemException: target\metrics\metrics.rrd -> 
target\metrics\metrics.rrd.0: The process cannot access the file because it is 
being used by another process.

at 
sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:86)
at 
sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:97)
at sun.nio.fs.WindowsFileCopy.move(WindowsFileCopy.java:387)
at 
sun.nio.fs.WindowsFileSystemProvider.move(WindowsFileSystemProvider.java:287)
at java.nio.file.Files.move(Files.java:1395)
at 
org.apache.sling.commons.metrics.rrd4j.impl.RRD4JReporter.rename(RRD4JReporter.java:387)
at 
org.apache.sling.commons.metrics.rrd4j.impl.RRD4JReporter.renameDB(RRD4JReporter.java:369)
at 
org.apache.sling.commons.metrics.rrd4j.impl.RRD4JReporter.createDB(RRD4JReporter.java:350)
at 
org.apache.sling.commons.metrics.rrd4j.impl.RRD4JReporter.(RRD4JReporter.java:195)
at 
org.apache.sling.commons.metrics.rrd4j.impl.RRD4JReporter$Builder.build(RRD4JReporter.java:161)
at 
org.apache.sling.commons.metrics.rrd4j.impl.CodahaleMetricsReporter.activate(CodahaleMetricsReporter.java:138)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)

[jira] [Comment Edited] (SLING-7074) RRD4J NPE on removing all "Data sources" from config

2017-08-24 Thread Marcel Reutegger (JIRA)

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

Marcel Reutegger edited comment on SLING-7074 at 8/24/17 12:25 PM:
---

Looks very good to me.

Regarding the path. IIUC the activate would throw an exception if I remove the 
path configuration entry. What do you think about a fallback to the default 
path in that case?

Btw, the title for this issue should probably be changed as well. This isn't 
just about data sources after all.


was (Author: mreutegg):
Looks very good to me.

Regarding the path. IIUC the activate would throw an exception if I remove the 
path configuration entry. What do you think about a fallback to the default 
path in that case?

> RRD4J NPE on removing all "Data sources" from config
> 
>
> Key: SLING-7074
> URL: https://issues.apache.org/jira/browse/SLING-7074
> Project: Sling
>  Issue Type: Bug
>  Components: Commons
>Reporter: Alex Deparvu
>Priority: Minor
> Fix For: Commons Metrics RRD4J 1.0.0
>
> Attachments: SLING-7074.patch
>
>
> Opened the config manager and deleted all entries
> {noformat}
>   *ERROR* [CM Event Dispatcher (Fire ConfigurationEvent: 
> pid=org.apache.sling.commons.metrics.rrd4j.impl.CodahaleMetricsReporter)] 
> org.apache.sling.commons.metrics-rrd4j 
> [org.apache.sling.commons.metrics.rrd4j.impl.CodahaleMetricsReporter(3134)] 
> The activate method has thrown an exception (java.lang.NullPointerException)
> java.lang.NullPointerException: null
> at 
> org.apache.sling.commons.metrics.rrd4j.impl.RRD4JReporter$Builder.withDatasources(RRD4JReporter.java:91)
> at 
> org.apache.sling.commons.metrics.rrd4j.impl.CodahaleMetricsReporter.activate(CodahaleMetricsReporter.java:143)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> {noformat}
> fyi [~mreutegg]



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SLING-7074) RRD4J NPE on removing all "Data sources" from config

2017-08-24 Thread Marcel Reutegger (JIRA)

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

Marcel Reutegger commented on SLING-7074:
-

Looks very good to me.

Regarding the path. IIUC the activate would throw an exception if I remove the 
path configuration entry. What do you think about a fallback to the default 
path in that case?

> RRD4J NPE on removing all "Data sources" from config
> 
>
> Key: SLING-7074
> URL: https://issues.apache.org/jira/browse/SLING-7074
> Project: Sling
>  Issue Type: Bug
>  Components: Commons
>Reporter: Alex Deparvu
>Priority: Minor
> Fix For: Commons Metrics RRD4J 1.0.0
>
> Attachments: SLING-7074.patch
>
>
> Opened the config manager and deleted all entries
> {noformat}
>   *ERROR* [CM Event Dispatcher (Fire ConfigurationEvent: 
> pid=org.apache.sling.commons.metrics.rrd4j.impl.CodahaleMetricsReporter)] 
> org.apache.sling.commons.metrics-rrd4j 
> [org.apache.sling.commons.metrics.rrd4j.impl.CodahaleMetricsReporter(3134)] 
> The activate method has thrown an exception (java.lang.NullPointerException)
> java.lang.NullPointerException: null
> at 
> org.apache.sling.commons.metrics.rrd4j.impl.RRD4JReporter$Builder.withDatasources(RRD4JReporter.java:91)
> at 
> org.apache.sling.commons.metrics.rrd4j.impl.CodahaleMetricsReporter.activate(CodahaleMetricsReporter.java:143)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> {noformat}
> fyi [~mreutegg]



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SLING-7074) RRD4J NPE on removing all "Data sources" from config

2017-08-24 Thread Marcel Reutegger (JIRA)

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

Marcel Reutegger commented on SLING-7074:
-

I agree, it would be nice if there was some validation possible with the config 
manager. My preference is fallback to default values whenever possible and 
server side validation before values are passed to RRD4J. I would probably 
still start the reporter even if some values are malformed. E.g. when there is 
a syntax error in a datasource or archive definition. We could just ignore that 
entry and log an error or warning. A check on the datasources is already 
implemented. Something similar could be done with the archive definitions.

> RRD4J NPE on removing all "Data sources" from config
> 
>
> Key: SLING-7074
> URL: https://issues.apache.org/jira/browse/SLING-7074
> Project: Sling
>  Issue Type: Bug
>  Components: Commons
>Reporter: Alex Deparvu
>Priority: Minor
> Fix For: Commons Metrics RRD4J 1.0.0
>
>
> Opened the config manager and deleted all entries
> {noformat}
>   *ERROR* [CM Event Dispatcher (Fire ConfigurationEvent: 
> pid=org.apache.sling.commons.metrics.rrd4j.impl.CodahaleMetricsReporter)] 
> org.apache.sling.commons.metrics-rrd4j 
> [org.apache.sling.commons.metrics.rrd4j.impl.CodahaleMetricsReporter(3134)] 
> The activate method has thrown an exception (java.lang.NullPointerException)
> java.lang.NullPointerException: null
> at 
> org.apache.sling.commons.metrics.rrd4j.impl.RRD4JReporter$Builder.withDatasources(RRD4JReporter.java:91)
> at 
> org.apache.sling.commons.metrics.rrd4j.impl.CodahaleMetricsReporter.activate(CodahaleMetricsReporter.java:143)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> {noformat}
> fyi [~mreutegg]



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (SLING-7077) Reduce size of RRD4J metrics reporter

2017-08-23 Thread Marcel Reutegger (JIRA)

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

Marcel Reutegger updated SLING-7077:

Attachment: SLING-7077.patch

Proposed changes in [^SLING-7077.patch] reduces the bundle size from 695K to 
296K.

> Reduce size of RRD4J metrics reporter
> -
>
> Key: SLING-7077
> URL: https://issues.apache.org/jira/browse/SLING-7077
> Project: Sling
>  Issue Type: Improvement
>  Components: Commons
>Reporter: Marcel Reutegger
>Priority: Minor
> Fix For: Commons Metrics RRD4J 1.0.0
>
> Attachments: SLING-7077.patch
>
>
> The RRD4J library contains graph functionality and fonts not needed by the 
> reporter. These should be excluded from the bundle. 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Created] (SLING-7077) Reduce size of RRD4J metrics reporter

2017-08-23 Thread Marcel Reutegger (JIRA)
Marcel Reutegger created SLING-7077:
---

 Summary: Reduce size of RRD4J metrics reporter
 Key: SLING-7077
 URL: https://issues.apache.org/jira/browse/SLING-7077
 Project: Sling
  Issue Type: Improvement
  Components: Commons
Reporter: Marcel Reutegger
Priority: Minor
 Fix For: Commons Metrics RRD4J 1.0.0


The RRD4J library contains graph functionality and fonts not needed by the 
reporter. These should be excluded from the bundle. 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (SLING-7055) RRD4J metrics reporter

2017-08-22 Thread Marcel Reutegger (JIRA)

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

Marcel Reutegger updated SLING-7055:

Component/s: (was: Extensions)
 Commons

Changed 'Component/s' back to Commons.

> RRD4J metrics reporter
> --
>
> Key: SLING-7055
> URL: https://issues.apache.org/jira/browse/SLING-7055
> Project: Sling
>  Issue Type: New Feature
>  Components: Commons
>Reporter: Marcel Reutegger
>Assignee: Robert Munteanu
>Priority: Minor
> Fix For: Commons Metrics RRD4J 1.0.0
>
> Attachments: SLING-7055.patch, SLING-7055.patch, SLING-7055.patch, 
> SLING-7055.patch, SLING-7055.patch
>
>
> SLING-4080 introduced metrics in Sling. The proposal in this issue adds a new 
> commons module which writes those metrics to a time series database on the 
> local filesystem. The primary purpose is tracking metrics for diagnostics.
> The bundle uses [RRD4J|https://github.com/rrd4j/rrd4j] as the time series 
> database implementation. The library is Apache License, Version 2.0.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (SLING-7071) Rename metrics file on configuration change

2017-08-22 Thread Marcel Reutegger (JIRA)

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

Marcel Reutegger updated SLING-7071:

Attachment: SLING-7071.patch

Proposed changed attached in [^SLING-7071.patch].

> Rename metrics file on configuration change
> ---
>
> Key: SLING-7071
> URL: https://issues.apache.org/jira/browse/SLING-7071
> Project: Sling
>  Issue Type: Improvement
>  Components: Commons
>Reporter: Marcel Reutegger
>Priority: Minor
> Fix For: Commons Metrics RRD4J 1.0.0
>
> Attachments: SLING-7071.patch
>
>
> The metrics reporter introduced in SLING-7055 overwrites an existing metrics 
> file when the configuration is changed. It would be more useful to keep an 
> existing file by renaming it. Otherwise valuable metrics data gathered so far 
> is lost. 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (SLING-7063) Inventory printer for metrics RRD4J reporter

2017-08-22 Thread Marcel Reutegger (JIRA)

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

Marcel Reutegger updated SLING-7063:

Fix Version/s: Commons Metrics RRD4J 1.0.0

> Inventory printer for metrics RRD4J reporter
> 
>
> Key: SLING-7063
> URL: https://issues.apache.org/jira/browse/SLING-7063
> Project: Sling
>  Issue Type: Improvement
>  Components: Commons
>Reporter: Marcel Reutegger
>Priority: Minor
> Fix For: Commons Metrics RRD4J 1.0.0
>
> Attachments: SLING-7063.patch
>
>
> The metrics reporter introduce with SLING-7055 should implement an inventory 
> printer and include the metrics in the configuration status zip file.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Created] (SLING-7071) Rename metrics file on configuration change

2017-08-22 Thread Marcel Reutegger (JIRA)
Marcel Reutegger created SLING-7071:
---

 Summary: Rename metrics file on configuration change
 Key: SLING-7071
 URL: https://issues.apache.org/jira/browse/SLING-7071
 Project: Sling
  Issue Type: Improvement
  Components: Commons
Reporter: Marcel Reutegger
Priority: Minor
 Fix For: Commons Metrics RRD4J 1.0.0


The metrics reporter introduced in SLING-7055 overwrites an existing metrics 
file when the configuration is changed. It would be more useful to keep an 
existing file by renaming it. Otherwise valuable metrics data gathered so far 
is lost. 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (SLING-7063) Inventory printer for metrics RRD4J reporter

2017-08-18 Thread Marcel Reutegger (JIRA)

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

Marcel Reutegger updated SLING-7063:

Attachment: SLING-7063.patch

Proposed enhancement attached in [^SLING-7063.patch].

> Inventory printer for metrics RRD4J reporter
> 
>
> Key: SLING-7063
> URL: https://issues.apache.org/jira/browse/SLING-7063
> Project: Sling
>  Issue Type: Improvement
>  Components: Commons
>Reporter: Marcel Reutegger
>Priority: Minor
> Attachments: SLING-7063.patch
>
>
> The metrics reporter introduce with SLING-7055 should implement an inventory 
> printer and include the metrics in the configuration status zip file.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Created] (SLING-7063) Inventory printer for metrics RRD4J reporter

2017-08-18 Thread Marcel Reutegger (JIRA)
Marcel Reutegger created SLING-7063:
---

 Summary: Inventory printer for metrics RRD4J reporter
 Key: SLING-7063
 URL: https://issues.apache.org/jira/browse/SLING-7063
 Project: Sling
  Issue Type: Improvement
  Components: Commons
Reporter: Marcel Reutegger
Priority: Minor


The metrics reporter introduce with SLING-7055 should implement an inventory 
printer and include the metrics in the configuration status zip file.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (SLING-7062) Commons metrics inventory closes zip

2017-08-18 Thread Marcel Reutegger (JIRA)

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

Marcel Reutegger updated SLING-7062:

Attachment: SLING-7062.patch

Attached proposed fix.

> Commons metrics inventory closes zip
> 
>
> Key: SLING-7062
> URL: https://issues.apache.org/jira/browse/SLING-7062
> Project: Sling
>  Issue Type: Bug
>  Components: Commons
>Affects Versions: Commons Metrics 1.0.0
>Reporter: Marcel Reutegger
>Priority: Minor
> Attachments: SLING-7062.patch
>
>
> The inventory printer implementation of {{MetricWebConsolePlugin}} closes the 
> passed {{PrintWriter}} though {{ConsoleReporter.close()}}. This aborts the 
> configuration status zip generation process and subsequent inventory printer 
> output is missing.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Created] (SLING-7062) Commons metrics inventory closes zip

2017-08-18 Thread Marcel Reutegger (JIRA)
Marcel Reutegger created SLING-7062:
---

 Summary: Commons metrics inventory closes zip
 Key: SLING-7062
 URL: https://issues.apache.org/jira/browse/SLING-7062
 Project: Sling
  Issue Type: Bug
  Components: Commons
Affects Versions: Commons Metrics 1.0.0
Reporter: Marcel Reutegger
Priority: Minor


The inventory printer implementation of {{MetricWebConsolePlugin}} closes the 
passed {{PrintWriter}} though {{ConsoleReporter.close()}}. This aborts the 
configuration status zip generation process and subsequent inventory printer 
output is missing.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SLING-7055) RRD4J metrics reporter

2017-08-18 Thread Marcel Reutegger (JIRA)

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

Marcel Reutegger commented on SLING-7055:
-

It appears the svn:ignore properties at the end of the patch were not properly 
applied. [~rombert], would you mind setting them manually as listed in the 
patch?

> RRD4J metrics reporter
> --
>
> Key: SLING-7055
> URL: https://issues.apache.org/jira/browse/SLING-7055
> Project: Sling
>  Issue Type: New Feature
>  Components: Extensions
>Reporter: Marcel Reutegger
>Assignee: Robert Munteanu
>Priority: Minor
> Fix For: Commons Metrics RRD4J 1.0.0
>
> Attachments: SLING-7055.patch, SLING-7055.patch, SLING-7055.patch, 
> SLING-7055.patch, SLING-7055.patch
>
>
> SLING-4080 introduced metrics in Sling. The proposal in this issue adds a new 
> commons module which writes those metrics to a time series database on the 
> local filesystem. The primary purpose is tracking metrics for diagnostics.
> The bundle uses [RRD4J|https://github.com/rrd4j/rrd4j] as the time series 
> database implementation. The library is Apache License, Version 2.0.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (SLING-7055) RRD4J metrics reporter

2017-08-18 Thread Marcel Reutegger (JIRA)

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

Marcel Reutegger updated SLING-7055:

Attachment: SLING-7055.patch

One more update of the patch. I decided to add another default archive 
definition to smoothen the change in granularity between per minute and per 
hour averages. There is now also a default archive per five minutes for 48 
hours.

> RRD4J metrics reporter
> --
>
> Key: SLING-7055
> URL: https://issues.apache.org/jira/browse/SLING-7055
> Project: Sling
>  Issue Type: New Feature
>  Components: Extensions
>Reporter: Marcel Reutegger
>Assignee: Robert Munteanu
>Priority: Minor
> Attachments: SLING-7055.patch, SLING-7055.patch, SLING-7055.patch, 
> SLING-7055.patch, SLING-7055.patch
>
>
> SLING-4080 introduced metrics in Sling. The proposal in this issue adds a new 
> commons module which writes those metrics to a time series database on the 
> local filesystem. The primary purpose is tracking metrics for diagnostics.
> The bundle uses [RRD4J|https://github.com/rrd4j/rrd4j] as the time series 
> database implementation. The library is Apache License, Version 2.0.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (SLING-7055) RRD4J metrics reporter

2017-08-18 Thread Marcel Reutegger (JIRA)

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

Marcel Reutegger updated SLING-7055:

Attachment: SLING-7055.patch

Updated patch accordingly.

> RRD4J metrics reporter
> --
>
> Key: SLING-7055
> URL: https://issues.apache.org/jira/browse/SLING-7055
> Project: Sling
>  Issue Type: New Feature
>  Components: Extensions
>Reporter: Marcel Reutegger
>Assignee: Robert Munteanu
>Priority: Minor
> Attachments: SLING-7055.patch, SLING-7055.patch, SLING-7055.patch, 
> SLING-7055.patch
>
>
> SLING-4080 introduced metrics in Sling. The proposal in this issue adds a new 
> commons module which writes those metrics to a time series database on the 
> local filesystem. The primary purpose is tracking metrics for diagnostics.
> The bundle uses [RRD4J|https://github.com/rrd4j/rrd4j] as the time series 
> database implementation. The library is Apache License, Version 2.0.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (SLING-7055) RRD4J metrics reporter

2017-08-17 Thread Marcel Reutegger (JIRA)

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

Marcel Reutegger updated SLING-7055:

Attachment: SLING-7055.patch

Yet another update of the patch incorporating Carsten's hint.

Thanks for all the feedback so far.

> RRD4J metrics reporter
> --
>
> Key: SLING-7055
> URL: https://issues.apache.org/jira/browse/SLING-7055
> Project: Sling
>  Issue Type: New Feature
>  Components: Extensions
>Reporter: Marcel Reutegger
>Assignee: Robert Munteanu
>Priority: Minor
> Attachments: SLING-7055.patch, SLING-7055.patch, SLING-7055.patch
>
>
> SLING-4080 introduced metrics in Sling. The proposal in this issue adds a new 
> commons module which writes those metrics to a time series database on the 
> local filesystem. The primary purpose is tracking metrics for diagnostics.
> The bundle uses [RRD4J|https://github.com/rrd4j/rrd4j] as the time series 
> database implementation. The library is Apache License, Version 2.0.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SLING-7055) RRD4J metrics reporter

2017-08-17 Thread Marcel Reutegger (JIRA)

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

Marcel Reutegger commented on SLING-7055:
-

bq. However I hope that an absolute path works as well

Nope, it doesn't but that's a good point. I'll update the patch accordingly.

> RRD4J metrics reporter
> --
>
> Key: SLING-7055
> URL: https://issues.apache.org/jira/browse/SLING-7055
> Project: Sling
>  Issue Type: New Feature
>  Components: Extensions
>Reporter: Marcel Reutegger
>Assignee: Robert Munteanu
>Priority: Minor
> Attachments: SLING-7055.patch, SLING-7055.patch
>
>
> SLING-4080 introduced metrics in Sling. The proposal in this issue adds a new 
> commons module which writes those metrics to a time series database on the 
> local filesystem. The primary purpose is tracking metrics for diagnostics.
> The bundle uses [RRD4J|https://github.com/rrd4j/rrd4j] as the time series 
> database implementation. The library is Apache License, Version 2.0.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SLING-7055) RRD4J metrics reporter

2017-08-17 Thread Marcel Reutegger (JIRA)

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

Marcel Reutegger commented on SLING-7055:
-

The framework property is optional. The component also works without it. The 
description of the configuration attribute says:
{noformat}
@AttributeDefinition(
name = "Path",
description = "Path of the RRD file where metrics are stored. " 
+
"The path is resolved relative to the 'sling.home' " +
"path when available, otherwise relative to the current 
" +
"working directory."
)
String path() default "metrics/metrics.rrd";
{noformat}

If this is considered bad practice, then I would rather rely on the settings 
service and have the bundle in extensions.

> RRD4J metrics reporter
> --
>
> Key: SLING-7055
> URL: https://issues.apache.org/jira/browse/SLING-7055
> Project: Sling
>  Issue Type: New Feature
>  Components: Extensions
>Reporter: Marcel Reutegger
>Assignee: Robert Munteanu
>Priority: Minor
> Attachments: SLING-7055.patch, SLING-7055.patch
>
>
> SLING-4080 introduced metrics in Sling. The proposal in this issue adds a new 
> commons module which writes those metrics to a time series database on the 
> local filesystem. The primary purpose is tracking metrics for diagnostics.
> The bundle uses [RRD4J|https://github.com/rrd4j/rrd4j] as the time series 
> database implementation. The library is Apache License, Version 2.0.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (SLING-7055) RRD4J metrics reporter

2017-08-17 Thread Marcel Reutegger (JIRA)

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

Marcel Reutegger updated SLING-7055:

Attachment: SLING-7055.patch

Thanks, I went with the framework property. See updated patch.

> RRD4J metrics reporter
> --
>
> Key: SLING-7055
> URL: https://issues.apache.org/jira/browse/SLING-7055
> Project: Sling
>  Issue Type: New Feature
>  Components: Extensions
>Reporter: Marcel Reutegger
>Assignee: Robert Munteanu
>Priority: Minor
> Attachments: SLING-7055.patch, SLING-7055.patch
>
>
> SLING-4080 introduced metrics in Sling. The proposal in this issue adds a new 
> commons module which writes those metrics to a time series database on the 
> local filesystem. The primary purpose is tracking metrics for diagnostics.
> The bundle uses [RRD4J|https://github.com/rrd4j/rrd4j] as the time series 
> database implementation. The library is Apache License, Version 2.0.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SLING-7055) RRD4J metrics reporter

2017-08-17 Thread Marcel Reutegger (JIRA)

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

Marcel Reutegger commented on SLING-7055:
-

Thanks for the feedback.

bq. remove the link to the Sling settings

I'd love to remove that dependency, but at the same time I don't want to rely 
on the directory where the Java process was started. Is there a Sling property 
I could use as the base directory when Sling is present?

bq. The bundle uses guava, but in quite a limited manner. We try to avoid this 
dependency since it's quite heavyweight and problematic in terms of backwards 
compatibility. Could you remove that dependency?

Sure, will do and update the patch.

> RRD4J metrics reporter
> --
>
> Key: SLING-7055
> URL: https://issues.apache.org/jira/browse/SLING-7055
> Project: Sling
>  Issue Type: New Feature
>  Components: Extensions
>Reporter: Marcel Reutegger
>Assignee: Robert Munteanu
>Priority: Minor
> Attachments: SLING-7055.patch
>
>
> SLING-4080 introduced metrics in Sling. The proposal in this issue adds a new 
> commons module which writes those metrics to a time series database on the 
> local filesystem. The primary purpose is tracking metrics for diagnostics.
> The bundle uses [RRD4J|https://github.com/rrd4j/rrd4j] as the time series 
> database implementation. The library is Apache License, Version 2.0.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (SLING-7055) RRD4J metrics reporter

2017-08-17 Thread Marcel Reutegger (JIRA)

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

Marcel Reutegger updated SLING-7055:

Attachment: SLING-7055.patch

Attached proposed new module in [^SLING-7055.patch].

> RRD4J metrics reporter
> --
>
> Key: SLING-7055
> URL: https://issues.apache.org/jira/browse/SLING-7055
> Project: Sling
>  Issue Type: New Feature
>  Components: Commons
>Reporter: Marcel Reutegger
>Priority: Minor
> Attachments: SLING-7055.patch
>
>
> SLING-4080 introduced metrics in Sling. The proposal in this issue adds a new 
> commons module which writes those metrics to a time series database on the 
> local filesystem. The primary purpose is tracking metrics for diagnostics.
> The bundle uses [RRD4J|https://github.com/rrd4j/rrd4j] as the time series 
> database implementation. The library is Apache License, Version 2.0.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Created] (SLING-7055) RRD4J metrics reporter

2017-08-17 Thread Marcel Reutegger (JIRA)
Marcel Reutegger created SLING-7055:
---

 Summary: RRD4J metrics reporter
 Key: SLING-7055
 URL: https://issues.apache.org/jira/browse/SLING-7055
 Project: Sling
  Issue Type: New Feature
  Components: Commons
Reporter: Marcel Reutegger
Priority: Minor


SLING-4080 introduced metrics in Sling. The proposal in this issue adds a new 
commons module which writes those metrics to a time series database on the 
local filesystem. The primary purpose is tracking metrics for diagnostics.

The bundle uses [RRD4J|https://github.com/rrd4j/rrd4j] as the time series 
database implementation. The library is Apache License, Version 2.0.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SLING-7037) Scheduler does not retain provided name

2017-08-09 Thread Marcel Reutegger (JIRA)

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

Marcel Reutegger commented on SLING-7037:
-

bq. for whiteboard registered jobs: if a name is part of the properties, this 
name is used as is for the provided name; the name itself is still made unique 
using the service id.

Why is it made unique with the service id? I understand the service id may not 
always be the same across cluster nodes, which can result in a situation where 
a registered job with 'runOn:single' on multiple cluster nodes does not run at 
all. If I provide a name, shouldn't the scheduler use it as is? 

> Scheduler does not retain provided name
> ---
>
> Key: SLING-7037
> URL: https://issues.apache.org/jira/browse/SLING-7037
> Project: Sling
>  Issue Type: Bug
>  Components: Commons
>Affects Versions: Commons Scheduler 2.6.0
>Reporter: Marcel Reutegger
>Assignee: Carsten Ziegeler
>Priority: Minor
> Fix For: Commons Scheduler 2.6.4
>
> Attachments: SLING-7037-test.patch
>
>
> The scheduler does not retain the provided name for the job as introduced in 
> SLING-5387.
> The value returned by the JobDataMap is a generated name that include the 
> service id.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (SLING-7037) Scheduler does not retain provided name

2017-08-08 Thread Marcel Reutegger (JIRA)

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

Marcel Reutegger updated SLING-7037:

Attachment: SLING-7037-test.patch

Attached [^SLING-7037-test.patch] containing a test which shows the described 
behaviour.

> Scheduler does not retain provided name
> ---
>
> Key: SLING-7037
> URL: https://issues.apache.org/jira/browse/SLING-7037
> Project: Sling
>  Issue Type: Bug
>  Components: Commons
>Affects Versions: Commons Scheduler 2.6.0
>Reporter: Marcel Reutegger
>Assignee: Carsten Ziegeler
>Priority: Minor
> Fix For: Commons Scheduler 2.6.4
>
> Attachments: SLING-7037-test.patch
>
>
> The scheduler does not retain the provided name for the job as introduced in 
> SLING-5387.
> The value returned by the JobDataMap is a generated name that include the 
> service id.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Created] (SLING-7037) Scheduler does not retain provided name

2017-08-08 Thread Marcel Reutegger (JIRA)
Marcel Reutegger created SLING-7037:
---

 Summary: Scheduler does not retain provided name
 Key: SLING-7037
 URL: https://issues.apache.org/jira/browse/SLING-7037
 Project: Sling
  Issue Type: Bug
  Components: Commons
Affects Versions: Commons Scheduler 2.6.0
Reporter: Marcel Reutegger
Priority: Minor


The scheduler does not retain the provided name for the job as introduced in 
SLING-5387.

The value returned by the JobDataMap is a generated name that include the 
service id.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (SLING-6395) Reduce cost of JcrResourceBundleProvider.onChange()

2016-12-13 Thread Marcel Reutegger (JIRA)

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

Marcel Reutegger updated SLING-6395:

Flags: Patch

> Reduce cost of JcrResourceBundleProvider.onChange()
> ---
>
> Key: SLING-6395
> URL: https://issues.apache.org/jira/browse/SLING-6395
> Project: Sling
>  Issue Type: Improvement
>  Components: i18n
>Reporter: Marcel Reutegger
>Priority: Minor
> Fix For: i18n 2.5.6
>
> Attachments: SLING-6395.patch
>
>
> JcrResourceBundleProvider.onChange() is somewhat expensive because it 
> refreshes the resource resolver in every call to isDictionaryResource(). It 
> is sufficient to call it once in onChange().



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


[jira] [Updated] (SLING-6395) Reduce cost of JcrResourceBundleProvider.onChange()

2016-12-13 Thread Marcel Reutegger (JIRA)

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

Marcel Reutegger updated SLING-6395:

Attachment: SLING-6395.patch

Attached patch with proposed changes.

> Reduce cost of JcrResourceBundleProvider.onChange()
> ---
>
> Key: SLING-6395
> URL: https://issues.apache.org/jira/browse/SLING-6395
> Project: Sling
>  Issue Type: Improvement
>  Components: i18n
>Reporter: Marcel Reutegger
>Priority: Minor
> Fix For: i18n 2.5.6
>
> Attachments: SLING-6395.patch
>
>
> JcrResourceBundleProvider.onChange() is somewhat expensive because it 
> refreshes the resource resolver in every call to isDictionaryResource(). It 
> is sufficient to call it once in onChange().



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


[jira] [Created] (SLING-6395) Reduce cost of JcrResourceBundleProvider.onChange()

2016-12-13 Thread Marcel Reutegger (JIRA)
Marcel Reutegger created SLING-6395:
---

 Summary: Reduce cost of JcrResourceBundleProvider.onChange()
 Key: SLING-6395
 URL: https://issues.apache.org/jira/browse/SLING-6395
 Project: Sling
  Issue Type: Improvement
  Components: i18n
Reporter: Marcel Reutegger
Priority: Minor
 Fix For: i18n 2.5.6


JcrResourceBundleProvider.onChange() is somewhat expensive because it refreshes 
the resource resolver in every call to isDictionaryResource(). It is sufficient 
to call it once in onChange().



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


[jira] [Commented] (SLING-6227) Disable versioning for chunk nodes

2016-11-02 Thread Marcel Reutegger (JIRA)

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

Marcel Reutegger commented on SLING-6227:
-

I think it would be best to define the on-parent-version action on the 
sling:chunks node type. This is the node type used for the parent node of the 
sling:chunk nodes. The current definition looks like this:

{noformat}
[sling:chunks]
  mixin
  - sling:fileLength (long)
  - sling:length (long)
  + * (sling:chunk) multiple
{noformat}

If we don't want to version the chunks we can set the on-parent-version action 
to ignore:

{noformat}
[sling:chunks]
  mixin
  - sling:fileLength (long) ignore
  - sling:length (long) ignore
  + * (sling:chunk) multiple ignore
{noformat}

With your sample data you provided, the frozen node would still have a 
jcr:content child node with a jcr:frozenMixinTypes that includes sling:chunks, 
but none of the properties and child nodes defined in sling:chunks. Similarly, 
on restore of this version the versionable node would have the mixin but none 
of the ignored items. I think that's fine, because they are not mandatory.

The change should also be backward compatible, because it does not require 
changes to existing data. 

> Disable versioning for chunk nodes
> --
>
> Key: SLING-6227
> URL: https://issues.apache.org/jira/browse/SLING-6227
> Project: Sling
>  Issue Type: Improvement
>  Components: Servlets
>Reporter: Chetan Mehrotra
>Assignee: Chetan Mehrotra
> Fix For: Servlets Post 2.3.16
>
>
> While analyzing some customer setup it was found that {{sling:chunk}} nodes 
> are getting stored in version store and thus preventing the temporary files 
> created from getting garbage collection.
> {noformat}
> /jcr:system/jcr:versionStorage/13/6a/9c/136a9c8d-4dd8-42e5-bced-67eec6ad8a3e/1.3/jcr:frozenNode/jcr:content/chunk_7500_7999
> /jcr:system/jcr:versionStorage/13/6a/9c/136a9c8d-4dd8-42e5-bced-67eec6ad8a3e/1.3/jcr:frozenNode/jcr:content/chunk_6000_6499
> /jcr:system/jcr:versionStorage/13/6a/9c/136a9c8d-4dd8-42e5-bced-67eec6ad8a3e/1.3/jcr:frozenNode/jcr:content/chunk_4500_4999
> /jcr:system/jcr:versionStorage/13/6a/9c/136a9c8d-4dd8-42e5-bced-67eec6ad8a3e/1.3/jcr:frozenNode/jcr:content/chunk_2000_2499
> /jcr:system/jcr:versionStorage/13/6a/9c/136a9c8d-4dd8-42e5-bced-67eec6ad8a3e/1.3/jcr:frozenNode/jcr:content/chunk_10500_10999
> /jcr:system/jcr:versionStorage/13/6a/9c/136a9c8d-4dd8-42e5-bced-67eec6ad8a3e/1.3/jcr:frozenNode/jcr:content/chunk_11000_11499>
>  pn
> { jcr:primaryType = nt:frozenNode, jcr:createdBy = admin, 
> jcr:frozenPrimaryType = sling:chunk, sling:offset = 11000, jcr:created = 
> 2015-12-10T22:23:13.409-05:00, jcr:frozenUuid = 
> 136a9c8d-4dd8-42e5-bced-67eec6ad8a3e/jcr:content/chunk_11000_11499, 
> jcr:data = {-1 bytes}, jcr:uuid = a98d131c-4892-42d4-aa15-4bb0402b176d }
> {noformat}
> This can be fixed by tweaking the nodetype definition for sling:chunks to 
> disable versioning for sling:chunk nodes



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


[jira] [Created] (SLING-4899) Background servlet not cluster aware

2015-07-23 Thread Marcel Reutegger (JIRA)
Marcel Reutegger created SLING-4899:
---

 Summary: Background servlet not cluster aware
 Key: SLING-4899
 URL: https://issues.apache.org/jira/browse/SLING-4899
 Project: Sling
  Issue Type: Bug
  Components: Extensions
Affects Versions: Background Servlets 1.0.0
Reporter: Marcel Reutegger


The background servlet creates stream nodes under a configurable path with a 
local counter. When running in a cluster, it may happen that background 
servlets on multiple cluster nodes try to create the same stream node.

{noformat}
java.lang.IllegalArgumentException: Stream node already exists: 
/var/bg/jobs/2015/07/17/15/51/82/stream
at 
org.apache.sling.bgservlets.impl.storage.JobDataImpl.getOutputStream(JobDataImpl.java:74)
at org.apache.sling.bgservlets.impl.BackgroundRequestExecutionJob.init
{noformat}

It would probably be good to include the slingId in the path prefix to separate 
streams from different cluster nodes. A similar approach is implemented already 
for sling jobs.



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


[jira] [Commented] (SLING-3883) Merging partial bundle list with properties fails

2014-09-01 Thread Marcel Reutegger (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-3883?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14117362#comment-14117362
 ] 

Marcel Reutegger commented on SLING-3883:
-

Any feedback on this?

 Merging partial bundle list with properties fails
 -

 Key: SLING-3883
 URL: https://issues.apache.org/jira/browse/SLING-3883
 Project: Sling
  Issue Type: Bug
  Components: Maven Plugins and Archetypes
Affects Versions: Maven Launchpad Plugin 2.3.0
Reporter: Marcel Reutegger
Priority: Minor
 Attachments: SLING-3883.patch


 Merging a partial bundle list fails when the current list contains references 
 to properties e.g. in the POM.
 In my case I want to override a dependency and have the actual version 
 defined as a property in the POM. I get an error like this when I run my 
 build:
 {noformat}
 Caused by: java.lang.IllegalArgumentException: invalid qualifier: 
 ${oak_version}
   at org.osgi.framework.Version.validate(Version.java:188)
   at org.osgi.framework.Version.init(Version.java:154)
   at 
 org.apache.sling.maven.projectsupport.bundlelist.BaseBundleList.add(BaseBundleList.java:93)
   at 
 org.apache.sling.maven.projectsupport.bundlelist.BaseBundleList.merge(BaseBundleList.java:64)
   at 
 org.apache.sling.maven.projectsupport.AbstractUsingBundleListMojo.initBundleList(AbstractUsingBundleListMojo.java:269)
   at 
 org.apache.sling.maven.projectsupport.AbstractUsingBundleListMojo.execute(AbstractUsingBundleListMojo.java:172)
 {noformat}
 The actual version is resolved too late in 
 {{AbstractUsingBundleListMojo.initBundleList()}}.



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


[jira] [Created] (SLING-3883) Merging partial bundle list with properties fails

2014-08-26 Thread Marcel Reutegger (JIRA)
Marcel Reutegger created SLING-3883:
---

 Summary: Merging partial bundle list with properties fails
 Key: SLING-3883
 URL: https://issues.apache.org/jira/browse/SLING-3883
 Project: Sling
  Issue Type: Bug
  Components: Maven Plugins and Archetypes
Affects Versions: Maven Launchpad Plugin 2.3.0
Reporter: Marcel Reutegger
Priority: Minor


Merging a partial bundle list fails when the current list contains references 
to properties e.g. in the POM.

In my case I want to override a dependency and have the actual version defined 
as a property in the POM. I get an error like this when I run my build:
{noformat}
Caused by: java.lang.IllegalArgumentException: invalid qualifier: ${oak_version}
at org.osgi.framework.Version.validate(Version.java:188)
at org.osgi.framework.Version.init(Version.java:154)
at 
org.apache.sling.maven.projectsupport.bundlelist.BaseBundleList.add(BaseBundleList.java:93)
at 
org.apache.sling.maven.projectsupport.bundlelist.BaseBundleList.merge(BaseBundleList.java:64)
at 
org.apache.sling.maven.projectsupport.AbstractUsingBundleListMojo.initBundleList(AbstractUsingBundleListMojo.java:269)
at 
org.apache.sling.maven.projectsupport.AbstractUsingBundleListMojo.execute(AbstractUsingBundleListMojo.java:172)

{noformat}

The actual version is resolved too late in 
{{AbstractUsingBundleListMojo.initBundleList()}}.




--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (SLING-3883) Merging partial bundle list with properties fails

2014-08-26 Thread Marcel Reutegger (JIRA)

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

Marcel Reutegger updated SLING-3883:


Attachment: SLING-3883.patch

Proposed fix.

Not sure if the call to {{interpolateProperties()}} towards the end of the 
method is still necessary but I guess there's a chance 
{{initBundleList(BundleList)}} introduces dependencies that must be resolved 
with properties.

 Merging partial bundle list with properties fails
 -

 Key: SLING-3883
 URL: https://issues.apache.org/jira/browse/SLING-3883
 Project: Sling
  Issue Type: Bug
  Components: Maven Plugins and Archetypes
Affects Versions: Maven Launchpad Plugin 2.3.0
Reporter: Marcel Reutegger
Priority: Minor
 Attachments: SLING-3883.patch


 Merging a partial bundle list fails when the current list contains references 
 to properties e.g. in the POM.
 In my case I want to override a dependency and have the actual version 
 defined as a property in the POM. I get an error like this when I run my 
 build:
 {noformat}
 Caused by: java.lang.IllegalArgumentException: invalid qualifier: 
 ${oak_version}
   at org.osgi.framework.Version.validate(Version.java:188)
   at org.osgi.framework.Version.init(Version.java:154)
   at 
 org.apache.sling.maven.projectsupport.bundlelist.BaseBundleList.add(BaseBundleList.java:93)
   at 
 org.apache.sling.maven.projectsupport.bundlelist.BaseBundleList.merge(BaseBundleList.java:64)
   at 
 org.apache.sling.maven.projectsupport.AbstractUsingBundleListMojo.initBundleList(AbstractUsingBundleListMojo.java:269)
   at 
 org.apache.sling.maven.projectsupport.AbstractUsingBundleListMojo.execute(AbstractUsingBundleListMojo.java:172)
 {noformat}
 The actual version is resolved too late in 
 {{AbstractUsingBundleListMojo.initBundleList()}}.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (SLING-2885) Race condition in VotingHandler.promote()

2013-05-27 Thread Marcel Reutegger (JIRA)

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

Marcel Reutegger updated SLING-2885:


Attachment: error.log

error.log with debug messages for VotingHandler.

 Race condition in VotingHandler.promote()
 -

 Key: SLING-2885
 URL: https://issues.apache.org/jira/browse/SLING-2885
 Project: Sling
  Issue Type: Bug
  Components: Extensions
Affects Versions: Discovery Impl 1.0.0
 Environment: Discovery Impl version: 0.1.0.R1484784
Reporter: Marcel Reutegger
Priority: Minor
 Attachments: error.log


 Sometimes on initial startup of Sling Discovery it happens that two threads 
 try to promote the same winning vote at the same time. This leads to a failed 
 commit in the repository. The system seems to be OK after the exception. 
 There is an established view and the (single) cluster node is the leader.
 Please note, this is running on Jackrabbit Oak, but might also happen on 
 Jackrabbit 2.x because the basic issue is two sessions trying to add the same 
 child node.
 See attached log excerpt for more details.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Created] (SLING-2885) Race condition in VotingHandler.promote()

2013-05-27 Thread Marcel Reutegger (JIRA)
Marcel Reutegger created SLING-2885:
---

 Summary: Race condition in VotingHandler.promote()
 Key: SLING-2885
 URL: https://issues.apache.org/jira/browse/SLING-2885
 Project: Sling
  Issue Type: Bug
  Components: Extensions
Affects Versions: Discovery Impl 1.0.0
 Environment: Discovery Impl version: 0.1.0.R1484784
Reporter: Marcel Reutegger
Priority: Minor
 Attachments: error.log

Sometimes on initial startup of Sling Discovery it happens that two threads try 
to promote the same winning vote at the same time. This leads to a failed 
commit in the repository. The system seems to be OK after the exception. There 
is an established view and the (single) cluster node is the leader.

Please note, this is running on Jackrabbit Oak, but might also happen on 
Jackrabbit 2.x because the basic issue is two sessions trying to add the same 
child node.

See attached log excerpt for more details.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Created] (SLING-2650) Speed up JcrPropertyMapCacheEntry

2012-11-05 Thread Marcel Reutegger (JIRA)
Marcel Reutegger created SLING-2650:
---

 Summary: Speed up JcrPropertyMapCacheEntry
 Key: SLING-2650
 URL: https://issues.apache.org/jira/browse/SLING-2650
 Project: Sling
  Issue Type: Improvement
  Components: JCR
Affects Versions: JCR Resource 2.1.0
Reporter: Marcel Reutegger
Priority: Minor
 Attachments: SLING-2650.patch

JcrPropertyMapCacheEntry (as well as JcrResourceUtil) retrieve the 
PropertyDefinition to find out whether a Property is multi-valued or not. At 
least in Apache Jackrabbit and Apache Oak this is more expensive than simply 
calling Property.isMultiple() because it has to evaluate node type information.

Both JcrPropertyMapCacheEntry and JcrResourceUtil should rather use the method 
on Property.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (SLING-2650) Speed up JcrPropertyMapCacheEntry

2012-11-05 Thread Marcel Reutegger (JIRA)

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

Marcel Reutegger updated SLING-2650:


Attachment: SLING-2650.patch

Proposed changes.

 Speed up JcrPropertyMapCacheEntry
 -

 Key: SLING-2650
 URL: https://issues.apache.org/jira/browse/SLING-2650
 Project: Sling
  Issue Type: Improvement
  Components: JCR
Affects Versions: JCR Resource 2.1.0
Reporter: Marcel Reutegger
Priority: Minor
 Attachments: SLING-2650.patch


 JcrPropertyMapCacheEntry (as well as JcrResourceUtil) retrieve the 
 PropertyDefinition to find out whether a Property is multi-valued or not. At 
 least in Apache Jackrabbit and Apache Oak this is more expensive than simply 
 calling Property.isMultiple() because it has to evaluate node type 
 information.
 Both JcrPropertyMapCacheEntry and JcrResourceUtil should rather use the 
 method on Property.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] Created: (SLING-1956) ConfigNodeConverter throws NPE on config with empty multi-valued property

2011-01-26 Thread Marcel Reutegger (JIRA)
ConfigNodeConverter throws NPE on config with empty multi-valued property
-

 Key: SLING-1956
 URL: https://issues.apache.org/jira/browse/SLING-1956
 Project: Sling
  Issue Type: Bug
  Components: Installer
Affects Versions: JCR Installer 3.0.2
Reporter: Marcel Reutegger


25.01.2011 22:24:33.270 *ERROR* [JcrInstaller.1] 
org.apache.sling.extensions.threaddump.internal.Activator Uncaught exception in 
Thread Thread[JcrInstaller.1,5,main] java.lang.NullPointerException
at java.util.Hashtable.put(Hashtable.java:394)
at 
org.apache.sling.installer.provider.jcr.impl.ConfigNodeConverter.loadProperties(ConfigNodeConverter.java:103)
at 
org.apache.sling.installer.provider.jcr.impl.ConfigNodeConverter.load(ConfigNodeConverter.java:76)
at 
org.apache.sling.installer.provider.jcr.impl.ConfigNodeConverter.convertNode(ConfigNodeConverter.java:59)
at 
org.apache.sling.installer.provider.jcr.impl.WatchedFolder.scan(WatchedFolder.java:149)
at 
org.apache.sling.installer.provider.jcr.impl.JcrInstaller$StoppableThread.run(JcrInstaller.java:187)


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (SLING-1956) ConfigNodeConverter throws NPE on config with empty multi-valued property

2011-01-26 Thread Marcel Reutegger (JIRA)

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

Marcel Reutegger updated SLING-1956:


Attachment: SLING-1956.patch

Proposed patch.

 ConfigNodeConverter throws NPE on config with empty multi-valued property
 -

 Key: SLING-1956
 URL: https://issues.apache.org/jira/browse/SLING-1956
 Project: Sling
  Issue Type: Bug
  Components: Installer
Affects Versions: JCR Installer 3.0.2
Reporter: Marcel Reutegger
 Attachments: SLING-1956.patch


 25.01.2011 22:24:33.270 *ERROR* [JcrInstaller.1] 
 org.apache.sling.extensions.threaddump.internal.Activator Uncaught exception 
 in Thread Thread[JcrInstaller.1,5,main] java.lang.NullPointerException
   at java.util.Hashtable.put(Hashtable.java:394)
   at 
 org.apache.sling.installer.provider.jcr.impl.ConfigNodeConverter.loadProperties(ConfigNodeConverter.java:103)
   at 
 org.apache.sling.installer.provider.jcr.impl.ConfigNodeConverter.load(ConfigNodeConverter.java:76)
   at 
 org.apache.sling.installer.provider.jcr.impl.ConfigNodeConverter.convertNode(ConfigNodeConverter.java:59)
   at 
 org.apache.sling.installer.provider.jcr.impl.WatchedFolder.scan(WatchedFolder.java:149)
   at 
 org.apache.sling.installer.provider.jcr.impl.JcrInstaller$StoppableThread.run(JcrInstaller.java:187)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (SLING-1116) FORM Based Authentication

2010-02-01 Thread Marcel Reutegger (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-1116?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12828034#action_12828034
 ] 

Marcel Reutegger commented on SLING-1116:
-

 HttpServletRequest.getRemoteAddress()

this method returns the address of the client or the last proxy that sent the 
request. if there is indeed a proxy in between, then this may hide that a 
request is possibly sent from a different client.

 FORM Based Authentication
 -

 Key: SLING-1116
 URL: https://issues.apache.org/jira/browse/SLING-1116
 Project: Sling
  Issue Type: New Feature
  Components: Extensions
Reporter: Eric Norman
Assignee: Felix Meschberger
 Attachments: org.apache.sling.cookieauth.zip, 
 org.apache.sling.sessionauth.zip, SLING_1116_jackrabbit_server_patch.txt, 
 updated_org.apache.sling.cookieauth.zip


 This is a new bundle that provides an implementation of forms based 
 authentication for sling.
 The login/logout servlets from the org.apache.sling.commons.auth are used.
 The AuthenticationHandler will use http basic auth credentials if they are on 
 the request, otherwise it will use the user/pwd posted from the login form.
 The login form html is generated by a set of scripts
 1. login.html.esp - full login page (includes login_body.html.esp for the 
 form markup)
 2. login_body.html.esp   - just the login form, which may be useful for 
 drawing the login form for an ajax context
 3. loginError.html.esp   - full login-error page
 4. loginError_body.html.esp  - just the login-error form, for login error in 
 ajax context
 The above scripts are included as bundle-resources @ 
 /libs/sling/servlet/default
 The bundle also has a couple of test scripts to show some examples of usage:
 1. loginTest.html.esp  - shows who is logged in and links to login or logout
 2. loginTest2.html.esp - shows how a script can check permissions and show a 
 login page if the anonymous user doesn't have permission to see the page,
 Some examples of usage are:
 1. http://host:port/path/to/node.login.html   - show the login page and then 
 goto http://host:port/path/to/node after  authenticated
 2. http://host:port/path/to/node.login.html?s=.edit.html   - show the login 
 page and then goto http://host:port/path/to/node.edit.html after  
 authenticated
 3. http://host:port/system/sling/logout  - invalidate the session and switch 
 back to anonymous user

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (SLING-1305) SynchronousRefreshPackagesTask may miss PACKAGES_REFRESHED event

2010-01-20 Thread Marcel Reutegger (JIRA)

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

Marcel Reutegger updated SLING-1305:


Attachment: SLING-1305.patch

Proposed changes.

 SynchronousRefreshPackagesTask may miss PACKAGES_REFRESHED event
 

 Key: SLING-1305
 URL: https://issues.apache.org/jira/browse/SLING-1305
 Project: Sling
  Issue Type: Bug
  Components: Installer
Reporter: Marcel Reutegger
Priority: Minor
 Attachments: SLING-1305.patch


 From time to time I see a timeout warning logged by the 
 SynchronousRefreshPackagesTask in my system, triggered by a bundle update in 
 the repository. In most cases the event is received within a reasonably time 
 frame, but in some cases the event is not received and the time limit of 30 
 seconds is reached.
 When an update works fine, the log messages are something like (debug enabled 
 for osgi installer):
 *DEBUG* [FelixDispatchQueue] org.apache.sling.osgi.installer 
 FrameworkEvent.PACKAGES_REFRESHED
 *INFO* [FelixDispatchQueue] org.apache.felix.framework FrameworkEvent 
 PACKAGES REFRESHED
 But when it doesn't, then there is only the info message.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.