Github user sjcorbett commented on a diff in the pull request:
https://github.com/apache/incubator-brooklyn/pull/894#discussion_r39423532
--- Diff:
software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/ReplicaSetConfig.java
---
@@ -148,6 +148,10 @@ public ReplicaSetConfig member(String hostname,
Integer port, Integer id) {
BasicBSONObject member = new BasicBSONObject();
member.put("_id", id);
member.put("host", String.format("%s:%s", hostname, port));
+ if (members.contains(member)) {
+ LOG.warn("Ignoring attempt to add entity to a set of which it
is already a member");
--- End diff --
When does this case happen? Suggests calling code needs to be fixed.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---