[jira] [Commented] (OAK-4924) avoid CommitInfo==null in contentChanged call in SegmentNodeStore.refresh

2016-10-13 Thread Stefan Egli (JIRA)

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

Stefan Egli commented on OAK-4924:
--

Created OAK-4935 to track this further

> avoid CommitInfo==null in contentChanged call in SegmentNodeStore.refresh
> -
>
> Key: OAK-4924
> URL: https://issues.apache.org/jira/browse/OAK-4924
> Project: Jackrabbit Oak
>  Issue Type: Improvement
>  Components: segmentmk
>Affects Versions: 1.5.12
>Reporter: Stefan Egli
>Assignee: Stefan Egli
>
> Currently 
> [SegmentNodeStore.refreshHead|https://github.com/apache/jackrabbit-oak/blob/d82f9b21d02a7eaf856f546e778118161d71b760/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/SegmentNodeStore.java#L231]
>  calls {{contentChanged}} with null as the CommitInfo. This is problematic 
> for prefiltering (OAK-4796, OAK-4907 et al) as for that a ChangeSet of 
> changed items in a commit is stored in the CommitContext in the CommitInfo.
> Thus it would be useful to not send null but a CommitInfo that has the 
> equivalent meaning of null but is a new object for each call (so that the 
> ChangeSet can be set).
> [~mduerig], [~frm], [~alex.parvulescu] wdyt?



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


[jira] [Commented] (OAK-4924) avoid CommitInfo==null in contentChanged call in SegmentNodeStore.refresh

2016-10-12 Thread Chetan Mehrotra (JIRA)

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

Chetan Mehrotra commented on OAK-4924:
--

bq. Which means that we can't prefilter async index updates

Supporting that would require following change
# {{AsyncIndexUpdate#mergeWithConcurrencyCheck}} - It should pass a CommitInfo 
with {{CommitContext}} set. See {{MutableRoot}}
# You would need to explicitly include the ChangeCollector ValidatorProvider in 
the {{CompositeHook}}. 

This would then ensure that at least on cluster node where async index runs 
CommitInfo has ChangeSet populated

> avoid CommitInfo==null in contentChanged call in SegmentNodeStore.refresh
> -
>
> Key: OAK-4924
> URL: https://issues.apache.org/jira/browse/OAK-4924
> Project: Jackrabbit Oak
>  Issue Type: Improvement
>  Components: segmentmk
>Affects Versions: 1.5.12
>Reporter: Stefan Egli
>Assignee: Stefan Egli
>
> Currently 
> [SegmentNodeStore.refreshHead|https://github.com/apache/jackrabbit-oak/blob/d82f9b21d02a7eaf856f546e778118161d71b760/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/SegmentNodeStore.java#L231]
>  calls {{contentChanged}} with null as the CommitInfo. This is problematic 
> for prefiltering (OAK-4796, OAK-4907 et al) as for that a ChangeSet of 
> changed items in a commit is stored in the CommitContext in the CommitInfo.
> Thus it would be useful to not send null but a CommitInfo that has the 
> equivalent meaning of null but is a new object for each call (so that the 
> ChangeSet can be set).
> [~mduerig], [~frm], [~alex.parvulescu] wdyt?



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


[jira] [Commented] (OAK-4924) avoid CommitInfo==null in contentChanged call in SegmentNodeStore.refresh

2016-10-12 Thread Alex Parvulescu (JIRA)

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

Alex Parvulescu commented on OAK-4924:
--

bq. Stefan Egli I think that usage is fine. Similar would be the case if 
DocumentNodeStore where external changes are pushed.
[~chetanm] cold you clarify what usage you are referring to? I'm not sure if 
you are advocating for adding the empty commit info or against it.

> avoid CommitInfo==null in contentChanged call in SegmentNodeStore.refresh
> -
>
> Key: OAK-4924
> URL: https://issues.apache.org/jira/browse/OAK-4924
> Project: Jackrabbit Oak
>  Issue Type: Improvement
>  Components: segmentmk
>Affects Versions: 1.5.12
>Reporter: Stefan Egli
> Fix For: 1.6
>
>
> Currently 
> [SegmentNodeStore.refreshHead|https://github.com/apache/jackrabbit-oak/blob/d82f9b21d02a7eaf856f546e778118161d71b760/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/SegmentNodeStore.java#L231]
>  calls {{contentChanged}} with null as the CommitInfo. This is problematic 
> for prefiltering (OAK-4796, OAK-4907 et al) as for that a ChangeSet of 
> changed items in a commit is stored in the CommitContext in the CommitInfo.
> Thus it would be useful to not send null but a CommitInfo that has the 
> equivalent meaning of null but is a new object for each call (so that the 
> ChangeSet can be set).
> [~mduerig], [~frm], [~alex.parvulescu] wdyt?



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


[jira] [Commented] (OAK-4924) avoid CommitInfo==null in contentChanged call in SegmentNodeStore.refresh

2016-10-12 Thread Chetan Mehrotra (JIRA)

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

Chetan Mehrotra commented on OAK-4924:
--

[~egli] I think that usage is fine. Similar would be the case if 
DocumentNodeStore where external changes are pushed. 

And in any case from this call onwards the CommitInfo should not be modified 
and mutable state should be build up at time of commit itself. And that is done 
in the {{merge}} call where commit info is passed from caller code and for JCR 
commits the MutableRoot sets up the CommitContext

> avoid CommitInfo==null in contentChanged call in SegmentNodeStore.refresh
> -
>
> Key: OAK-4924
> URL: https://issues.apache.org/jira/browse/OAK-4924
> Project: Jackrabbit Oak
>  Issue Type: Improvement
>  Components: segmentmk
>Affects Versions: 1.5.12
>Reporter: Stefan Egli
> Fix For: 1.6
>
>
> Currently 
> [SegmentNodeStore.refreshHead|https://github.com/apache/jackrabbit-oak/blob/d82f9b21d02a7eaf856f546e778118161d71b760/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/SegmentNodeStore.java#L231]
>  calls {{contentChanged}} with null as the CommitInfo. This is problematic 
> for prefiltering (OAK-4796, OAK-4907 et al) as for that a ChangeSet of 
> changed items in a commit is stored in the CommitContext in the CommitInfo.
> Thus it would be useful to not send null but a CommitInfo that has the 
> equivalent meaning of null but is a new object for each call (so that the 
> ChangeSet can be set).
> [~mduerig], [~frm], [~alex.parvulescu] wdyt?



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


[jira] [Commented] (OAK-4924) avoid CommitInfo==null in contentChanged call in SegmentNodeStore.refresh

2016-10-11 Thread Stefan Egli (JIRA)

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

Stefan Egli commented on OAK-4924:
--

Agreed that EMPTY is used elsewhere too - I believe mostly for tests though - 
where it's used in productive code we should review it I think. But agreed yes, 
EMPTY is a generic issue for CommitContext/prefiltering (too).

> avoid CommitInfo==null in contentChanged call in SegmentNodeStore.refresh
> -
>
> Key: OAK-4924
> URL: https://issues.apache.org/jira/browse/OAK-4924
> Project: Jackrabbit Oak
>  Issue Type: Improvement
>  Components: segmentmk
>Affects Versions: 1.5.12
>Reporter: Stefan Egli
> Fix For: 1.6
>
>
> Currently 
> [SegmentNodeStore.refreshHead|https://github.com/apache/jackrabbit-oak/blob/d82f9b21d02a7eaf856f546e778118161d71b760/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/SegmentNodeStore.java#L231]
>  calls {{contentChanged}} with null as the CommitInfo. This is problematic 
> for prefiltering (OAK-4796, OAK-4907 et al) as for that a ChangeSet of 
> changed items in a commit is stored in the CommitContext in the CommitInfo.
> Thus it would be useful to not send null but a CommitInfo that has the 
> equivalent meaning of null but is a new object for each call (so that the 
> ChangeSet can be set).
> [~mduerig], [~frm], [~alex.parvulescu] wdyt?



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


[jira] [Commented] (OAK-4924) avoid CommitInfo==null in contentChanged call in SegmentNodeStore.refresh

2016-10-11 Thread Alex Parvulescu (JIRA)

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

Alex Parvulescu commented on OAK-4924:
--

I quite a lot of code in {{oak-core}} using {{EMTPY}}, what makes this specific 
code path different? I'm open to suggestions on what we can do here, but I'm 
wondering if this will actually help in the big picture.

> avoid CommitInfo==null in contentChanged call in SegmentNodeStore.refresh
> -
>
> Key: OAK-4924
> URL: https://issues.apache.org/jira/browse/OAK-4924
> Project: Jackrabbit Oak
>  Issue Type: Improvement
>  Components: segmentmk
>Affects Versions: 1.5.12
>Reporter: Stefan Egli
> Fix For: 1.6
>
>
> Currently 
> [SegmentNodeStore.refreshHead|https://github.com/apache/jackrabbit-oak/blob/d82f9b21d02a7eaf856f546e778118161d71b760/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/SegmentNodeStore.java#L231]
>  calls {{contentChanged}} with null as the CommitInfo. This is problematic 
> for prefiltering (OAK-4796, OAK-4907 et al) as for that a ChangeSet of 
> changed items in a commit is stored in the CommitContext in the CommitInfo.
> Thus it would be useful to not send null but a CommitInfo that has the 
> equivalent meaning of null but is a new object for each call (so that the 
> ChangeSet can be set).
> [~mduerig], [~frm], [~alex.parvulescu] wdyt?



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


[jira] [Commented] (OAK-4924) avoid CommitInfo==null in contentChanged call in SegmentNodeStore.refresh

2016-10-11 Thread Stefan Egli (JIRA)

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

Stefan Egli commented on OAK-4924:
--

The problem with {{EMPTY}} is actually that it is read-only - so you can't 
store anything in it ..

> avoid CommitInfo==null in contentChanged call in SegmentNodeStore.refresh
> -
>
> Key: OAK-4924
> URL: https://issues.apache.org/jira/browse/OAK-4924
> Project: Jackrabbit Oak
>  Issue Type: Improvement
>  Components: segmentmk
>Affects Versions: 1.5.12
>Reporter: Stefan Egli
> Fix For: 1.6
>
>
> Currently 
> [SegmentNodeStore.refreshHead|https://github.com/apache/jackrabbit-oak/blob/d82f9b21d02a7eaf856f546e778118161d71b760/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/SegmentNodeStore.java#L231]
>  calls {{contentChanged}} with null as the CommitInfo. This is problematic 
> for prefiltering (OAK-4796, OAK-4907 et al) as for that a ChangeSet of 
> changed items in a commit is stored in the CommitContext in the CommitInfo.
> Thus it would be useful to not send null but a CommitInfo that has the 
> equivalent meaning of null but is a new object for each call (so that the 
> ChangeSet can be set).
> [~mduerig], [~frm], [~alex.parvulescu] wdyt?



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


[jira] [Commented] (OAK-4924) avoid CommitInfo==null in contentChanged call in SegmentNodeStore.refresh

2016-10-11 Thread Stefan Egli (JIRA)

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

Stefan Egli commented on OAK-4924:
--

or let's say it is meant to be read-only - it's not actually read-only atm

> avoid CommitInfo==null in contentChanged call in SegmentNodeStore.refresh
> -
>
> Key: OAK-4924
> URL: https://issues.apache.org/jira/browse/OAK-4924
> Project: Jackrabbit Oak
>  Issue Type: Improvement
>  Components: segmentmk
>Affects Versions: 1.5.12
>Reporter: Stefan Egli
> Fix For: 1.6
>
>
> Currently 
> [SegmentNodeStore.refreshHead|https://github.com/apache/jackrabbit-oak/blob/d82f9b21d02a7eaf856f546e778118161d71b760/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/SegmentNodeStore.java#L231]
>  calls {{contentChanged}} with null as the CommitInfo. This is problematic 
> for prefiltering (OAK-4796, OAK-4907 et al) as for that a ChangeSet of 
> changed items in a commit is stored in the CommitContext in the CommitInfo.
> Thus it would be useful to not send null but a CommitInfo that has the 
> equivalent meaning of null but is a new object for each call (so that the 
> ChangeSet can be set).
> [~mduerig], [~frm], [~alex.parvulescu] wdyt?



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


[jira] [Commented] (OAK-4924) avoid CommitInfo==null in contentChanged call in SegmentNodeStore.refresh

2016-10-11 Thread Alex Parvulescu (JIRA)

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

Alex Parvulescu commented on OAK-4924:
--

so does this cover everything? 
https://github.com/stillalex/jackrabbit-oak/commit/6f88341262ae437a686e57970c58853184369372

> avoid CommitInfo==null in contentChanged call in SegmentNodeStore.refresh
> -
>
> Key: OAK-4924
> URL: https://issues.apache.org/jira/browse/OAK-4924
> Project: Jackrabbit Oak
>  Issue Type: Improvement
>  Components: segmentmk
>Affects Versions: 1.5.12
>Reporter: Stefan Egli
> Fix For: 1.6
>
>
> Currently 
> [SegmentNodeStore.refreshHead|https://github.com/apache/jackrabbit-oak/blob/d82f9b21d02a7eaf856f546e778118161d71b760/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/SegmentNodeStore.java#L231]
>  calls {{contentChanged}} with null as the CommitInfo. This is problematic 
> for prefiltering (OAK-4796, OAK-4907 et al) as for that a ChangeSet of 
> changed items in a commit is stored in the CommitContext in the CommitInfo.
> Thus it would be useful to not send null but a CommitInfo that has the 
> equivalent meaning of null but is a new object for each call (so that the 
> ChangeSet can be set).
> [~mduerig], [~frm], [~alex.parvulescu] wdyt?



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


[jira] [Commented] (OAK-4924) avoid CommitInfo==null in contentChanged call in SegmentNodeStore.refresh

2016-10-11 Thread JIRA

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

Michael Dürig commented on OAK-4924:


+1

> avoid CommitInfo==null in contentChanged call in SegmentNodeStore.refresh
> -
>
> Key: OAK-4924
> URL: https://issues.apache.org/jira/browse/OAK-4924
> Project: Jackrabbit Oak
>  Issue Type: Improvement
>  Components: segmentmk
>Affects Versions: 1.5.12
>Reporter: Stefan Egli
> Fix For: 1.6
>
>
> Currently 
> [SegmentNodeStore.refreshHead|https://github.com/apache/jackrabbit-oak/blob/d82f9b21d02a7eaf856f546e778118161d71b760/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/SegmentNodeStore.java#L231]
>  calls {{contentChanged}} with null as the CommitInfo. This is problematic 
> for prefiltering (OAK-4796, OAK-4907 et al) as for that a ChangeSet of 
> changed items in a commit is stored in the CommitContext in the CommitInfo.
> Thus it would be useful to not send null but a CommitInfo that has the 
> equivalent meaning of null but is a new object for each call (so that the 
> ChangeSet can be set).
> [~mduerig], [~frm], [~alex.parvulescu] wdyt?



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


[jira] [Commented] (OAK-4924) avoid CommitInfo==null in contentChanged call in SegmentNodeStore.refresh

2016-10-11 Thread Alex Parvulescu (JIRA)

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

Alex Parvulescu commented on OAK-4924:
--

if it's just about using EMPTY [0], instead of null, I don't see a problem with 
that.

[0] 
https://github.com/apache/jackrabbit-oak/blob/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/commit/CommitInfo.java#L45

> avoid CommitInfo==null in contentChanged call in SegmentNodeStore.refresh
> -
>
> Key: OAK-4924
> URL: https://issues.apache.org/jira/browse/OAK-4924
> Project: Jackrabbit Oak
>  Issue Type: Improvement
>  Components: segmentmk
>Affects Versions: 1.5.12
>Reporter: Stefan Egli
> Fix For: 1.6
>
>
> Currently 
> [SegmentNodeStore.refreshHead|https://github.com/apache/jackrabbit-oak/blob/d82f9b21d02a7eaf856f546e778118161d71b760/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/SegmentNodeStore.java#L231]
>  calls {{contentChanged}} with null as the CommitInfo. This is problematic 
> for prefiltering (OAK-4796, OAK-4907 et al) as for that a ChangeSet of 
> changed items in a commit is stored in the CommitContext in the CommitInfo.
> Thus it would be useful to not send null but a CommitInfo that has the 
> equivalent meaning of null but is a new object for each call (so that the 
> ChangeSet can be set).
> [~mduerig], [~frm], [~alex.parvulescu] wdyt?



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