<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:17:53 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-8602] Allow multiple clients to use a single cursor.</title>
                <link>https://jira.mongodb.org/browse/SERVER-8602</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Currently the mongod server upon seeing a cursor that is already locked returns a empty result to the client with a cursor id of zero.  This will cause the client to consider the cursor exhausted and stop any active iteration.&lt;/p&gt;

&lt;p&gt;There are cases where having multiple threads/processes reading from the same cursor is advantageous. The current processing makes handling those situations more difficult as the client cannot tell if the cursor is really exhausted or was just being actively read by another process.&lt;/p&gt;

&lt;p&gt;Implementing this functionality would be a component of allowing clients to use a cursor as a shared work queue.&lt;/p&gt;</description>
                <environment>All</environment>
        <key id="65598">SERVER-8602</key>
            <summary>Allow multiple clients to use a single cursor.</summary>
                <type id="2" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14711&amp;avatarType=issuetype">New Feature</type>
                                            <priority id="4" iconUrl="https://jira.mongodb.org/images/icons/priorities/minor.svg">Minor - P4</priority>
                        <status id="1" iconUrl="https://jira.mongodb.org/images/icons/statuses/open.png" description="">Open</status>
                    <statusCategory id="2" key="new" colorName="default"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="backlog-query-execution">Backlog - Query Execution</assignee>
                                    <reporter username="robert.j.moore@allanbank.com">Robert Moore</reporter>
                        <labels>
                    </labels>
                <created>Mon, 18 Feb 2013 03:11:56 +0000</created>
                <updated>Tue, 6 Dec 2022 05:24:26 +0000</updated>
                                            <version>2.2.3</version>
                                    <fixVersion>features we&amp;#39;re not sure of</fixVersion>
                                    <component>Querying</component>
                                        <votes>2</votes>
                                    <watches>8</watches>
                                                                                                                <comments>
                            <comment id="383169" author="schwerin" created="Wed, 17 Jul 2013 14:50:49 +0000"  >&lt;p&gt;The approach we&apos;d prefer, rather than having multiple clients share a cursor, is to make the findAndModify process more useful for this kind of work queuing.  Suppose that findAndModify() could return a tailable cursor.  Clients would then each establish their own tailable findAndModify cursor with the match pattern in the find including a &quot;consumed: 0&quot; match and the update setting &quot;consumed: 1&quot;.  You can do this with polling today, and it is the preferred approach over sharing cursors.  Extending fAndM to support tailing would be a natural extension.&lt;/p&gt;</comment>
                            <comment id="383123" author="schwerin" created="Wed, 17 Jul 2013 13:58:12 +0000"  >&lt;p&gt;While there&apos;s nothing difficult with this patch, per se, we&apos;re not comfortable ensuring this client-synchronizing behavior going forward.  I&apos;m going to close the pull request, but leave the associated ticket open as a feature request.&lt;/p&gt;</comment>
                            <comment id="382679" author="robert.j.moore@allanbank.com" created="Wed, 17 Jul 2013 01:39:56 +0000"  >&lt;p&gt;Bump - Any thoughts?&lt;/p&gt;

&lt;p&gt;Rob.&lt;/p&gt;</comment>
                            <comment id="357117" author="schwerin" created="Mon, 10 Jun 2013 20:58:07 +0000"  >&lt;p&gt;Ah, yes, alternative number 3, thing I didn&apos;t think of.  I&apos;ll mull this over.&lt;/p&gt;</comment>
                            <comment id="357076" author="robert.j.moore@allanbank.com" created="Mon, 10 Jun 2013 20:13:51 +0000"  >&lt;p&gt;Sure - basically I am trying to turn MongoDB into a work/queue broker.&lt;/p&gt;

&lt;p&gt;I am inserting the &quot;job&quot; documents into a capped collection and then have multiple processes pulling the documents out of the capped collection via a single shared tailable cursor (across multiple threads and processes).  &lt;/p&gt;

&lt;p&gt;I am not worried about bandwidth as much a simple, fast work distribution model. (And yes I realize that some work might get lost in the case of a fault but that is OK in my use case.)&lt;/p&gt;

