[jira] [Commented] (OAK-4883) Missing BlobGarbageCollection MBean on standby instance

2017-07-14 Thread Francesco Mari (JIRA)

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

Francesco Mari commented on OAK-4883:
-

Ported back to 1.4 at r1801914.

> Missing BlobGarbageCollection MBean on standby instance
> ---
>
> Key: OAK-4883
> URL: https://issues.apache.org/jira/browse/OAK-4883
> Project: Jackrabbit Oak
>  Issue Type: Bug
>  Components: segment-tar, segmentmk
>Reporter: Alex Deparvu
>Assignee: Francesco Mari
>  Labels: candidate_oak_1_4, gc
> Fix For: Segment Tar 0.0.16, 1.4.17
>
> Attachments: OAK-4883.patch, OAK-4883.patch
>
>
> The {{BlobGarbageCollection}} MBean is no longer available on a standby 
> instance, this affects non-shared datastore setups (on a shared datastore 
> you'd only need to run blob gc on the primary).
> This change was introduced by OAK-4089 (and backported to 1.4 branch with 
> OAK-4093).



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


[jira] [Commented] (OAK-4883) Missing BlobGarbageCollection MBean on standby instance

2016-10-12 Thread Timothee Maret (JIRA)

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

Timothee Maret commented on OAK-4883:
-

Good catch, you are correct. I'll update the patch against the latest trunk, 
thanks!

> Missing BlobGarbageCollection MBean on standby instance
> ---
>
> Key: OAK-4883
> URL: https://issues.apache.org/jira/browse/OAK-4883
> Project: Jackrabbit Oak
>  Issue Type: Bug
>  Components: segment-tar, segmentmk
>Reporter: Alex Parvulescu
>Assignee: Timothee Maret
>  Labels: gc
> Attachments: OAK-4883.patch
>
>
> The {{BlobGarbageCollection}} MBean is no longer available on a standby 
> instance, this affects non-shared datastore setups (on a shared datastore 
> you'd only need to run blob gc on the primary).
> This change was introduced by OAK-4089 (and backported to 1.4 branch with 
> OAK-4093).



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


[jira] [Commented] (OAK-4883) Missing BlobGarbageCollection MBean on standby instance

2016-10-12 Thread Francesco Mari (JIRA)

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

Francesco Mari commented on OAK-4883:
-

I was bad at line counting. The incriminating line is [this 
one|https://github.com/tmaret/jackrabbit-oak/blob/OAK-4883/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/SegmentNodeStoreService.java#L340].
 The 'false' literal passed to toBoolean() is not used for comparison, but as a 
default value in case the value for the 'standby' property is not provided or 
invalid. As such, that line will effectively register a NodeStore only if the 
'standby' property is true: that condition should be reverted. The rest of the 
patch is correct, since it always register a BlobGCMBean independently from the 
value of the 'standby' property, disabling observation in the SegmentNodeStore 
if 'standby' is true.

> Missing BlobGarbageCollection MBean on standby instance
> ---
>
> Key: OAK-4883
> URL: https://issues.apache.org/jira/browse/OAK-4883
> Project: Jackrabbit Oak
>  Issue Type: Bug
>  Components: segment-tar, segmentmk
>Reporter: Alex Parvulescu
>Assignee: Timothee Maret
>  Labels: gc
> Attachments: OAK-4883.patch
>
>
> The {{BlobGarbageCollection}} MBean is no longer available on a standby 
> instance, this affects non-shared datastore setups (on a shared datastore 
> you'd only need to run blob gc on the primary).
> This change was introduced by OAK-4089 (and backported to 1.4 branch with 
> OAK-4093).



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


[jira] [Commented] (OAK-4883) Missing BlobGarbageCollection MBean on standby instance

2016-10-12 Thread Timothee Maret (JIRA)

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

Timothee Maret commented on OAK-4883:
-

[~frm] I assume you mean that line [0]. If so, it behaves the same as before 
the patch in OAK-4089. A node store instance is build however it is registered 
only if the instance is *not* a primary [1].

The patch keeps the goal of OAK-4089, by not registering the observation 
subsystem as mentioned in [2].

AFAIU, a node store instance is required in order to build the {{BlobGCMBean}}.
I may be wrong about that or maybe there's a way to get the required 
information to build the {{BlobGCMBean}}. If so I'd be happy to update the 
patch.

[0] 
https://github.com/tmaret/jackrabbit-oak/blob/OAK-4883/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/SegmentNodeStoreService.java#L339
[1] 
https://github.com/tmaret/jackrabbit-oak/blob/OAK-4883/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/SegmentNodeStoreService.java#L340
[2] 
https://github.com/apache/jackrabbit-oak/blob/2b6c2f5340f3b6485dda5c493f6343d232c883e9/oak-segment/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentNodeStoreService.java#L595

> Missing BlobGarbageCollection MBean on standby instance
> ---
>
> Key: OAK-4883
> URL: https://issues.apache.org/jira/browse/OAK-4883
> Project: Jackrabbit Oak
>  Issue Type: Bug
>  Components: segment-tar, segmentmk
>Reporter: Alex Parvulescu
>Assignee: Timothee Maret
>  Labels: gc
> Attachments: OAK-4883.patch
>
>
> The {{BlobGarbageCollection}} MBean is no longer available on a standby 
> instance, this affects non-shared datastore setups (on a shared datastore 
> you'd only need to run blob gc on the primary).
> This change was introduced by OAK-4089 (and backported to 1.4 branch with 
> OAK-4093).



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


[jira] [Commented] (OAK-4883) Missing BlobGarbageCollection MBean on standby instance

2016-10-12 Thread Francesco Mari (JIRA)

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

Francesco Mari commented on OAK-4883:
-

[~marett], the patch looks incorrect to me. The condition at line 339 allows a 
NodeStore to be registered if the 'standby' configuration property is true, 
while we don't want to register a NodeStore if the instance is supposed to work 
with the standby semantics.

> Missing BlobGarbageCollection MBean on standby instance
> ---
>
> Key: OAK-4883
> URL: https://issues.apache.org/jira/browse/OAK-4883
> Project: Jackrabbit Oak
>  Issue Type: Bug
>  Components: segment-tar, segmentmk
>Reporter: Alex Parvulescu
>Assignee: Timothee Maret
>  Labels: gc
> Attachments: OAK-4883.patch
>
>
> The {{BlobGarbageCollection}} MBean is no longer available on a standby 
> instance, this affects non-shared datastore setups (on a shared datastore 
> you'd only need to run blob gc on the primary).
> This change was introduced by OAK-4089 (and backported to 1.4 branch with 
> OAK-4093).



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


[jira] [Commented] (OAK-4883) Missing BlobGarbageCollection MBean on standby instance

2016-10-06 Thread Timothee Maret (JIRA)

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

Timothee Maret commented on OAK-4883:
-

[~alexparvulescu], [~frm] could you please review.

> Missing BlobGarbageCollection MBean on standby instance
> ---
>
> Key: OAK-4883
> URL: https://issues.apache.org/jira/browse/OAK-4883
> Project: Jackrabbit Oak
>  Issue Type: Bug
>  Components: segment-tar, segmentmk
>Reporter: Alex Parvulescu
>Assignee: Timothee Maret
>  Labels: gc
> Attachments: OAK-4883.patch
>
>
> The {{BlobGarbageCollection}} MBean is no longer available on a standby 
> instance, this affects non-shared datastore setups (on a shared datastore 
> you'd only need to run blob gc on the primary).
> This change was introduced by OAK-4089 (and backported to 1.4 branch with 
> OAK-4093).



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


[jira] [Commented] (OAK-4883) Missing BlobGarbageCollection MBean on standby instance

2016-10-05 Thread Timothee Maret (JIRA)

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

Timothee Maret commented on OAK-4883:
-

Thanks [~alexparvulescu] for clarifying.

With the current code (segment-tar) a standby instance will not instantiate a 
{{SegmentNodeStore}} due to the check at [0]. AFAIU, this was introduced in 
OAK-4089 (before the code that issue, the code was registering a 
{{SegmentNodeStore}}).
A {{SegmentNodeStore}} seems to be required in order to register a 
{{BlobGCMBean}}. 
Indeed  the {{BlobGCMBean}} needs a {{MarkSweepGarbageCollector}} which needs a 
{{repoId}} which is obtained via a {{SegmentNodeStore}}.

AFAIU, we'd need to register a {{SegmentNodeStore}} while keeping the fix for 
OAK-4089.
[~frm] in OAK-4089 you wrote:

bq. It would be more appropriate not to instantiate the observation subsystem 
at all in the context of the standby store, thus preventing spurious references 
to SegmentId instances to float in memory.

With "observation subsystem", were you referring to the {{observerTracker}} in 
[1] ? 
If so, how about building a {{SegmentNodeStore}} in any case, but only avoid 
registering {{observerTracker}} for standby instances ?

[0] 
https://github.com/apache/jackrabbit-oak/blob/2b6c2f5340f3b6485dda5c493f6343d232c883e9/oak-segment/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentNodeStoreService.java#L374
[1] 
https://github.com/apache/jackrabbit-oak/blob/2b6c2f5340f3b6485dda5c493f6343d232c883e9/oak-segment/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentNodeStoreService.java#L595

> Missing BlobGarbageCollection MBean on standby instance
> ---
>
> Key: OAK-4883
> URL: https://issues.apache.org/jira/browse/OAK-4883
> Project: Jackrabbit Oak
>  Issue Type: Bug
>  Components: segment-tar, segmentmk
>Reporter: Alex Parvulescu
>Assignee: Timothee Maret
>  Labels: gc
>
> The {{BlobGarbageCollection}} MBean is no longer available on a standby 
> instance, this affects non-shared datastore setups (on a shared datastore 
> you'd only need to run blob gc on the primary).
> This change was introduced by OAK-4089 (and backported to 1.4 branch with 
> OAK-4093).



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


[jira] [Commented] (OAK-4883) Missing BlobGarbageCollection MBean on standby instance

2016-10-05 Thread Alex Parvulescu (JIRA)

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

Alex Parvulescu commented on OAK-4883:
--

bq. Before digging further, could you help me understand whether it is expected 
that the store.getBlobStore() may return null in some setups
yes, it's expected to have {{null}} when there's no external datastore 
configured. When there is one though, the primary will provide a 
{{BlobGCMBean}}, but the standby won't, and this is what the current issue is 
about: having a {{BlobGCMBean}} on the standby.

> Missing BlobGarbageCollection MBean on standby instance
> ---
>
> Key: OAK-4883
> URL: https://issues.apache.org/jira/browse/OAK-4883
> Project: Jackrabbit Oak
>  Issue Type: Bug
>  Components: segment-tar, segmentmk
>Reporter: Alex Parvulescu
>Assignee: Timothee Maret
>  Labels: gc
>
> The {{BlobGarbageCollection}} MBean is no longer available on a standby 
> instance, this affects non-shared datastore setups (on a shared datastore 
> you'd only need to run blob gc on the primary).
> This change was introduced by OAK-4089 (and backported to 1.4 branch with 
> OAK-4093).



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


[jira] [Commented] (OAK-4883) Missing BlobGarbageCollection MBean on standby instance

2016-10-04 Thread Timothee Maret (JIRA)

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

Timothee Maret commented on OAK-4883:
-

[~alexparvulescu], [~frm] debugging the code with a default primary instance 
(File nodestore, no custom blob store), it appears the reason there's no 
{{BlobGCMBean}} is due to the fact that

{code}
store.getBlobStore()
{code}

returns {{null}} and therefor, the check at [0] can't be satisfied which cause 
the {{BlobGCMBean}} not to be registered. This occurs with a standby instance 
as well. Looking at the code and the change at [1], it seems to me that the 
logic for the primary case has not changed and that the only way to have a 
BlobGCMBean registered is to have a custom blob store configured.

Before digging further, could you help me understand whether it is expected 
that the {{store.getBlobStore()}} may return null in some setups

[0] 
https://github.com/apache/jackrabbit-oak/blob/2b6c2f5340f3b6485dda5c493f6343d232c883e9/oak-segment/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentNodeStoreService.java#L646
[1] 
https://github.com/tmaret/jackrabbit-oak/commit/982bc43374a4564726b8b77454c3803b691bac24

> Missing BlobGarbageCollection MBean on standby instance
> ---
>
> Key: OAK-4883
> URL: https://issues.apache.org/jira/browse/OAK-4883
> Project: Jackrabbit Oak
>  Issue Type: Bug
>  Components: segment-tar, segmentmk
>Reporter: Alex Parvulescu
>Assignee: Timothee Maret
>  Labels: gc
>
> The {{BlobGarbageCollection}} MBean is no longer available on a standby 
> instance, this affects non-shared datastore setups (on a shared datastore 
> you'd only need to run blob gc on the primary).
> This change was introduced by OAK-4089 (and backported to 1.4 branch with 
> OAK-4093).



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