<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:08:47 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-25289] Make it possible to select a subset of documents based on the shard key</title>
                <link>https://jira.mongodb.org/browse/SERVER-25289</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;I recently had to distribute a batch job among multiple workers; the way I finally did it was computing the xxhash over the _id and storing that in an extra field (_id_hash) as a Long.&lt;/p&gt;

&lt;p&gt;Using this field, I could distribute the documents from the collection among N workers by computing the _id_hash % N and then having worker zero using modulus 0, worker 1 using modulus 1 and so on.&lt;/p&gt;

&lt;p&gt;I figured that mongodb would use a similar approach internally to compute the db shard to store a document on; I tried to find a way to reuse that mechanism but could not.&lt;/p&gt;

&lt;p&gt;Would it be possible to expose that capability of the shard key somehow?&lt;/p&gt;</description>
                <environment></environment>
        <key id="304183">SERVER-25289</key>
            <summary>Make it possible to select a subset of documents based on the shard key</summary>
                <type id="2" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14711&amp;avatarType=issuetype">New Feature</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="3">Duplicate</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="karo">Karolin Varner</reporter>
                        <labels>
                    </labels>
                <created>Tue, 26 Jul 2016 18:12:45 +0000</created>
                <updated>Mon, 1 Aug 2016 20:01:46 +0000</updated>
                            <resolved>Mon, 1 Aug 2016 20:01:46 +0000</resolved>
                                                                    <component>Sharding</component>
                                        <votes>0</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="1343572" author="thomas.schubert" created="Mon, 1 Aug 2016 20:01:22 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=karo&quot; class=&quot;user-hover&quot; rel=&quot;karo&quot;&gt;karo&lt;/a&gt;,&lt;/p&gt;

&lt;p&gt;Thank you for the feature suggestion. If I am understanding your use case correctly, &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-24274&quot; title=&quot;Create a command to provide query bounds for partitioning data in a collection&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-24274&quot;&gt;SERVER-24274&lt;/a&gt; would provide a command to partition data in a collection and will provide the functionality you are looking for. Please feel free to vote for &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-24274&quot; title=&quot;Create a command to provide query bounds for partitioning data in a collection&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-24274&quot;&gt;SERVER-24274&lt;/a&gt; and watch it for updates.&lt;/p&gt;

&lt;p&gt;In the meantime, you may want to consider using the command &lt;a href=&quot;https://docs.mongodb.com/manual/reference/command/splitVector/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;&lt;tt&gt;splitVector&lt;/tt&gt;&lt;/a&gt;. This command&apos;s functionality is not currently exposed (&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-10117&quot; title=&quot;expose splitVector functionality&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-10117&quot;&gt;&lt;del&gt;SERVER-10117&lt;/del&gt;&lt;/a&gt;). But you can see an example of its &lt;a href=&quot;https://github.com/mongodb/mongo-hadoop/blob/r1.5.2/core/src/main/java/com/mongodb/hadoop/splitter/StandaloneMongoSplitter.java#L94-L101&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;implementation in the Hadoop connector&lt;/a&gt;. Please note that if you choose pursue this approach there may be issues with very large datasets as the &lt;tt&gt;splitVector&lt;/tt&gt; command cannot return more than 16MB of split points (&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-22571&quot; title=&quot;splitVector should return a cursor so that it can return more than 16Mb worth of split points&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-22571&quot;&gt;&lt;del&gt;SERVER-22571&lt;/del&gt;&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;Kind regards,&lt;br/&gt;
Thomas&lt;/p&gt;</comment>
                            <comment id="1336476" author="karo" created="Tue, 26 Jul 2016 18:19:56 +0000"  >&lt;p&gt;Btw, I noticed while implementing my solution that $mod seems to ignore negative values; I had to add a special case for those and invert them.&lt;br/&gt;
Should I create a ticket for that too?&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                            <outwardlinks description="duplicates">
                                        <issuelink>
            <issuekey id="289045">SERVER-24274</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </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_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 27 Jul 2016 12:11:13 +0000</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            7 years, 28 weeks, 2 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>karo</customfieldvalue>
            <customfieldvalue>kelsey.schubert@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrk1bz:</customfieldvalue>

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

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