[
https://issues.apache.org/jira/browse/SLING-2892?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13669587#comment-13669587
]
Stefan Egli edited comment on SLING-2892 at 5/29/13 7:11 PM:
-------------------------------------------------------------
implemented and tested manually (by explicitly setting sling.id[.file] the same
with two instances in the same cluster) -> the newly introduced [scary]
log.error shows up.
was (Author: egli):
implemented
> 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
>
> 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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira