You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-dev@jackrabbit.apache.org by Chetan Mehrotra <ch...@gmail.com> on 2016/11/15 09:37:46 UTC
Detecting if setup is a cluster or a single node via repository Descriptors
Hi Team,
For OAK-2108 Killing a cluster node may stop async index update to to
30 minutes.
One possible fix can be that AsyncIndexUpdate can determine if the
repository is part of cluster or its a single instance. In case its a
single instance we can reduce the timeout as its known that there are
no other processes involved.
Currently for SegmentNodeStore a Descriptor with name
'oak.discoverylite.clusterview' is registered whose value is as below
---
{"seq":1,"final":true,"me":1,"id":"80a1fb91-83bc-4eac-b855-53d7b8a04092","active":[1],"deactivating":[],"inactive":[]}
---
AsyncIndexerService can get access to 'Descriptors' and look for that
key and check if 'active' is 1.
However there should be a better way to detect this. Can we have an
explicit descriptor defined say OAK_CLUSTERED having boolean value. A
false means its not a cluster while true means it "might" be part of
cluster.
Thoughts?
Chetan Mehrotra
Re: Detecting if setup is a cluster or a single node via repository Descriptors
Posted by Chetan Mehrotra <ch...@gmail.com>.
Looking further I think I can achieve the same by checking if
NodeStore is instanceof
org.apache.jackrabbit.oak.spi.state.Clusterable which was introduced
with OAK-3529 and is currently implemented by DocumentNodeStore
Chetan Mehrotra
On Tue, Nov 15, 2016 at 3:39 PM, Stefan Egli <st...@apache.org> wrote:
> Hi Chetan,
>
> I think the discoverylite and the new 'clustered' property options have
> different characteristics. The former describes the current status of the
> cluster, irrespective of whether it can be clustered at all. While the
> latter is about a capability whether the node store supports clustering or
> not. And assuming that you're after the capability 'cluster support'
> alone, then I think handling this separate is indeed more appropriate.
>
> Cheers,
> Stefan
>
> On 15/11/16 10:37, "Chetan Mehrotra" <ch...@gmail.com> wrote:
>
>>Hi Team,
>>
>>For OAK-2108 Killing a cluster node may stop async index update to to
>>30 minutes.
>>
>>One possible fix can be that AsyncIndexUpdate can determine if the
>>repository is part of cluster or its a single instance. In case its a
>>single instance we can reduce the timeout as its known that there are
>>no other processes involved.
>>
>>Currently for SegmentNodeStore a Descriptor with name
>>'oak.discoverylite.clusterview' is registered whose value is as below
>>
>>---
>>{"seq":1,"final":true,"me":1,"id":"80a1fb91-83bc-4eac-b855-53d7b8a04092","
>>active":[1],"deactivating":[],"inactive":[]}
>>---
>>
>>AsyncIndexerService can get access to 'Descriptors' and look for that
>>key and check if 'active' is 1.
>>
>>However there should be a better way to detect this. Can we have an
>>explicit descriptor defined say OAK_CLUSTERED having boolean value. A
>>false means its not a cluster while true means it "might" be part of
>>cluster.
>>
>>Thoughts?
>>
>>Chetan Mehrotra
>
>
Re: Detecting if setup is a cluster or a single node via repository
Descriptors
Posted by Stefan Egli <st...@apache.org>.
Hi Chetan,
I think the discoverylite and the new 'clustered' property options have
different characteristics. The former describes the current status of the
cluster, irrespective of whether it can be clustered at all. While the
latter is about a capability whether the node store supports clustering or
not. And assuming that you're after the capability 'cluster support'
alone, then I think handling this separate is indeed more appropriate.
Cheers,
Stefan
On 15/11/16 10:37, "Chetan Mehrotra" <ch...@gmail.com> wrote:
>Hi Team,
>
>For OAK-2108 Killing a cluster node may stop async index update to to
>30 minutes.
>
>One possible fix can be that AsyncIndexUpdate can determine if the
>repository is part of cluster or its a single instance. In case its a
>single instance we can reduce the timeout as its known that there are
>no other processes involved.
>
>Currently for SegmentNodeStore a Descriptor with name
>'oak.discoverylite.clusterview' is registered whose value is as below
>
>---
>{"seq":1,"final":true,"me":1,"id":"80a1fb91-83bc-4eac-b855-53d7b8a04092","
>active":[1],"deactivating":[],"inactive":[]}
>---
>
>AsyncIndexerService can get access to 'Descriptors' and look for that
>key and check if 'active' is 1.
>
>However there should be a better way to detect this. Can we have an
>explicit descriptor defined say OAK_CLUSTERED having boolean value. A
>false means its not a cluster while true means it "might" be part of
>cluster.
>
>Thoughts?
>
>Chetan Mehrotra
Re: Detecting if setup is a cluster or a single node via repository Descriptors
Posted by Chetan Mehrotra <ch...@gmail.com>.
On Wed, Nov 16, 2016 at 1:47 PM, Marcel Reutegger <mr...@adobe.com> wrote:
> why is the lease timeout for the async index update that high?
See OAK-3834 for some discussion around the default timeout settings
Chetan Mehrotra
Re: Detecting if setup is a cluster or a single node via repository
Descriptors
Posted by Marcel Reutegger <mr...@adobe.com>.
Hi,
why is the lease timeout for the async index update that high? What's
needed to reduce the timeout to a value similar to the DocumentNodeStore
lease timeout of 2 minutes?
Regards
Marcel
On 15/11/16 10:37, Chetan Mehrotra wrote:
> Hi Team,
>
> For OAK-2108 Killing a cluster node may stop async index update to to
> 30 minutes.
>
> One possible fix can be that AsyncIndexUpdate can determine if the
> repository is part of cluster or its a single instance. In case its a
> single instance we can reduce the timeout as its known that there are
> no other processes involved.
>
> Currently for SegmentNodeStore a Descriptor with name
> 'oak.discoverylite.clusterview' is registered whose value is as below
>
> ---
> {"seq":1,"final":true,"me":1,"id":"80a1fb91-83bc-4eac-b855-53d7b8a04092","active":[1],"deactivating":[],"inactive":[]}
> ---
>
> AsyncIndexerService can get access to 'Descriptors' and look for that
> key and check if 'active' is 1.
>
> However there should be a better way to detect this. Can we have an
> explicit descriptor defined say OAK_CLUSTERED having boolean value. A
> false means its not a cluster while true means it "might" be part of
> cluster.
>
> Thoughts?
>
> Chetan Mehrotra
>