You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Marcel Reutegger (JIRA)" <ji...@apache.org> on 2018/05/28 13:36:00 UTC

[jira] [Commented] (OAK-7316) Greedy ClusterNodeInfo

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

Marcel Reutegger commented on OAK-7316:
---------------------------------------

Started work in a github branch: https://github.com/mreutegg/jackrabbit-oak/tree/OAK-7316

The state changes for a clusterNodes entry are a bit strange when a new one gets created at the moment. A new entry is created without setting the {{state}} to active and the {{leaseEnd}} is set to the same value as the {{startTime}}. This is a rather strange state, something between inactive and when the lease expired.

I would rather like to simplify it and allow only four states as depicted in this [diagram|https://github.com/mreutegg/jackrabbit-oak/blob/OAK-7316/oak-doc/src/site/markdown/nodestore/document/cluster-node-lease.png].

> Greedy ClusterNodeInfo
> ----------------------
>
>                 Key: OAK-7316
>                 URL: https://issues.apache.org/jira/browse/OAK-7316
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: documentmk
>            Reporter: Marcel Reutegger
>            Assignee: Marcel Reutegger
>            Priority: Major
>             Fix For: 1.10
>
>
> The {{ClusterNodeInfo}} is responsible for assigning a {{clusterId}} to a DocumentNodeStore on startup. The current implementation uses the lowest MAC address available on the system and the working directory as information to reuse a previously assigned {{clusterId}}. This ensures a DocumentNodeStore gets the same {{clusterId}} after a restart.
> For static deployments this works fine, but become a problem when deployments are more dynamic. Consider a cluster deployed on container infrastructure. Scaling the application may mean cluster nodes are added or removed over time and deployed on various types of machines depending on current load and required resources. Over time more and more unused {{clusterIds}} would exist and and bloat underlying documents in the DocumentStore.
> This issue proposes a more greedy algorithm when a {{clusterId}} is assigned to a DocumentNodeStore.



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