<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:35:55 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>[GODRIVER-1207] InsertOne returns (NotMaster) not master when connect using &quot;connect=direct&quot;</title>
                <link>https://jira.mongodb.org/browse/GODRIVER-1207</link>
                <project id="14289" key="GODRIVER">Go Driver</project>
                    <description>&lt;p&gt;I deploy MongoDB replicaset with single endpoint. Want to test connection using simple code to write but write failed by returns &apos;(NotMaster) not master&apos; when i tried to connect to MongoDB using URI &quot;mongodb://serverIP:27017/admin?connect=direct&quot;&lt;/p&gt;

&lt;p&gt;```&lt;br/&gt;
&#160;&#160;&#160;rows := db.Database(&quot;tester&quot;).Collection(&quot;test1&quot;)&lt;br/&gt;
&#160; &#160;cursor, err := rows.InsertOne(context.TODO(), json)&lt;br/&gt;
&#160; &#160;if err != nil &lt;/p&gt;
{
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;log.Printf(&quot;%v&quot;, err)
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;continue
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;}

&lt;p&gt;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;id := cursor.InsertedID&lt;br/&gt;
```&lt;br/&gt;
return message:&lt;br/&gt;
```&lt;br/&gt;
2019/07/26 13:21:40 (NotMaster) not master&lt;br/&gt;
```&lt;br/&gt;
But when i create similar function to insert using pymongo, connect using same URI it returns &apos;no master&apos; for a couple second and then works fine.&lt;/p&gt;

&lt;p&gt;```&lt;br/&gt;
result = col_ready.insert_one(post).acknowledged&lt;br/&gt;
logger(&quot;&amp;gt; {1}&quot;.format(i, result))&lt;br/&gt;
time.sleep(1)&lt;br/&gt;
```&lt;br/&gt;
return message:&lt;br/&gt;
```&lt;br/&gt;
2019-07-26 13:25:01,366 not master&lt;br/&gt;
2019-07-26 13:25:02,704 &amp;gt; True &lt;br/&gt;
```&lt;/p&gt;

&lt;p&gt;Did i miss something?&lt;br/&gt;
&#160;&lt;/p&gt;</description>
                <environment>AKS&lt;br/&gt;
Kubernetes 1.12&lt;br/&gt;
MongoDB 4.0.9</environment>
        <key id="876268">GODRIVER-1207</key>
            <summary>InsertOne returns (NotMaster) not master when connect using &quot;connect=direct&quot;</summary>
                <type id="3" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14718&amp;avatarType=issuetype">Task</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="-1">Unassigned</assignee>
                                    <reporter username="avbee.lab@gmail.com">bimo adi</reporter>
                        <labels>
                    </labels>
                <created>Fri, 26 Jul 2019 05:30:42 +0000</created>
                <updated>Wed, 11 Sep 2019 18:35:07 +0000</updated>
                            <resolved>Tue, 30 Jul 2019 14:10:31 +0000</resolved>
                                    <version>1.0.4</version>
                                                    <component>CRUD</component>
                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="2350228" author="esha.bhargava" created="Tue, 30 Jul 2019 14:10:22 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=avbee.lab%40gmail.com&quot; class=&quot;user-hover&quot; rel=&quot;avbee.lab@gmail.com&quot;&gt;avbee.lab@gmail.com&lt;/a&gt; Thanks for your report. Please note that this project is for reporting bugs or feature suggestions for the driver. For MongoDB-related support discussion please post on the &lt;a href=&quot;http://groups.google.com/group/mongodb-user&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;mongodb-user group&lt;/a&gt; or &lt;a href=&quot;http://stackoverflow.com/questions/tagged/mongodb&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Stack Overflow with the &lt;tt&gt;mongodb&lt;/tt&gt; tag&lt;/a&gt;. A question like this involving more discussion would be best posted on the mongodb-users group.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </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|hv6mzb:</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>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>