<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:52:59 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-754] Why Java Driver does not allow to execute saved javascript on secondary node</title>
                <link>https://jira.mongodb.org/browse/JAVA-754</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;When the ReadPreference.secondary() is set and command is executed, &lt;br/&gt;
DB class force the driver to ReadPreference.primary()&lt;/p&gt;

&lt;p&gt;I worder why this behaviour has been introduced.&lt;/p&gt;

&lt;p&gt;I need to invoke javascript functions and spread the call over &lt;br/&gt;
my replica set.&lt;/p&gt;

&lt;p&gt;Is there a workaround?&lt;/p&gt;</description>
                <environment></environment>
        <key id="64483">JAVA-754</key>
            <summary>Why Java Driver does not allow to execute saved javascript on secondary node</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="sonnessa">Michele Sonnessa</reporter>
                        <labels>
                    </labels>
                <created>Thu, 7 Feb 2013 09:50:00 +0000</created>
                <updated>Wed, 11 Sep 2019 19:10:43 +0000</updated>
                            <resolved>Sun, 10 Mar 2013 22:59:39 +0000</resolved>
                                    <version>2.10.1</version>
                                                    <component>Connection Management</component>
                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="285829" author="scotthernandez" created="Sun, 10 Mar 2013 22:59:39 +0000"  >&lt;p&gt;Michele, this is not something the driver/client can do since the server doesn&apos;t allow executing javascript via $eval/db.eval() on anything but the primary node in a replica set. This is a server limitation not a client one.&lt;/p&gt;

&lt;p&gt;Please create a server issue if you wish to suggest this feature: &lt;a href=&quot;http://jira.mongodb.org/browse/server&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;http://jira.mongodb.org/browse/server&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="285339" author="jeff.yemin" created="Sat, 9 Mar 2013 22:30:19 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=scotthernandez&quot; class=&quot;user-hover&quot; rel=&quot;scotthernandez&quot;&gt;scotthernandez&lt;/a&gt; ping&lt;/p&gt;</comment>
                            <comment id="261392" author="sonnessa" created="Fri, 8 Feb 2013 22:12:13 +0000"  >&lt;p&gt;Thanks.&lt;/p&gt;

&lt;p&gt;It&apos;s not clear the reason, especially if I use &lt;/p&gt;
{nolock: true}

&lt;p&gt;I&apos;m going to execute some computation stuff without writing data. Why I cannot &lt;br/&gt;
take advantage of distributed computation?&lt;/p&gt;
</comment>
                            <comment id="261375" author="jeff.yemin" created="Fri, 8 Feb 2013 21:57:44 +0000"  >&lt;p&gt;The eval command will only run on the primary, which is why we force eval to the primary instead of obeying read preference.&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|hrm1av:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>42112</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>