Author: stefanegli
Date: Mon Jan 26 08:49:31 2015
New Revision: 1654740
URL: http://svn.apache.org/r1654740
Log:
SLING-3726 : added comment about inconsistent state in /var/discovery/impl to
cause duplicate instances lack of SLING-4139 being fixed
Modified:
sling/trunk/bundles/extensions/discovery/impl/src/main/java/org/apache/sling/discovery/impl/topology/TopologyViewImpl.java
Modified:
sling/trunk/bundles/extensions/discovery/impl/src/main/java/org/apache/sling/discovery/impl/topology/TopologyViewImpl.java
URL:
http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/discovery/impl/src/main/java/org/apache/sling/discovery/impl/topology/TopologyViewImpl.java?rev=1654740&r1=1654739&r2=1654740&view=diff
==============================================================================
---
sling/trunk/bundles/extensions/discovery/impl/src/main/java/org/apache/sling/discovery/impl/topology/TopologyViewImpl.java
(original)
+++
sling/trunk/bundles/extensions/discovery/impl/src/main/java/org/apache/sling/discovery/impl/topology/TopologyViewImpl.java
Mon Jan 26 08:49:31 2015
@@ -175,6 +175,16 @@ public class TopologyViewImpl implements
for (Iterator<InstanceDescription> it2 =
this.instances.iterator(); it2.hasNext();) {
InstanceDescription existingInstance = it2.next();
if
(existingInstance.getSlingId().equals(instanceDescription.getSlingId())) {
+ // SLING-3726:
+ // while 'normal duplicate instances' are filtered out
here correctly,
+ // 'hidden duplicate instances' that are added via this
instanceDescription's
+ // cluster, are not caught.
+ // there is, however, no simple fix for this. Since the
reason is
+ // inconsistent state information in /var/discovery/impl -
either
+ // due to stale-announcements (SLING-4139) - or by some
manualy
+ // copying of data from one cluster to the next (which
will also
+ // be cleaned up by SLING-4139 though)
+ // so the fix for avoiding duplicate instances is really
SLING-4139
logger.info("addInstance: cannot add same instance twice: "
+ instanceDescription);
continue outerLoop;