<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:56: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>[JAVA-2176] splitVector added as an OBEDIENT_COMMANDS</title>
                <link>https://jira.mongodb.org/browse/JAVA-2176</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;I am using the mongo hadoop connector which uses the splitVector command (&lt;a href=&quot;https://github.com/mongodb/mongo-hadoop/blob/master/core/src/main/java/com/mongodb/hadoop/splitter/StandaloneMongoSplitter.java#L94&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-hadoop/blob/master/core/src/main/java/com/mongodb/hadoop/splitter/StandaloneMongoSplitter.java#L94&lt;/a&gt;). I would like to force this command to be run against a secondary in my replica set but splitVector isn&apos;t a member of the &quot;OBEDIENT_COMMANDS&quot; which it looks like it needs to be in order to return my requestedPreference (secondary). Is there any reason why splitVector can&apos;t be added to the OBEDIENT_COMMANDS? Maybe there is another way of working this issue? Let me know if I can provide any more information.&lt;/p&gt;</description>
                <environment></environment>
        <key id="281981">JAVA-2176</key>
            <summary>splitVector added as an OBEDIENT_COMMANDS</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="bensmith">Ben Smith</reporter>
                        <labels>
                    </labels>
                <created>Sat, 23 Apr 2016 22:33:49 +0000</created>
                <updated>Wed, 11 Sep 2019 19:13:39 +0000</updated>
                            <resolved>Mon, 25 Apr 2016 08:26:08 +0000</resolved>
                                    <version>3.2.0</version>
                                                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="1246934" author="bensmith" created="Tue, 26 Apr 2016 17:14:30 +0000"  >&lt;p&gt;Hi Ross, &lt;/p&gt;

&lt;p&gt;I opened this ticket &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-23917&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;https://jira.mongodb.org/browse/SERVER-23917&lt;/a&gt; to ask for the server team to enable spitVector to be run against a secondary. Will draw attention to &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; in &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-23917&quot; title=&quot;splitVector can&amp;#39;t be run against secondary&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-23917&quot;&gt;&lt;del&gt;SERVER-23917&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Thanks,&lt;br/&gt;
Ben&lt;/p&gt;</comment>
                            <comment id="1246550" author="ross@10gen.com" created="Tue, 26 Apr 2016 12:25:30 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=bensmith&quot; class=&quot;user-hover&quot; rel=&quot;bensmith&quot;&gt;bensmith&lt;/a&gt;,&lt;/p&gt;

&lt;p&gt;I think its restricted because its an internal command for sharding.  There is a server ticket &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; regarding exposing the splitVector functionality and it would be great if you could add your feedback there for the server team.&lt;/p&gt;

&lt;p&gt;All the best,&lt;/p&gt;

&lt;p&gt;Ross&lt;/p&gt;</comment>
                            <comment id="1245431" author="bensmith" created="Mon, 25 Apr 2016 15:10:42 +0000"  >&lt;p&gt;Hi Ross,&lt;/p&gt;

&lt;p&gt;Ok that makes sense. Ross, would you know the reasoning behind why you can&apos;t run this command against secondary or can you point me towards someone who might know? Being able to run the mongo hadoop connector against secondary machines would be a nice feature for people using a replication. &lt;/p&gt;

&lt;p&gt;Ben &lt;/p&gt;</comment>
                            <comment id="1245044" author="ross@10gen.com" created="Mon, 25 Apr 2016 08:26:08 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=bensmith&quot; class=&quot;user-hover&quot; rel=&quot;bensmith&quot;&gt;bensmith&lt;/a&gt;,&lt;/p&gt;

&lt;p&gt;The &quot;splitVector&quot; command must be run on a primary node , running it on a secondary node will result in a &quot;not master&quot; error.&lt;/p&gt;

&lt;p&gt;eg:&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;MongoDB Enterprise test:SECONDARY&amp;gt; db.runCommand({splitVector: &quot;test.testData&quot;, &quot;keyPattern&quot;: {_id: 1}, maxChunkSize: 1})&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; : 0, &quot;errmsg&quot; : &quot;not master&quot;, &quot;code&quot; : 10107 }&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;For this reason the read preference is hardcoded in the Hadoop connector when running this command.&lt;/p&gt;

&lt;p&gt;All the best,&lt;/p&gt;

&lt;p&gt;Ross&lt;/p&gt;</comment>
                            <comment id="1244975" author="bensmith" created="Mon, 25 Apr 2016 02:47:31 +0000"  >&lt;p&gt;Hi Jeff, &lt;/p&gt;

&lt;p&gt;I also noticed that as I was working through this problem. If we can get splitVector added to the OBEDIENT_COMMANDS, I am going to make a PR to the mongo hadoop connector project to remove the hard coding of the primary read preference. Unless there is some reason I am missing why we always need to execute this command against the primary, it seems preferable to make the read preference configurable. I would like the splitter to check the configuration passed in to see if a read preference was set and use that or a default.&lt;/p&gt;

&lt;p&gt;Ben&lt;/p&gt;</comment>
                            <comment id="1244969" author="jeff.yemin" created="Mon, 25 Apr 2016 02:27:23 +0000"  >&lt;p&gt;Hi Ben,&lt;/p&gt;

&lt;p&gt;How exactly are you planning to force splitVector to run against a secondary?  I see &lt;a href=&quot;https://github.com/mongodb/mongo-hadoop/blob/master/core/src/main/java/com/mongodb/hadoop/splitter/StandaloneMongoSplitter.java#L108&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here&lt;/a&gt; that the read preference is hard-coded to primary anyway, so OBEDIENT_COMMANDS is effectively a no-op.&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|hskqqf:</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>