<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 02:56:31 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-1253] in Master-Master replication ismaster is 0 on both nodes</title>
                <link>https://jira.mongodb.org/browse/SERVER-1253</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Configured as per &lt;a href=&quot;http://www.mongodb.org/display/DOCS/Master+Master+Replication&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://www.mongodb.org/display/DOCS/Master+Master+Replication&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Startup commands:&lt;br/&gt;
/opt/mongodb-1.5.3/bin/mongod --port 27017 --dbpath /opt/tmp/mongodbdata --master --slave --source localhost:27018 --rest &lt;br/&gt;
/opt/mongodb-1.5.3/bin/mongod --port 27018 --dbpath /opt/tmp/mongodbdata2 --master --slave --source localhost:27017 --rest &lt;/p&gt;

&lt;p&gt;But, neither node are master: &lt;br/&gt;
$/opt/mongodb-1.5.3/bin/mongo localhost:27017  --eval &quot;printjson(db.\ $cmd.findOne(&lt;/p&gt;
{ismaster:1}
&lt;p&gt;));&quot; &lt;br/&gt;
MongoDB shell version: 1.5.3 &lt;br/&gt;
connecting to: localhost:27017/test &lt;/p&gt;
{ &quot;ismaster&quot; : 0, &quot;msg&quot; : &quot;not paired&quot;, &quot;ok&quot; : true } 

&lt;p&gt;$/opt/mongodb-1.5.3/bin/mongo localhost:27018  --eval &quot;printjson(db.\ $cmd.findOne(&lt;/p&gt;
{ismaster:1}
&lt;p&gt;));&quot; &lt;br/&gt;
MongoDB shell version: 1.5.3 &lt;br/&gt;
connecting to: localhost:27018/test &lt;/p&gt;
{ &quot;ismaster&quot; : 0, &quot;msg&quot; : &quot;not paired&quot;, &quot;ok&quot; : true } 


&lt;p&gt;Michael Dirolf confirmed:&lt;br/&gt;
Okay I can reproduce this. Seems to me that ismaster should be true &lt;br/&gt;
when running w/ both --master and --slave. Mind opening a jira for &lt;br/&gt;
this? &lt;/p&gt;
</description>
                <environment>all mongo versions</environment>
        <key id="12185">SERVER-1253</key>
            <summary>in Master-Master replication ismaster is 0 on both nodes</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="eliot">Eliot Horowitz</assignee>
                                    <reporter username="cheenu">Cheenu</reporter>
                        <labels>
                    </labels>
                <created>Fri, 18 Jun 2010 10:58:04 +0000</created>
                <updated>Tue, 12 Jul 2016 00:28:59 +0000</updated>
                            <resolved>Tue, 13 Jul 2010 17:03:26 +0000</resolved>
                                                    <fixVersion>1.5.5</fixVersion>
                                    <component>Replication</component>
                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="15791" author="auto" created="Wed, 14 Jul 2010 14:16:20 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;login&apos;: &apos;erh&apos;, &apos;name&apos;: &apos;Eliot Horowitz&apos;, &apos;email&apos;: &apos;eliot@10gen.com&apos;}
&lt;p&gt;Message: more tests for ismaster &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-1253&quot; title=&quot;in Master-Master replication ismaster is 0 on both nodes&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-1253&quot;&gt;&lt;del&gt;SERVER-1253&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;http://github.com/mongodb/mongo/commit/b443d7c0b902cac4b03fa6fefaaf08b0da8bf98d&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://github.com/mongodb/mongo/commit/b443d7c0b902cac4b03fa6fefaaf08b0da8bf98d&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="15789" author="auto" created="Wed, 14 Jul 2010 14:06:03 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;login&apos;: &apos;erh&apos;, &apos;name&apos;: &apos;Eliot Horowitz&apos;, &apos;email&apos;: &apos;eliot@10gen.com&apos;}
&lt;p&gt;Message: fix ismaster for master/master &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-1253&quot; title=&quot;in Master-Master replication ismaster is 0 on both nodes&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-1253&quot;&gt;&lt;del&gt;SERVER-1253&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;http://github.com/mongodb/mongo/commit/564f6d8f1eb916e35f67a28ac40f079259201c0b&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://github.com/mongodb/mongo/commit/564f6d8f1eb916e35f67a28ac40f079259201c0b&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="15742" author="auto" created="Tue, 13 Jul 2010 17:03:37 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;login&apos;: &apos;erh&apos;, &apos;name&apos;: &apos;Eliot Horowitz&apos;, &apos;email&apos;: &apos;eliot@10gen.com&apos;}
&lt;p&gt;Message: in master/master ismaster should be 1 &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-1253&quot; title=&quot;in Master-Master replication ismaster is 0 on both nodes&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-1253&quot;&gt;&lt;del&gt;SERVER-1253&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;http://github.com/mongodb/mongo/commit/164efbd0a2138d1612154e857caf90843ed3d697&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://github.com/mongodb/mongo/commit/164efbd0a2138d1612154e857caf90843ed3d697&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="15367" author="kzk_mover" created="Sat, 3 Jul 2010 12:22:46 +0000"  >&lt;p&gt;Thanks for the comment! I want to know about your concern, if this patch leads to something bad.&lt;/p&gt;</comment>
                            <comment id="15362" author="eliot" created="Sat, 3 Jul 2010 11:23:55 +0000"  >&lt;p&gt;We&apos;ll do something similar - need to test thoroughly before pushing though&lt;/p&gt;</comment>
                            <comment id="15360" author="kzk_mover" created="Sat, 3 Jul 2010 11:00:01 +0000"  >&lt;p&gt;The attached patch fixed the problem.&lt;/p&gt;

