<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:20:32 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-29334] Cannot write shard chunks documents with _id fields containing values with dotted field names, e.g. { _id: { a.b: 10 } }</title>
                <link>https://jira.mongodb.org/browse/SERVER-29334</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;_id fields are not allowed to have values containing dotted field names, like we&apos;re currently doing for chunk metadata collections on the shard, e.g.&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;   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;{ _id: { &quot;a.b&quot;: 10 } }&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;Can see the problem if you follow this code &lt;a href=&quot;https://github.com/mongodb/mongo/blob/3bb7318a5b5c8d4a07696ab1dd292fe5b9077924/src/mongo/db/ops/insert.cpp#L119-L132&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here&lt;/a&gt;, &lt;a href=&quot;https://github.com/mongodb/mongo/blob/3bb7318a5b5c8d4a07696ab1dd292fe5b9077924/src/mongo/bson/bsonobj.h#L382-L384&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here&lt;/a&gt; and &lt;a href=&quot;https://github.com/mongodb/mongo/blob/3bb7318a5b5c8d4a07696ab1dd292fe5b9077924/src/mongo/bson/bsonobj.cpp#L416-L420&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here&lt;/a&gt;. This check doesn&apos;t appear to be done on non _id fields, so it&apos;s fine when we do it on the config server like this&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;   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;{ min: { &quot;a.b&quot;: 10 } }&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;_id checks on insert seem to have been introduced in v3.0 &lt;a href=&quot;https://github.com/mongodb/mongo/commit/34d899304d971942e6ce4743489495d11a4d48c1&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;in this commit&lt;/a&gt; (&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-12209&quot; title=&quot;_id with $prefix field causes replication failure due to unvalidated insert&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-12209&quot;&gt;&lt;del&gt;SERVER-12209&lt;/del&gt;&lt;/a&gt;). This is a server check. There are also more checks in the shell that prevent dotted field names, probably more generically. &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-12209&quot; title=&quot;_id with $prefix field causes replication failure due to unvalidated insert&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-12209&quot;&gt;&lt;del&gt;SERVER-12209&lt;/del&gt;&lt;/a&gt; seems to have been in response to errors involving &quot;$&quot; rather than any intention to check for dotted field names.&lt;/p&gt;

&lt;p&gt;The dotted field check originated in 1.7 via &lt;a href=&quot;https://github.com/mongodb/mongo/commit/6830dd0dd0462492ec0547050fb0eeb2908591b3&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;this commit&lt;/a&gt;&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;Dotted field names must be allowed on insert for shard keys. It is an inconsistency that we check for dotted field names on _id, but no other fields.&lt;/p&gt;</description>
                <environment></environment>
        <key id="386191">SERVER-29334</key>
            <summary>Cannot write shard chunks documents with _id fields containing values with dotted field names, e.g. { _id: { a.b: 10 } }</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="13201">Fixed</resolution>
                                        <assignee username="dianna.hohensee@mongodb.com">Dianna Hohensee</assignee>
                                    <reporter username="dianna.hohensee@mongodb.com">Dianna Hohensee</reporter>
                        <labels>
                    </labels>
                <created>Tue, 23 May 2017 18:53:41 +0000</created>
                <updated>Mon, 30 Oct 2023 23:16:36 +0000</updated>
                            <resolved>Fri, 2 Jun 2017 13:09:19 +0000</resolved>
                                                    <fixVersion>3.5.9</fixVersion>
                                    <component>Sharding</component>
                                        <votes>0</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="1585839" author="xgen-internal-githook" created="Fri, 2 Jun 2017 13:07:05 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;DiannaHohensee&apos;, u&apos;name&apos;: u&apos;Dianna Hohensee&apos;, u&apos;email&apos;: u&apos;dianna.hohensee@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-29334&quot; title=&quot;Cannot write shard chunks documents with _id fields containing values with dotted field names, e.g. { _id: { a.b: 10 } }&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-29334&quot;&gt;&lt;del&gt;SERVER-29334&lt;/del&gt;&lt;/a&gt; remove dotted field name check from BSONObj::okForStorage&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/7ae19ef3ae9a4555ff71acf8e44f34775b130d3e&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/7ae19ef3ae9a4555ff71acf8e44f34775b130d3e&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1579041" author="dianna.hohensee" created="Wed, 24 May 2017 16:10:11 +0000"  >&lt;p&gt;The proposed solution is to remove &lt;a href=&quot;https://github.com/mongodb/mongo/blob/3bb7318a5b5c8d4a07696ab1dd292fe5b9077924/src/mongo/bson/bsonobj.cpp#L416-L420&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;this&lt;/a&gt; code that does the dotted field checks in BSONObj::_okForStorage. After &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-29349&quot; title=&quot;Delete shell/upgrade_check.js&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-29349&quot;&gt;&lt;del&gt;SERVER-29349&lt;/del&gt;&lt;/a&gt; and &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-29351&quot; title=&quot;remove redundant use of BSONObj::storageValidEmbedded from modifier_add_to_set.cpp&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-29351&quot;&gt;&lt;del&gt;SERVER-29351&lt;/del&gt;&lt;/a&gt;, insert.cpp and shard_key_pattern.cpp will be the only users of BSONObj::_okForStorage, and neither of those uses were intended to catch dotted field names, but rather incorrect &apos;$&apos; and ref uses.&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;Added to ops/insert.cpp to check for &apos;$&apos;&apos; fields, &lt;a href=&quot;https://github.com/mongodb/mongo/commit/34d899304d971942e6ce4743489495d11a4d48c1&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/34d899304d971942e6ce4743489495d11a4d48c1&lt;/a&gt; Not intended to check for dotted field names. Unsure whether we want to keep a.$.b checks somehow &amp;#8211; removing dotted field name checks lets this format of field name with &apos;$&apos; slip by.&lt;/p&gt;

&lt;p&gt;Introduced to shard_key_pattern.cpp in this commit &lt;a href=&quot;https://github.com/mongodb/mongo/commit/a67ea3ac0c570cc738d43494079e2bc284aa5071#diff-de3717d584ea2ec74a8014339593ce2fR54&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/a67ea3ac0c570cc738d43494079e2bc284aa5071#diff-de3717d584ea2ec74a8014339593ce2fR54&lt;/a&gt; to fix &apos;$&apos; problems. Doesn&apos;t seem to need the dotted field check, explicitly, so seems incidental.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                        <issuelink>
            <issuekey id="386488">SERVER-29349</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="386495">SERVER-29351</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is depended on by">
                                                        </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10020">
                    <name>Gantt Dependency</name>
                                            <outwardlinks description="has to be done before">
                                        <issuelink>
            <issuekey id="386188">SERVER-29333</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="444864">DOCS-10896</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="287069">SERVER-24174</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="50150">SERVER-6999</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="85014">SERVER-10454</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>2.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10011" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Backwards Compatibility</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10038"><![CDATA[Fully Compatible]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Fri, 2 Jun 2017 13:07:05 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        6 years, 36 weeks, 5 days ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[<s><a href='https://jira.mongodb.org/browse/SERVER-29349'>SERVER-29349</a></s>, <s><a href='https://jira.mongodb.org/browse/SERVER-29351'>SERVER-29351</a></s>]]></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>
                            6 years, 36 weeks, 5 days ago
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_16465" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Linked BF Score</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0.0</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>dianna.hohensee@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|ht7vnr:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hralh3:</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="1704">Sharding 2017-05-29</customfieldvalue>
    <customfieldvalue id="1705">Sharding 2017-06-19</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|ht7hq7:</customfieldvalue>

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