[jira] [Commented] (OAK-6770) Convert oak-segment-tar to OSGi R6 annotations

2023-10-06 Thread Julian Reschke (Jira)


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

Julian Reschke commented on OAK-6770:
-

trunk: (1.9.7) 
[3322aa35b7|https://github.com/apache/jackrabbit-oak/commit/3322aa35b77340d1119e3fbba61731981dfdb7e7]
 
[a3c6b4e817|https://github.com/apache/jackrabbit-oak/commit/a3c6b4e817da60499503b7dae489d03dc4177443]
 (1.9.6) 
[d2beca3a9c|https://github.com/apache/jackrabbit-oak/commit/d2beca3a9ca51dedbff262be9889c0e7c0f099ad]
 (1.9.5) 
[1b89f51f90|https://github.com/apache/jackrabbit-oak/commit/1b89f51f909671af4dca8e09a592ce540f91505b]
 
[35845b6c10|https://github.com/apache/jackrabbit-oak/commit/35845b6c106ba0c30ef4f6b19b6ba981d1d1c7dd]
1.22: (1.9.7) 
[3322aa35b7|https://github.com/apache/jackrabbit-oak/commit/3322aa35b77340d1119e3fbba61731981dfdb7e7]
 
[a3c6b4e817|https://github.com/apache/jackrabbit-oak/commit/a3c6b4e817da60499503b7dae489d03dc4177443]
 (1.9.6) 
[d2beca3a9c|https://github.com/apache/jackrabbit-oak/commit/d2beca3a9ca51dedbff262be9889c0e7c0f099ad]
 (1.9.5) 
[1b89f51f90|https://github.com/apache/jackrabbit-oak/commit/1b89f51f909671af4dca8e09a592ce540f91505b]
 
[35845b6c10|https://github.com/apache/jackrabbit-oak/commit/35845b6c106ba0c30ef4f6b19b6ba981d1d1c7dd]

...in retired branches:
1.10: (1.9.7) 
[3322aa35b7|https://github.com/apache/jackrabbit-oak/commit/3322aa35b77340d1119e3fbba61731981dfdb7e7]
 
[a3c6b4e817|https://github.com/apache/jackrabbit-oak/commit/a3c6b4e817da60499503b7dae489d03dc4177443]
 (1.9.6) 
[d2beca3a9c|https://github.com/apache/jackrabbit-oak/commit/d2beca3a9ca51dedbff262be9889c0e7c0f099ad]
 (1.9.5) 
[1b89f51f90|https://github.com/apache/jackrabbit-oak/commit/1b89f51f909671af4dca8e09a592ce540f91505b]
 
[35845b6c10|https://github.com/apache/jackrabbit-oak/commit/35845b6c106ba0c30ef4f6b19b6ba981d1d1c7dd]

> Convert oak-segment-tar to OSGi R6 annotations
> --
>
> Key: OAK-6770
> URL: https://issues.apache.org/jira/browse/OAK-6770
> Project: Jackrabbit Oak
>  Issue Type: Technical task
>  Components: segment-tar
>Reporter: Robert Munteanu
>Assignee: Francesco Mari
>Priority: Blocker
>  Labels: osgi, technical_debt
> Fix For: 1.10.0, 1.9.7
>
> Attachments: OAK-6770-01.patch, OAK-6770-02.patch, unit-tests.log
>
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (OAK-6770) Convert oak-segment-tar to OSGi R6 annotations

2018-08-07 Thread Marcel Reutegger (JIRA)


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

Marcel Reutegger commented on OAK-6770:
---

Attached [^unit-tests.log]. These are the logs from running just the 
{{SecondaryStoreConfigIT}}.

> Convert oak-segment-tar to OSGi R6 annotations
> --
>
> Key: OAK-6770
> URL: https://issues.apache.org/jira/browse/OAK-6770
> Project: Jackrabbit Oak
>  Issue Type: Technical task
>  Components: segment-tar
>Reporter: Robert Munteanu
>Assignee: Francesco Mari
>Priority: Minor
>  Labels: osgi, technical_debt
> Fix For: 1.10, 1.9.7
>
> Attachments: OAK-6770-01.patch, OAK-6770-02.patch, unit-tests.log
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OAK-6770) Convert oak-segment-tar to OSGi R6 annotations

2018-08-07 Thread Francesco Mari (JIRA)


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

Francesco Mari commented on OAK-6770:
-

[~mreutegg], can you attach the logs at INFO level produced by the test?

> Convert oak-segment-tar to OSGi R6 annotations
> --
>
> Key: OAK-6770
> URL: https://issues.apache.org/jira/browse/OAK-6770
> Project: Jackrabbit Oak
>  Issue Type: Technical task
>  Components: segment-tar
>Reporter: Robert Munteanu
>Assignee: Francesco Mari
>Priority: Minor
>  Labels: osgi, technical_debt
> Fix For: 1.10, 1.9.7
>
> Attachments: OAK-6770-01.patch, OAK-6770-02.patch
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OAK-6770) Convert oak-segment-tar to OSGi R6 annotations

2018-07-30 Thread Francesco Mari (JIRA)


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

Francesco Mari commented on OAK-6770:
-

I attached a second version of the patch. [~dulceanu], you have more experience 
with the issue given your debugging work in OAK-7643. Can you quickly review 
the patch, or give me a list of tests that were failing with the previous 
version of the patch? I run the unit and integration tests on the whole project 
and couldn't spot any error.

> Convert oak-segment-tar to OSGi R6 annotations
> --
>
> Key: OAK-6770
> URL: https://issues.apache.org/jira/browse/OAK-6770
> Project: Jackrabbit Oak
>  Issue Type: Technical task
>  Components: segment-tar
>Reporter: Robert Munteanu
>Assignee: Francesco Mari
>Priority: Minor
>  Labels: osgi, technical_debt
> Fix For: 1.10
>
> Attachments: OAK-6770-01.patch, OAK-6770-02.patch
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OAK-6770) Convert oak-segment-tar to OSGi R6 annotations

2018-07-12 Thread Francesco Mari (JIRA)


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

Francesco Mari commented on OAK-6770:
-

OAK-7627 blocks this issue. In order to properly process the property 
{{primary.allowed-client-ip-ranges}} in {{StandbyStoreService}}, it's necessary 
to switch to a more recent version of BND.

> Convert oak-segment-tar to OSGi R6 annotations
> --
>
> Key: OAK-6770
> URL: https://issues.apache.org/jira/browse/OAK-6770
> Project: Jackrabbit Oak
>  Issue Type: Technical task
>  Components: segment-tar
>Reporter: Robert Munteanu
>Assignee: Francesco Mari
>Priority: Minor
>  Labels: osgi, technical_debt
> Fix For: 1.10
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OAK-6770) Convert oak-segment-tar to OSGi R6 annotations

2018-07-03 Thread Julian Sedding (JIRA)


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

Julian Sedding commented on OAK-6770:
-

[~frm] I was convinced I had included a link in my previous comment, but must 
have gotten distracted. Sorry about that! Here it is: 
https://github.com/jsedding/osgi-ds-metatype-diff

> Convert oak-segment-tar to OSGi R6 annotations
> --
>
> Key: OAK-6770
> URL: https://issues.apache.org/jira/browse/OAK-6770
> Project: Jackrabbit Oak
>  Issue Type: Technical task
>  Components: segment-tar
>Reporter: Robert Munteanu
>Assignee: Francesco Mari
>Priority: Minor
>  Labels: osgi, technical_debt
> Fix For: 1.10
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OAK-6770) Convert oak-segment-tar to OSGi R6 annotations

2018-07-03 Thread Francesco Mari (JIRA)


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

Francesco Mari commented on OAK-6770:
-

[~jsedding], I was not aware of that. Thanks for the suggestion. Can you give 
me a pointer?

> Convert oak-segment-tar to OSGi R6 annotations
> --
>
> Key: OAK-6770
> URL: https://issues.apache.org/jira/browse/OAK-6770
> Project: Jackrabbit Oak
>  Issue Type: Technical task
>  Components: segment-tar
>Reporter: Robert Munteanu
>Assignee: Francesco Mari
>Priority: Minor
>  Labels: osgi, technical_debt
> Fix For: 1.10
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OAK-6770) Convert oak-segment-tar to OSGi R6 annotations

2018-07-02 Thread Julian Sedding (JIRA)


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

Julian Sedding commented on OAK-6770:
-

[~frm] I wrote a little tool to help me diff metatype and declarative service 
component descriptors from different bundles. Exactly for the use-case of 
migrating to the official OSGi annotations. It's not perfect, but I found it 
helpful for avoiding bugs and learning the finer details of how the official 
OSGi annotations are processed.

> Convert oak-segment-tar to OSGi R6 annotations
> --
>
> Key: OAK-6770
> URL: https://issues.apache.org/jira/browse/OAK-6770
> Project: Jackrabbit Oak
>  Issue Type: Technical task
>  Components: segment-tar
>Reporter: Robert Munteanu
>Assignee: Francesco Mari
>Priority: Minor
>  Labels: osgi, technical_debt
> Fix For: 1.10
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OAK-6770) Convert oak-segment-tar to OSGi R6 annotations

2018-07-02 Thread Francesco Mari (JIRA)


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

Francesco Mari commented on OAK-6770:
-

At r1834845 and r1834852 I added some tests to check the content of the SCR 
component descriptors and the metatype information descriptors respectively. 
Hopefully this will help me detect if I break something during the migration.

> Convert oak-segment-tar to OSGi R6 annotations
> --
>
> Key: OAK-6770
> URL: https://issues.apache.org/jira/browse/OAK-6770
> Project: Jackrabbit Oak
>  Issue Type: Technical task
>  Components: segment-tar
>Reporter: Robert Munteanu
>Assignee: Francesco Mari
>Priority: Minor
>  Labels: osgi, technical_debt
> Fix For: 1.10
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OAK-6770) Convert oak-segment-tar to OSGi R6 annotations

2018-03-22 Thread Robert Munteanu (JIRA)

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

Robert Munteanu commented on OAK-6770:
--

The provisioning model works fine for defining variables, but the problem we're 
facing with that is that variables are defined at build time. So imagine we 
have a setting like

{noformat}
[variables]
  sling.home=sling

[configurations]
  org.apache.jackrabbit.foo
 location=${sling.home}/foo

  org.apache.jackrabbit.bar
 location=${sling.home}/bar
{noformat}

The sling.home setting is set in stone to be {{sling}} and I can't change it at 
runtime. In contrast, framework properties can be set at runtime so having 
{{org.apache.jackrabbit.bar}} inspect the {{sling.home}} framework property is 
quite beneficial.

For that reason I'd argue for allowing a fallback to the framework properties 
in Oak components.

> Convert oak-segment-tar to OSGi R6 annotations
> --
>
> Key: OAK-6770
> URL: https://issues.apache.org/jira/browse/OAK-6770
> Project: Jackrabbit Oak
>  Issue Type: Technical task
>  Components: segment-tar
>Reporter: Robert Munteanu
>Assignee: Francesco Mari
>Priority: Minor
>  Labels: osgi
> Fix For: 1.10
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OAK-6770) Convert oak-segment-tar to OSGi R6 annotations

2018-03-14 Thread Francesco Mari (JIRA)

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

Francesco Mari commented on OAK-6770:
-

In the case of Sling, variables in the provisioning model seem to be the right 
tool to store values in a central place. Store the repository home once in a 
variable, reference it everywhere you need. I think that a component should be 
concerned with its own configuration, and with its configuration only. If the 
component is integrated in a bigger deployment unit, it is the role of the 
integrator to wire the component with the rest of the system with minimal 
duplication.

> Convert oak-segment-tar to OSGi R6 annotations
> --
>
> Key: OAK-6770
> URL: https://issues.apache.org/jira/browse/OAK-6770
> Project: Jackrabbit Oak
>  Issue Type: Technical task
>  Components: segment-tar
>Reporter: Robert Munteanu
>Assignee: Francesco Mari
>Priority: Minor
>  Labels: osgi
> Fix For: 1.10
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OAK-6770) Convert oak-segment-tar to OSGi R6 annotations

2018-03-14 Thread Robert Munteanu (JIRA)

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

Robert Munteanu commented on OAK-6770:
--

Using the component configuration allows central definition of properties such 
as {{repository.home}}. IIUC you would propose removing this style of 
definition, which IMO is quite useful and widely used e.g. in Sling

> Convert oak-segment-tar to OSGi R6 annotations
> --
>
> Key: OAK-6770
> URL: https://issues.apache.org/jira/browse/OAK-6770
> Project: Jackrabbit Oak
>  Issue Type: Technical task
>  Components: segment-tar
>Reporter: Robert Munteanu
>Assignee: Francesco Mari
>Priority: Minor
>  Labels: osgi
> Fix For: 1.10
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OAK-6770) Convert oak-segment-tar to OSGi R6 annotations

2018-03-13 Thread Francesco Mari (JIRA)

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

Francesco Mari commented on OAK-6770:
-

While investigating this issue, I figured out that the following sources are 
looked up for configuration values in this order.

# The component configuration.
# The framework configuration.
# System properties, only for cache sizes.

The first source containing the configuration value wins. This doesn't seem to 
make much sense. I would have expected the system properties to have precedence 
over the component configuration, in order to give users a way to override 
cache sizes on the command line for experimental usage.

Moreover, I quite don't understand the reason why configuration values are 
looked up in the framework configuration, which is a flat namespace for 
everything deployed in the OSGi framework. In addition to that, looking into 
the framework properties also triggers a lookup in the system properties. 
According to the Javadoc for {{org.osgi.framework.BundleContext#getProperty}},

{quote}
If the key is not found in the Framework properties, the system properties are 
then searched. The method returns null if the property is not found.
{quote}

This behaviour modifies the lookup of configuration values to the following.

# The component configuration.
# The framework configuration.
# System properties, for every configuration.
# System properties, only for cache sizes.

This strategy basically makes every configuration property feature-flaggable as 
long as they are not specified in an OSGi configuration which, in my opinion, 
is quite arbitrary and dangerous. As such, I propose to stop looking up the 
framework configuration, and to lookup system properties for cache sizes before 
we look into the component configuration (which seems to be a saner approach to 
configuration).

[~mduerig], [~dulceanu], [~volteanu], what do you think?

> Convert oak-segment-tar to OSGi R6 annotations
> --
>
> Key: OAK-6770
> URL: https://issues.apache.org/jira/browse/OAK-6770
> Project: Jackrabbit Oak
>  Issue Type: Technical task
>  Components: segment-tar
>Reporter: Robert Munteanu
>Assignee: Francesco Mari
>Priority: Minor
>  Labels: osgi
> Fix For: 1.10
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OAK-6770) Convert oak-segment-tar to OSGi R6 annotations

2018-03-05 Thread Robert Munteanu (JIRA)

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

Robert Munteanu commented on OAK-6770:
--

Thanks adding this here [~mduerig], apparently I missed the question when 
initially scanning it :-(

> Convert oak-segment-tar to OSGi R6 annotations
> --
>
> Key: OAK-6770
> URL: https://issues.apache.org/jira/browse/OAK-6770
> Project: Jackrabbit Oak
>  Issue Type: Technical task
>  Components: segment-tar
>Reporter: Robert Munteanu
>Assignee: Francesco Mari
>Priority: Minor
>  Labels: osgi
> Fix For: 1.10
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OAK-6770) Convert oak-segment-tar to OSGi R6 annotations

2018-03-05 Thread JIRA

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

Michael Dürig commented on OAK-6770:


According to [~rombert] wrt [~frm] initial comment re. the 
{{primary.allowed-client-ip-ranges}} property:

{noformat}
Looking at the proposed final draft for the spec there seems to be a mention of 
this: A single dollar sign ('$'\u0024) is removed unless it is followed by: * A 
low line ('_'\u005F) and a dollar sign in which case the three consecutive 
characters ( "$_$") are changed to a single hyphen-minus ('-'\u002D)
{noformat}

 

> Convert oak-segment-tar to OSGi R6 annotations
> --
>
> Key: OAK-6770
> URL: https://issues.apache.org/jira/browse/OAK-6770
> Project: Jackrabbit Oak
>  Issue Type: Technical task
>  Components: segment-tar
>Reporter: Robert Munteanu
>Assignee: Francesco Mari
>Priority: Minor
>  Labels: osgi
> Fix For: 1.10
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OAK-6770) Convert oak-segment-tar to OSGi R6 annotations

2018-02-28 Thread Marcel Reutegger (JIRA)

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

Marcel Reutegger commented on OAK-6770:
---

bq. maybe there's way to do this in a simplified manner that does not require 
duplicating property names as method definitions and strings.

The configuration for the DocumentNodeStoreService addresses this by using a 
dynamic proxy with an invocation handler. The 
[DocumentNodeStoreServiceConfiguration|https://github.com/apache/jackrabbit-oak/blob/jackrabbit-oak-1.8.0/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreServiceConfiguration.java]
 also does lookup of framework and system properties and has a concept of a 
preset. 

> Convert oak-segment-tar to OSGi R6 annotations
> --
>
> Key: OAK-6770
> URL: https://issues.apache.org/jira/browse/OAK-6770
> Project: Jackrabbit Oak
>  Issue Type: Technical task
>  Components: segment-tar
>Reporter: Robert Munteanu
>Assignee: Francesco Mari
>Priority: Minor
>  Labels: osgi
> Fix For: 1.9.0, 1.10
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OAK-6770) Convert oak-segment-tar to OSGi R6 annotations

2018-02-28 Thread Robert Munteanu (JIRA)

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

Robert Munteanu commented on OAK-6770:
--

On the topic of whether we should move, I see the following reasons:

* the old SCR annotations are, well, old and we don't get the benefit of added 
features from newer SCR specifications unless we use the new ones
* the old SCR annotations are proprietary to the Felix project and no longer 
developed. This locks us in to using the specific Maven tooling from Felix 
which is basically in maintenance mode

On the topic on when we should move I would say as early in the dev cycle as 
possible to patch potential regressions. The translation is neither automatic 
nor trivial, so we should do it "soon".

We can mix and match annotations between modules - this is the situation we're 
in now, but I would advise against doing that in the same module - it's 
confusing.

Regarding the more specific fallback config needs we have - framework 
properties, system properties, I suggest we discuss this with someone closer to 
the OSGi specs and maybe there's way to do this in a simplified manner that 
does not require duplicating property names as method definitions and strings.



> Convert oak-segment-tar to OSGi R6 annotations
> --
>
> Key: OAK-6770
> URL: https://issues.apache.org/jira/browse/OAK-6770
> Project: Jackrabbit Oak
>  Issue Type: Technical task
>  Components: segment-tar
>Reporter: Robert Munteanu
>Assignee: Francesco Mari
>Priority: Minor
>  Labels: osgi
> Fix For: 1.9.0, 1.10
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OAK-6770) Convert oak-segment-tar to OSGi R6 annotations

2018-02-28 Thread JIRA

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

Michael Dürig commented on OAK-6770:


[~rombert] can you comment on [~frm]'s concerns from above? Mainly regarding 
whether if, why and when we should migrate to the new annotations. 

If this is a hard requirement we probably need to start with covering this 
aspect with tests first, unless we are sufficiently sure we don't introduce any 
regression.

> Convert oak-segment-tar to OSGi R6 annotations
> --
>
> Key: OAK-6770
> URL: https://issues.apache.org/jira/browse/OAK-6770
> Project: Jackrabbit Oak
>  Issue Type: Technical task
>  Components: segment-tar
>Reporter: Robert Munteanu
>Assignee: Francesco Mari
>Priority: Minor
>  Labels: osgi
> Fix For: 1.9.0, 1.10
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OAK-6770) Convert oak-segment-tar to OSGi R6 annotations

2018-02-28 Thread Francesco Mari (JIRA)

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

Francesco Mari commented on OAK-6770:
-

The work is in progress in [this branch on 
GitHub|https://github.com/francescomari/jackrabbit-oak/tree/OAK-6770]. The 
patch is currently functional, but there are some loose ends.

Because of how the names of the methods of the annotations are mapped to the 
attribute names (see 105.15.2 from the OSGi Compendium), it is not possible to 
expose {{"primary.allowed-client-ip-ranges"}}. This attribute has been exposed 
as {{"primary.allowed.client.ip.ranges"}}. This issue can be solved by 
configuration. Moreover, it is possible to add additional logic in 
{{StandbyStoreService}} to detect if the old property has been set. In this 
case, the code will use the values from the old property and print a warning 
message.

The property {{customSegmentStore}}, used in both {{SegmentNodeStoreService}} 
and {{SegmentNodeStoreFactory}}, was not exposed via Metatype when the 
unpatched code was deployed, but it is exposed now. This might be a bug 
somewhere, I'm currently unable to explain this behaviour.

The patch currently changes the minimum amount of code to get rid of the old 
annotations and to use the new standard OSGi ones. This means that the code 
that actually reads the configuration data still uses the {{ComponentContext}} 
to manually access the attributes. This approach has the benefit of being 
minimally disruptive, but maintains the verbosity of the old approach.

I'm positive that the verbosity of the old approach can't be completely 
removed. {{SegmentNodeStoreService}} and its helper {{Configuration}} have 
quite some custom code to read the configuration data. For example, every 
configuration property is looked up using 
{{OsgiUtil#lookupConfigurationThenFramework}}, giving the possibility to 
provide default values in the framework properties for every proeprty in the 
component configuration. Moreover, for the cache sizes, we rely on default 
values read from the system properties. This logic is easily implemented if the 
property names are available in {{SegmentNodeStoreService}}, so it is not 
possible use the Metatype annotation as the only way to access the 
configuration.

As a side note, the problem outlined in the previoius paragraph implies that 
{{SegmentNodeStoreService}} needs to maintain a definition of the property 
names twice, in the {{SegmentNodeStoreService}} as string, and in 
{{SegmentNodeStoreServiceConfiguration}} as method names. A change in one set 
of property names has to be reflected in the other, keeping in mind the name 
mapping rules mentioned above.

Moreover, I couldn't find a simple way to automatically test the effect of my 
changes. I had to semi-automatically validate the Metatype resource and, for 
good measure, perform manual testing on a real deployment scenario.

I don't see the advantage of switching to the new annotations. The logic in 
{{SegmentNodeStoreService}} has been written to rely on property names being 
available. The new approach to Metatype hides this information from the code, 
and makes the implementation more convoluted. What is the *real* advantage of 
this migration? I see the value of the new annotations in simpler components. 
Can the new and old annotation live alongside each other?

> Convert oak-segment-tar to OSGi R6 annotations
> --
>
> Key: OAK-6770
> URL: https://issues.apache.org/jira/browse/OAK-6770
> Project: Jackrabbit Oak
>  Issue Type: Technical task
>  Components: segment-tar
>Reporter: Robert Munteanu
>Assignee: Francesco Mari
>Priority: Minor
>  Labels: osgi
> Fix For: 1.9.0, 1.10
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OAK-6770) Convert oak-segment-tar to OSGi R6 annotations

2017-10-23 Thread Robert Munteanu (JIRA)

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

Robert Munteanu commented on OAK-6770:
--

This is purely a technical task, enabling Oak to take advantage of recent 
enhancement in the annotations, most visible one being the annotation-based 
component configuration.

There is no requirement to finish it for 1.8, as migrating just parts of Oak 
works fine.

> Convert oak-segment-tar to OSGi R6 annotations
> --
>
> Key: OAK-6770
> URL: https://issues.apache.org/jira/browse/OAK-6770
> Project: Jackrabbit Oak
>  Issue Type: Technical task
>  Components: segment-tar
>Reporter: Robert Munteanu
> Fix For: 1.8, 1.7.11
>
>




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


[jira] [Commented] (OAK-6770) Convert oak-segment-tar to OSGi R6 annotations

2017-10-23 Thread JIRA

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

Michael Dürig commented on OAK-6770:


[~rombert], could you clarify the requirements and priorities of this re. the 
1.8 release? 

> Convert oak-segment-tar to OSGi R6 annotations
> --
>
> Key: OAK-6770
> URL: https://issues.apache.org/jira/browse/OAK-6770
> Project: Jackrabbit Oak
>  Issue Type: Technical task
>  Components: segment-tar
>Reporter: Robert Munteanu
> Fix For: 1.8, 1.7.11
>
>




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