&lt;p&gt;Currently, I am using a cursor with await data set to false and all the clients are &quot;spinning&quot; on the cursor/getmore requests and dealing with occasional getmore response with a cursor id zero. &lt;/p&gt;

&lt;p&gt;With this change the await data can be changed to true and things will not have to spin as much. Again, ideally there would be wait semantics for all of the cursor consumers but I&apos;m happy to get what I can get.&lt;/p&gt;

</comment>
                            <comment id="357047" author="schwerin" created="Mon, 10 Jun 2013 19:26:52 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=robert.j.moore%40allanbank.com&quot; class=&quot;user-hover&quot; rel=&quot;robert.j.moore@allanbank.com&quot;&gt;robert.j.moore@allanbank.com&lt;/a&gt;, can you describe your goal from this change in a little more detail?  I&apos;m somewhat nervous of the polling semantics, and am also concerned about the complexity of a wait semantics implementation.&lt;/p&gt;

&lt;p&gt;This proposal suggests that you&apos;re trying to improve the utilization of some resource, either available network bandwidth or available client-side computational resources.  If it&apos;s network bandwidth, setting the &quot;Exhaust&quot; flag in queries (&lt;a href=&quot;http://docs.mongodb.org/meta-driver/latest/legacy/mongodb-wire-protocol/#op-query&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://docs.mongodb.org/meta-driver/latest/legacy/mongodb-wire-protocol/#op-query&lt;/a&gt;) will remove the latency of getmore round trips.  If it&apos;s client-side CPU utilization, client or driver changes might be more appropriate.  If it&apos;s some other resource, can you describe it?&lt;/p&gt;</comment>
                            <comment id="355683" author="schwerin" created="Sat, 8 Jun 2013 00:26:29 +0000"  >&lt;p&gt;I think the wait semantics may be a substantial undertaking, and I don&apos;t have the time to give it the attention it needs, at present.  I&apos;m going to consult with a few other engineers at 10gen, to see if the polling-semantics solution would stand in the way of other future work, and either &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=kangas&quot; class=&quot;user-hover&quot; rel=&quot;kangas&quot;&gt;kangas&lt;/a&gt; or I will respond on this ticket.&lt;/p&gt;</comment>
                            <comment id="350829" author="robert.j.moore@allanbank.com" created="Sun, 2 Jun 2013 02:14:50 +0000"  >&lt;p&gt;I agree that the wait semantics (especially if the query/cursor has the &quot;await data&quot; bit set) would be more desirable.  I&apos;m willing to do the work to add that ability but would need a few pointers and/or a recommend method for implementing.&lt;/p&gt;

&lt;p&gt;Rob&lt;/p&gt;</comment>
                            <comment id="350081" author="schwerin" created="Fri, 31 May 2013 18:22:07 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=robert.j.moore%40allanbank.com&quot; class=&quot;user-hover&quot; rel=&quot;robert.j.moore@allanbank.com&quot;&gt;robert.j.moore@allanbank.com&lt;/a&gt;, can you describe your use case a little more?  The implementation in your pull request appears to give multiple getmore requests on the same cursor a &quot;try&quot; semantics, useful for polling.  This is a reasonable and straightforward extension of the existing implementation, but I wonder if applications would be better served by a &quot;wait&quot; semantics, where the second getmore waits to return until the first getmore unpins the cursor.&lt;/p&gt;</comment>
                            <comment id="268995" author="robert.j.moore@allanbank.com" created="Mon, 18 Feb 2013 05:34:02 +0000"  >&lt;p&gt;See &lt;a href=&quot;https://github.com/mongodb/mongo/pull/381&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/pull/381&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>10.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                <customfield id="customfield_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25125"><![CDATA[Query Execution]]></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>Thu, 23 May 2013 22:58:54 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        10 years, 31 weeks 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>false</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>alexander.golin@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            10 years, 31 weeks ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Old_Backport</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10000"><![CDATA[No]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>schwerin@mongodb.com</customfieldvalue>
            <customfieldvalue>backlog-query-execution</customfieldvalue>
            <customfieldvalue>robert.j.moore@allanbank.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrn62n:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr2j2v:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>6683</customfieldvalue>
                        </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|hs0jvj:</customfieldvalue>

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