<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:50:49 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>[SERVER-19393] new Mongo() connections to replica sets does not appear to be independent</title>
                <link>https://jira.mongodb.org/browse/SERVER-19393</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;When I create multiple variables holding database connections, each with separate and distinct authentication credentials, which ever one I connect to second, I am unable to authenticate to.  In my case, the database connections are both replica sets, though I do not know if that matters.&lt;/p&gt;

&lt;p&gt;The shell SEEMS to be connecting to the different replica sets.  However, something is not right because when I try to authenticate to the second one, it always fails.  If I reverse the connection order, then the database that fails to authenticate reverses.  There is not a credential problem.  And it is not the order in which I authenticate, it is the order in which I connect.&lt;/p&gt;
</description>
                <environment></environment>
        <key id="216777">SERVER-19393</key>
            <summary>new Mongo() connections to replica sets does not appear to be independent</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</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="9">Done</resolution>
                                        <assignee username="sam.kleinman">Sam Kleinman</assignee>
                                    <reporter username="jarrowwx">John Arrowwood</reporter>
                        <labels>
                    </labels>
                <created>Tue, 14 Jul 2015 17:19:37 +0000</created>
                <updated>Mon, 10 Aug 2015 15:38:52 +0000</updated>
                            <resolved>Mon, 10 Aug 2015 15:38:52 +0000</resolved>
                                    <version>3.0.3</version>
                                                    <component>Shell</component>
                                        <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="1000800" author="samk" created="Mon, 10 Aug 2015 15:38:36 +0000"  >&lt;p&gt;The name of the replica set is, for the purposes of the shell (and likely other drivers) the unique identifier. I&apos;ve tested the shell&apos;s behavior here, and with authenticated and unauthenticated connections, the shell manages connections correctly. Sorry about the confusion, I&apos;m going to go ahead and close this ticket.&lt;/p&gt;

&lt;p&gt;Regards,&lt;br/&gt;
samh&lt;/p&gt;</comment>
                            <comment id="966491" author="kevin.pulo@10gen.com" created="Wed, 15 Jul 2015 10:17:00 +0000"  >&lt;p&gt;The name of the replica set is normally considered its unique identifier.  Why else should they have a name?  There are other things that will be confused by disjoint, separate replsets that the same name, for example, consider if a DNS problem accidentally swaps the IP addresses of a pair of perf and prod nodes.  This isn&apos;t a problem for replsets with different names.&lt;/p&gt;</comment>
                            <comment id="966029" author="jarrowwx" created="Tue, 14 Jul 2015 19:44:35 +0000"  >&lt;p&gt;It seems to me that a replica set should have a unique identifier.  If it did, then the shell could cache and monitor the state of the replica set based on that unique identifier, and then this use case would be possible.&lt;/p&gt;</comment>
                            <comment id="966023" author="renctan" created="Tue, 14 Jul 2015 19:40:43 +0000"  >&lt;p&gt;The shell caches and monitors the state of the replica set globally so it does not support talking to disjoint replica sets with the same set name.&lt;/p&gt;</comment>
                            <comment id="965878" author="jarrowwx" created="Tue, 14 Jul 2015 17:33:59 +0000"  >&lt;p&gt;One possible reason why I am getting this failure is the replica set names are the same, even though they are different sets.  One is our production environment, one is our performance verification environment.  The replica set names are the same because the one environment is a mirror of the other.&lt;/p&gt;

&lt;p&gt;That is, I have two different connections, to different hosts, but with the same replica set name, and so the Mongo shell is treating them as the same connection, which is why the authentication is failing.  This suggests that the object encapsulation one would expect by opening two different connections is somehow lost.  &lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>5.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Tue, 14 Jul 2015 19:40:43 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        8 years, 27 weeks, 2 days ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[]]></customfieldvalue>


                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>sam.kleinman</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            8 years, 27 weeks, 2 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_10032" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Operating System</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10026"><![CDATA[ALL]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>jarrowwx</customfieldvalue>
            <customfieldvalue>kevin.pulo@mongodb.com</customfieldvalue>
            <customfieldvalue>randolph@mongodb.com</customfieldvalue>
            <customfieldvalue>sam.kleinman</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrl0pr:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hsb6nj:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_23361" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Requested By</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10750" key="com.atlassian.jira.plugin.system.customfieldtypes:textarea">
                        <customfieldname>Steps To Reproduce</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>&lt;p&gt;1. Create a replica set ONE, with authentication user ONE, password FOO, hosted on hosts: host1, host2, host3&lt;br/&gt;
2. Create a second replica set TWO, with authentication user TWO, password BAR, on host4, host5, host6&lt;br/&gt;
3. In the mongo shell (--nodb), attempt to interact with both of them at the same time, such as:&lt;/p&gt;

&lt;p&gt;    var c_one = new Mongo( &apos;ONE/host1,host2,host3&apos; );&lt;br/&gt;
    var c_two = new Mongo( &apos;TWO/host4,host5,host6&apos; );&lt;/p&gt;

&lt;p&gt;    var db_one = c_one.getDB(&apos;someDB&apos;);&lt;br/&gt;
    db_one.auth( &apos;ONE&apos;, &apos;FOO&apos; );&lt;/p&gt;

&lt;p&gt;    var db_two = c_two.getDB(&apos;someOtherDB&apos;);&lt;br/&gt;
    db_two.auth( &apos;TWO&apos;, &apos;BAR&apos; );&lt;/p&gt;

&lt;p&gt;The attempt to authenticate to db_two will fail.&lt;br/&gt;
Change only the order of declaration of c_one and c_two, and run it again, and the authentication to db_one will fail, and the authentication to db_two will succeed.&lt;/p&gt;</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10053" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>Time In Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_22870" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Triagers</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hsfv2v:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                    </customfields>
    </item>
</channel>
</rss>