&lt;p&gt;kzk% ./mongo localhost:27017 --eval &quot;printjson(db.\$cmd.findOne(&lt;/p&gt;
{ismaster:1}
&lt;p&gt;));&quot;                                            &lt;br/&gt;
MongoDB shell version: 1.5.5-pre-&lt;br/&gt;
connecting to: localhost:27017/test&lt;/p&gt;
{ &quot;ismaster&quot; : 1, &quot;msg&quot; : &quot;not paired&quot;, &quot;ok&quot; : true }
&lt;p&gt;kzk% ./mongo localhost:27018 --eval &quot;printjson(db.\$cmd.findOne(&lt;/p&gt;
{ismaster:1}
&lt;p&gt;));&quot; &lt;br/&gt;
MongoDB shell version: 1.5.5-pre-&lt;br/&gt;
connecting to: localhost:27018/test&lt;/p&gt;
{ &quot;ismaster&quot; : 1, &quot;msg&quot; : &quot;not paired&quot;, &quot;ok&quot; : true }

&lt;p&gt;Also confirmed that ScopedDbConnection correctly worked.&lt;/p&gt;

&lt;p&gt;kzk% g++ -I. -I/opt/local/include/ -L. -L/opt/local/lib/ -lmongoclient -lboost_thread-mt -lboost_system-mt test.cpp; ./a.out&lt;br/&gt;
kzk% # no error occurred&lt;/p&gt;

&lt;p&gt;Finally, I also confirmed that ismaster shows the proper value in the master-slave configuration.&lt;/p&gt;

&lt;p&gt;Could you check the patch, and commit to the repository? I&apos;m really happy if this patch is also applied to stable branch. Because we&apos;re now trying to use master-master replication in the production environment.&lt;/p&gt;

&lt;p&gt;Thanks in advance&lt;br/&gt;
Kazuki&lt;/p&gt;</comment>
                            <comment id="15359" author="kzk_mover" created="Sat, 3 Jul 2010 10:55:40 +0000"  >&lt;p&gt;This problem prevents using ScopedDbConnection for master-master replication.&lt;/p&gt;

&lt;p&gt;int   &lt;br/&gt;
main()&lt;br/&gt;
{&lt;br/&gt;
  try &lt;/p&gt;
{
    mongo::ScopedDbConnection c(&quot;localhost:27017,localhost:27018&quot;);
    c.done();
  }
&lt;p&gt; catch (exception&amp;amp; e) &lt;/p&gt;
{   
    cerr &amp;lt;&amp;lt; e.what() &amp;lt;&amp;lt; endl;
  }
&lt;p&gt;}&lt;/p&gt;

&lt;p&gt;kzk% g++ -I. -I/opt/local/include/ -L. -L/opt/local/lib/ -lmongoclient -lboost_thread-mt -lboost_system-mt test.cpp; ./a.out&lt;br/&gt;
dbconnectionpool: connect failed &lt;span class=&quot;error&quot;&gt;&amp;#91;2&amp;#93;&lt;/span&gt; localhost:27017,localhost:27018&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                            <attachment id="10266" name="mongod-ismaster-fix.patch" size="583" author="kzk_mover" created="Sat, 3 Jul 2010 11:00:01 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>7.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Sat, 3 Jul 2010 10:55:40 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        13 years, 32 weeks 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>ramon.fernandez@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            13 years, 32 weeks ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Old_Backport</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10000"><![CDATA[No]]></customfieldvalue>

                        </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>auto</customfieldvalue>
            <customfieldvalue>cheenu</customfieldvalue>
            <customfieldvalue>eliot</customfieldvalue>
            <customfieldvalue>kzk_mover</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrpl6f:</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>21970</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_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|ht0im7:</customfieldvalue>

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