[
https://issues.apache.org/jira/browse/SLING-2892?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Stefan Egli updated SLING-2892:
-------------------------------
Fix Version/s: Discovery Impl 1.0.0
> Add simple paranoia check to detect duplicate sling.id in a cluster
> -------------------------------------------------------------------
>
> Key: SLING-2892
> URL: https://issues.apache.org/jira/browse/SLING-2892
> Project: Sling
> Issue Type: Improvement
> Components: Extensions
> Affects Versions: Discovery Impl 1.0.0
> Reporter: Stefan Egli
> Assignee: Stefan Egli
> Fix For: Discovery Impl 1.0.0
>
>
> Add a paranoia check to discovery.impl which detects a situation where more
> than one instance in a cluster is running with the same sling.id. Such a
> situation can for example occur, when the underlying repository-directory
> (which includes a sling.id.file) is copied to add an additional cluster slave.
> The suggested paranoia check works as follows:
> Each time a heartbeat is written to the repository, the last value of the
> heartbeat is checked to see if it matches the value written the last time. If
> there should be another instance in the same cluster using the same sling.id,
> it would have written the very same jcr-property but presumably with a
> slightly different timestamp. Should the value not match to the value last
> written, then a log.error is issued (with a reference to this bug and a
> possible fix for the situation).
> Note: this paranoia check is not 100% fool-proof, as it could be that the two
> instances try to write the very same heartbeat time (same millisecond). Yet
> it is considered at least a simple, stable mechanism to detect 99.9% of such
> cases.
--
This message was sent by Atlassian JIRA
(v6.1#6144)