<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:30:04 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-32381] The copyDatabase shell helper should take a writeConcern option</title>
                <link>https://jira.mongodb.org/browse/SERVER-32381</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;As the copyDatabase command can be resource intensive, there should be a way to pass &lt;tt&gt;writeConcern&lt;/tt&gt;. The &lt;tt&gt;copydb&lt;/tt&gt; command that &lt;tt&gt;copyDatabase&lt;/tt&gt; uses internally does support &lt;tt&gt;writeConcern&lt;/tt&gt;, so the shell helper should be able to pass that along.&lt;/p&gt;

&lt;h6&gt;&lt;a name=&quot;OriginalSummary&quot;&gt;&lt;/a&gt;Original Summary&lt;/h6&gt;

&lt;p&gt;Can you specify a write concern value on the copyDatabase operation&lt;/p&gt;

&lt;h6&gt;&lt;a name=&quot;OriginalDescription&quot;&gt;&lt;/a&gt;Original Description&lt;/h6&gt;

&lt;p&gt;When we copy large databases, we notice that a secondary in our 3 node replicate set goes into the RECOVERING state and never recovers.&lt;/p&gt;

&lt;p&gt;I figured it&apos;s because the database we are copying is 8gb in size and the oplog isn&apos;t big enough.  The replica set is configured to have a write concern of 1.  So as soon as one node acknowledges the write, the Primary moves on.  However these copy operations are progressing at such a pace that one of the secondaries isn&apos;t able to keep up and the master no longer has any oplog entries to allow the secondary to catch up.  &lt;/p&gt;

&lt;p&gt;Why this secondary doesn&apos;t fall back to the initial sync state I don&apos;t know.  It just seems to stay in the RECOVERING state for weeks on end with no change to the optime at all.&lt;/p&gt;

&lt;p&gt;I didn&apos;t want to change the default writeConcern to 2.  Because then if one node goes down, then all the writes would fail waiting for a 2nd secondary to acknowledge the replication.  &lt;/p&gt;

&lt;p&gt;I didn&apos;t want to change the default writeConcern to &quot;majority&quot; based on the same fears.  If one node goes down, is the majority condition determined by the majority of secondaries that are configured?  Or the majority of the secondaries that are alive?  &lt;/p&gt;

&lt;p&gt;I thought it would be good if the copyDatabase operation takes a writeConcern value like the other db insert and update operations.  Does mongodb do something like that?  I couldn&apos;t find anything in the documentation.  &lt;/p&gt;

&lt;p&gt;Thanks&lt;/p&gt;</description>
                <environment></environment>
        <key id="473607">SERVER-32381</key>
            <summary>The copyDatabase shell helper should take a writeConcern option</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</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="2">Won&apos;t Fix</resolution>
                                        <assignee username="andrew.morrow@mongodb.com">Andrew Morrow</assignee>
                                    <reporter username="michael.qiu@wdtl.com">asdf01</reporter>
                        <labels>
                    </labels>
                <created>Mon, 18 Dec 2017 05:29:23 +0000</created>
                <updated>Tue, 30 Jul 2019 15:01:53 +0000</updated>
                            <resolved>Tue, 30 Jul 2019 15:01:53 +0000</resolved>
                                                                    <component>Shell</component>
                                        <votes>0</votes>
                                    <watches>8</watches>
                                                                                                                <comments>
                            <comment id="2350427" author="acm" created="Tue, 30 Jul 2019 15:01:46 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=michael.qiu%40wdtl.com&quot; class=&quot;user-hover&quot; rel=&quot;michael.qiu@wdtl.com&quot;&gt;michael.qiu@wdtl.com&lt;/a&gt; - Please be aware that the copydb functionality is being removed in MongoDB 4.2, after its deprecation in 4.0. Given that, we will not be making changes to the shell helpers, especially given that there is an adequate workaround via the above &lt;tt&gt;runCommand&lt;/tt&gt; discussion.&lt;/p&gt;

&lt;p&gt;For additional information, please see &lt;a href=&quot;https://docs.mongodb.com/master/release-notes/4.2-compatibility/#remove-support-for-the-copydb-and-clone-commands&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://docs.mongodb.com/master/release-notes/4.2-compatibility/#remove-support-for-the-copydb-and-clone-commands&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I&apos;m going to close this ticket now, but please follow up if we can provide any additional assistance.&lt;/p&gt;</comment>
                            <comment id="1758142" author="mark.agarunov" created="Thu, 21 Dec 2017 20:01:11 +0000"  >&lt;p&gt;Hello &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=michael.qiu%40wdtl.com&quot; class=&quot;user-hover&quot; rel=&quot;michael.qiu@wdtl.com&quot;&gt;michael.qiu@wdtl.com&lt;/a&gt;,&lt;/p&gt;

