<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:52:48 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[JAVA-665] Connection configuration allows to specify independent nodes as replica set</title>
                <link>https://jira.mongodb.org/browse/JAVA-665</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;I have faced with possibility to specify two (or more) independent nodes as replica set via MongoURI(...) parameter. &lt;/p&gt;

&lt;p&gt;E.g. I started two independent nodes...&lt;/p&gt;
&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;mongod.exe --dbpath .\1\db\ --rest --logappend --logpath .\1\mongo\log --port=1234&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;mongod.exe --dbpath .\2\db\ --rest --logappend --logpath .\2\mongo\log --port=5678&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;

&lt;p&gt;... and configured connection like following:&lt;/p&gt;
&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;Mongo con = new Mongo(new MongoURI(&quot;mongodb://127.0.0.1:1234,127.0.0.1:5678&quot;));&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;

&lt;p&gt;There are no warnings or errors and following code behaves with illusion of correctly passed replica set configuration:&lt;/p&gt;
&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;ReplicaSetStatus status = con.getReplicaSetStatus();&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;status.isMaster(new ServerAddress(&quot;127.0.0.1&quot;, 1234)); // true&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;status.isMaster(new ServerAddress(&quot;127.0.0.1&quot;, 5678)); // false&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;status.getMaster().toString(); // 127.0.0.1:1234&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;WriteResult r = con.getDB(&quot;x&quot;).getCollection(&quot;y&quot;).save(new BasicDBObject(&quot;a&quot;, &quot;b&quot;));&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;r.getLastError().throwOnError(); // there are no errors&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;

&lt;p&gt;The only way to detect that configuration is incorrect - specify REPLICA_SAFE write concern:&lt;/p&gt;
&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;con.getDB(&quot;x&quot;).getCollection(&quot;y&quot;).save(new BasicDBObject(&quot;a&quot;, &quot;b&quot;), WriteConcern.REPLICAS_SAFE); // com.mongodb.MongoException: norepl&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;</description>
                <environment>Windows 7 x64&lt;br/&gt;
mongodb 2.0.4</environment>
        <key id="53041">JAVA-665</key>
            <summary>Connection configuration allows to specify independent nodes as replica set</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="4" iconUrl="https://jira.mongodb.org/images/icons/priorities/minor.svg">Minor - P4</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="3">Duplicate</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="raman_yushkou@epam.com">Raman Yushkou</reporter>
                        <labels>
                    </labels>
                <created>Fri, 12 Oct 2012 19:00:57 +0000</created>
                <updated>Fri, 7 Mar 2014 05:55:03 +0000</updated>
                            <resolved>Fri, 7 Mar 2014 05:21:47 +0000</resolved>
                                    <version>2.9.0</version>
                    <version>2.9.1</version>
                                                    <component>Cluster Management</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="511330" author="raman_yushkou@epam.com" created="Fri, 7 Mar 2014 05:55:03 +0000"  >&lt;p&gt;Thank you, Jeff!&lt;/p&gt;

&lt;p&gt;Regards,&lt;br/&gt;
Raman&lt;/p&gt;



&lt;p&gt;-------- Original message --------&lt;br/&gt;
Subject: &lt;span class=&quot;error&quot;&gt;&amp;#91;MongoDB-JIRA&amp;#93;&lt;/span&gt; (&lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-665&quot; title=&quot;Connection configuration allows to specify independent nodes as replica set&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-665&quot;&gt;&lt;del&gt;JAVA-665&lt;/del&gt;&lt;/a&gt;) Connection configuration allows to specify independent nodes as replica set&lt;br/&gt;
From: &quot;Jeff Yemin (JIRA)&quot; &amp;lt;jira@mongodb.org&amp;gt;&lt;br/&gt;
To: Raman Yushkou &amp;lt;Raman_Yushkou@epam.com&amp;gt;&lt;br/&gt;
CC:&lt;/p&gt;



&lt;p&gt;    [ &lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-665?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&amp;amp;focusedCommentId=511317#comment-511317&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;https://jira.mongodb.org/browse/JAVA-665?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&amp;amp;focusedCommentId=511317#comment-511317&lt;/a&gt; ]&lt;/p&gt;

&lt;p&gt;Jeff Yemin commented on &lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-665&quot; title=&quot;Connection configuration allows to specify independent nodes as replica set&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-665&quot;&gt;&lt;del&gt;JAVA-665&lt;/del&gt;&lt;/a&gt;:&lt;br/&gt;
---------------------------------&lt;/p&gt;

&lt;p&gt;Hi Raman,&lt;/p&gt;

&lt;p&gt;Reviewing the backlog, I see that there is a duplicate of this in &lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-930&quot; title=&quot;Detect misconfigured clusters&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-930&quot;&gt;&lt;del&gt;JAVA-930&lt;/del&gt;&lt;/a&gt;, which will be fixed in 2.12.0.&lt;/p&gt;


&lt;p&gt;&amp;#8211;&lt;br/&gt;
This message is automatically generated by JIRA.&lt;br/&gt;
If you think it was sent incorrectly, please contact your JIRA administrators&lt;br/&gt;
For more information on JIRA, see: &lt;a href=&quot;http://www.atlassian.com/software/jira&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://www.atlassian.com/software/jira&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="511317" author="jeff.yemin" created="Fri, 7 Mar 2014 05:21:20 +0000"  >&lt;p&gt;Hi Raman,&lt;/p&gt;

&lt;p&gt;Reviewing the backlog, I see that there is a duplicate of this in &lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-930&quot; title=&quot;Detect misconfigured clusters&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-930&quot;&gt;&lt;del&gt;JAVA-930&lt;/del&gt;&lt;/a&gt;, which will be fixed in 2.12.0.&lt;/p&gt;</comment>
                            <comment id="174428" author="jeff.yemin" created="Fri, 12 Oct 2012 20:51:52 +0000"  >&lt;p&gt;Thanks for this report, Raman.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                            <outwardlinks description="duplicates">
                                        <issuelink>
            <issuekey id="86401">JAVA-930</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="39106" name="text.html" size="4381" author="raman_yushkou@epam.com" created="Fri, 7 Mar 2014 05:55:03 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hrjyuf:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>30193</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>