<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:00:15 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-22386] could not contact primary</title>
                <link>https://jira.mongodb.org/browse/SERVER-22386</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;We deploy sharded cluster between multi locations(data center).&lt;br/&gt;
We have multi replica set for each location, Also We have use from CSRS for configsvr, and We  distribute configsvr between all locations.&lt;br/&gt;
Also we have 4 mongos that each mongos connect to near configsvr from config replica set name.&lt;br/&gt;
Issue: When I query to find into sharded collection, I get some error,Also Why I just use from tag shard aware into all query(insert, criteria).&lt;/p&gt;


&lt;p&gt;I describe all details about this sharded cluster at below:&lt;br/&gt;
1- mongodb version: 3.2.1&lt;br/&gt;
2- QTY of locations(or Data center): 4 location to the names (thr, ifn, mhd, bnd)&lt;br/&gt;
3- The location &quot;thr&quot; is main datacenter, Then the thr must be majority on replica set.&lt;br/&gt;
4- We deploy the replica set for configsvr, and We put 4 members into thr, 4 into mhd, 4 into ifn and one member into bnd.&lt;br/&gt;
5- The thr is majority, Then 3 of members is votes=1 and other is zero(CSRS)&lt;br/&gt;
6- Other locations(mhd,ifn), They have just one member for votes=1(CSRS)&lt;br/&gt;
7- The bnd location just one secondery with votes=0(CSRS)&lt;br/&gt;
8- Each location have one replica set(3 members) for sharding.(Shard)&lt;br/&gt;
9- We use tag aware for replica set&lt;br/&gt;
10- We have 4 mongos, 4 replica set(3 member for two replica set, 2member for other replica set), 1 replica set configsvr(13 member)&lt;br/&gt;
11- Shard key: origin_code&lt;br/&gt;
12- We use tag aware&lt;/p&gt;

&lt;p&gt;Example of Error when I insert doc with shard key:&lt;br/&gt;
mongos&amp;gt; db.origins.insert(&lt;/p&gt;
{origin_code:52}
&lt;p&gt;)&lt;br/&gt;
WriteResult({&lt;br/&gt;
	&quot;nInserted&quot; : 0,&lt;br/&gt;
	&quot;writeError&quot; : &lt;/p&gt;
{
		&quot;code&quot; : 7,
		&quot;errmsg&quot; : &quot;could not contact primary for replica set thr&quot;
	}
&lt;p&gt;})&lt;/p&gt;


&lt;p&gt;My question is if bnd replica set(shard, configsvr, mongos of bnd is up) disconnected from sharded cluster, That must be work and even it insert and find, So when it connected to sharded cluster configsvr must be migrate chunk or doc from bnd replica set to thr replica set.&lt;br/&gt;
Why thr replica set is disconnected from shard, I can&apos;t insert doc with tag thr(origin_code for the is 52).&lt;/p&gt;</description>
                <environment></environment>
        <key id="262017">SERVER-22386</key>
            <summary>could not contact primary</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="stephen.steneker@mongodb.com">Stennie Steneker</assignee>
                                    <reporter username="Ali.Hallaji">Ali Hallaji</reporter>
                        <labels>
                    </labels>
                <created>Sun, 31 Jan 2016 10:43:04 +0000</created>
                <updated>Thu, 6 Apr 2023 15:43:32 +0000</updated>
                            <resolved>Sun, 31 Jan 2016 11:38:23 +0000</resolved>
                                                                    <component>Replication</component>
                    <component>Sharding</component>
                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="1158982" author="ali.hallaji" created="Sun, 31 Jan 2016 13:10:32 +0000"  >&lt;p&gt;Ok, Thank you very much&lt;/p&gt;</comment>
                            <comment id="1158976" author="stennie" created="Sun, 31 Jan 2016 12:08:02 +0000"  >&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;The information in the current description isn&apos;t entirely clear, but this sounds like a support issue which needs some further discussion on your deployment and usage before determining if there might be a server issue.&lt;/p&gt;

&lt;p&gt;&amp;gt; My question is if bnd replica set(shard, configsvr, mongos of bnd is up) disconnected from sharded cluster, That must be work and even it insert and find, So when it connected to sharded cluster configsvr must be migrate chunk or doc from bnd replica set to thr replica set.&lt;/p&gt;

&lt;p&gt;If a replica set is part of a sharded cluster, you can only insert documents via a &lt;tt&gt;mongos&lt;/tt&gt;. You can&apos;t isolate a replica set from a sharded cluster and expect normal operation (eg. migrations or inserting documents into an unavailable shard). The error message &quot;could not contact primary for replica set thr&quot; would be expected if that replica set was inaccessible or did not have a current primary.&lt;/p&gt;

&lt;p&gt;It would be more appropriate if you can start a new discussion in 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;. MongoDB team members are active in this forum and you can also benefit from the experience of other MongoDB users.&lt;/p&gt;

&lt;p&gt;Thanks,&lt;br/&gt;
Stephen&lt;/p&gt;</comment>
                            <comment id="1158966" author="ali.hallaji" created="Sun, 31 Jan 2016 11:43:19 +0000"  >&lt;p&gt;Hi Stephen Steneker,&lt;br/&gt;
Thank you for your comment.&lt;br/&gt;
Yes of course, But I think this issue may be bug.&lt;br/&gt;
Because It not work normally.&lt;/p&gt;

&lt;p&gt;Best Regards,&lt;br/&gt;
Hallaji &lt;/p&gt;</comment>
                            <comment id="1158965" author="stennie" created="Sun, 31 Jan 2016 11:38:23 +0000"  >&lt;p&gt;Hi Ali,&lt;/p&gt;

&lt;p&gt;The SERVER project is for reporting bugs or feature suggestions for the MongoDB server. For MongoDB-related support discussion please post on the &lt;a href=&quot;https://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;, where your question will reach a larger audience.&lt;/p&gt;

&lt;p&gt;A question like this involving more discussion would be best posted 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;.&lt;/p&gt;

&lt;p&gt;See our &lt;a href=&quot;https://www.mongodb.org/about/support/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Technical Support page&lt;/a&gt; for additional support resources.&lt;/p&gt;

&lt;p&gt;Thanks,&lt;br/&gt;
Stephen&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>4.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Sun, 31 Jan 2016 11:38:23 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        8 years, 2 weeks, 3 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>luke.bonanomi@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            8 years, 2 weeks, 3 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>Ali.Hallaji</customfieldvalue>
            <customfieldvalue>stephen.steneker@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrkjfr:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hshwav:</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_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|hsfa13:</customfieldvalue>

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