&lt;p&gt;Thank you for the additional information. Note that the &lt;tt&gt;writeConcern&lt;/tt&gt; is an option passed to &lt;tt&gt;db.runCommand&lt;/tt&gt;, not to &lt;tt&gt;copydb&lt;/tt&gt; and can be passed to other commands executed with &lt;tt&gt;db.runCommand&lt;/tt&gt;. However, as you noted neither the documentation for &lt;tt&gt;copydb&lt;/tt&gt; nor &lt;tt&gt;db.runCommand&lt;/tt&gt; mentions the &lt;tt&gt;writeConcern&lt;/tt&gt; option so I&apos;ve opened &lt;a href=&quot;https://jira.mongodb.org/browse/DOCS-11152&quot; title=&quot;db.runCommand() accepts a writeConcern parameter&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DOCS-11152&quot;&gt;&lt;del&gt;DOCS-11152&lt;/del&gt;&lt;/a&gt; to address this issue.&lt;/p&gt;

&lt;p&gt;Thanks,&lt;br/&gt;
Mark&lt;/p&gt;</comment>
                            <comment id="1756175" author="michael.qiu@wdtl.com" created="Tue, 19 Dec 2017 21:15:38 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=mark.agarunov&quot; class=&quot;user-hover&quot; rel=&quot;mark.agarunov&quot;&gt;mark.agarunov&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thanks for looking into this query.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Please note that SERVER project is for reporting bugs or feature suggestions &lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;It is a feature suggestion: add write concern to the db.copyDatabase operation.  &lt;/p&gt;

&lt;p&gt;In this particular case, it looks like the feature already exists in the alternative copydb command.  However no one outside the mongodb organisation is going to know about this feature if mongodb doesn&apos;t add it to its documentation.  If you even bothered to look at the &lt;a href=&quot;https://docs.mongodb.com/manual/reference/command/copydb/#dbcmd.copydb&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;copydb page you referenced&lt;/a&gt;, you&apos;ll notice that there is no mention of writeConcern on there.  &lt;/p&gt;

&lt;p&gt;So instead of telling me to go away to some other forum, maybe your organization should be grateful that I brought this issue to your attention and take this opportunity to raise a documentation bug.  &lt;/p&gt;

&lt;p&gt;Thanks&lt;/p&gt;</comment>
                            <comment id="1756053" author="mark.agarunov" created="Tue, 19 Dec 2017 19:48:38 +0000"  >&lt;p&gt;Hello &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=michael.qiu%40wdtl.com&quot; class=&quot;user-hover&quot; rel=&quot;michael.qiu@wdtl.com&quot;&gt;michael.qiu@wdtl.com&lt;/a&gt;,&lt;/p&gt;

&lt;p&gt;Thank you for the report. To use writeConcern on the copyDatabase operation, you can execute the command with &lt;tt&gt;db.runCommand&lt;/tt&gt; on the admin database &lt;a href=&quot;https://docs.mongodb.com/manual/reference/command/copydb/#dbcmd.copydb&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;using the &lt;tt&gt;copydb&lt;/tt&gt; command&lt;/a&gt; (which &lt;tt&gt;db.runCommand&lt;/tt&gt; is a wrapper around):&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;replset:PRIMARY&amp;gt; use admin&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;switched to db admin&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;replset:PRIMARY&amp;gt; db.runCommand({copydb:1, fromdb:&apos;testing&apos;,todb:&apos;testing2&apos;,writeConcern:{w:2}})&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;{ &quot;ok&quot; : 1 }&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;Please note that 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;https://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-user group.&lt;/p&gt;

&lt;p&gt;Thanks,&lt;br/&gt;
Mark&lt;/p&gt;</comment>
                            <comment id="1754166" author="michael.qiu@wdtl.com" created="Mon, 18 Dec 2017 05:31:06 +0000"  >&lt;p&gt;Another way to avoid this problem is if we could throttle the copyDatabase operation some how.  Is this possible?  Thanks.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="475388">DOCS-11152</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="186419">SERVER-17392</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="540647">SERVER-34885</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <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_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Tue, 19 Dec 2017 19:48:38 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        4 years, 28 weeks, 1 day 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>andrew.morrow@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            4 years, 28 weeks, 1 day ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>andrew.morrow@mongodb.com</customfieldvalue>
            <customfieldvalue>michael.qiu@wdtl.com</customfieldvalue>
            <customfieldvalue>mark.agarunov</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|htmg5r:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr9j3j:</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_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="3112">Dev Tools 2019-08-12</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|htm2a7:</customfieldvalue>

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