<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:48:15 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>[CSHARP-4445] Support 64-bit values for Skip and Limit/Take</title>
                <link>https://jira.mongodb.org/browse/CSHARP-4445</link>
                <project id="10041" key="CSHARP">C# Driver</project>
                    <description>&lt;h4&gt;&lt;a name=&quot;Summary&quot;&gt;&lt;/a&gt;Summary&lt;/h4&gt;

&lt;p&gt;&lt;em&gt;The pipeline builder has an offset argument of type `int`:&lt;/em&gt;&lt;br/&gt;
&lt;em&gt;&lt;a href=&quot;https://github.com/mongodb/mongo-csharp-driver/blob/master/src/MongoDB.Driver/PipelineStageDefinitionBuilder.cs#L1582&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-csharp-driver/blob/master/src/MongoDB.Driver/PipelineStageDefinitionBuilder.cs#L1582&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Which in C# is a 32-bit signed integer.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;But the specification for the $skip function is actually a 64-bit positive integer:&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://www.mongodb.com/docs/rapid/reference/operator/aggregation/skip/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://www.mongodb.com/docs/rapid/reference/operator/aggregation/skip/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The documentation doesn&apos;t make it clear if its supposed to be a signed or unsigned 64 bit integer but given that it says &quot;positive&quot; I&apos;m assuming its a signed integer equal to or greater than 0.&lt;/p&gt;
&lt;h4&gt;&lt;a name=&quot;Pleaseprovidetheversionofthedriver.Ifapplicable%2CpleaseprovidetheMongoDBserverversionandtopology%28standalone%2Creplicaset%2Corshardedcluster%29.&quot;&gt;&lt;/a&gt;Please provide the version of the driver. If applicable, please provide the MongoDB server version and topology (standalone, replica set, or sharded cluster).&lt;/h4&gt;

&lt;p&gt;I&apos;m using 1.15.1, but the code is still in master so at this time 1.18.0, probably all recent versions.&lt;/p&gt;

&lt;p&gt;All topologies.&lt;/p&gt;
&lt;h4&gt;&lt;a name=&quot;HowtoReproduce&quot;&gt;&lt;/a&gt;How to Reproduce&lt;/h4&gt;

&lt;p&gt;&lt;em&gt;Steps to reproduce. If possible, please include a &lt;a href=&quot;http://sscce.org/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Short, Self Contained, Correct (Compilable), Example&lt;/a&gt;.&lt;/em&gt;&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;PipelineStageDefinitionBuilder.Skip&amp;lt;Example&amp;gt;(long.MaxValue)&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;h4&gt;&lt;a name=&quot;AdditionalBackground&quot;&gt;&lt;/a&gt;Additional Background&lt;/h4&gt;

&lt;p&gt;&lt;em&gt;Please provide any additional background information that may be helpful in diagnosing the bug.&lt;/em&gt;&lt;/p&gt;</description>
                <environment></environment>
        <key id="2206299">CSHARP-4445</key>
            <summary>Support 64-bit values for Skip and Limit/Take</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="10300" iconUrl="https://jira.mongodb.org/images/icons/priorities/medium.svg">Unknown</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="robert@mongodb.com">Robert Stam</assignee>
                                    <reporter username="justin.m.chase@gmail.com">Justin Chase</reporter>
                        <labels>
                            <label>Bug</label>
                    </labels>
                <created>Thu, 8 Dec 2022 17:03:12 +0000</created>
                <updated>Thu, 23 Mar 2023 20:05:55 +0000</updated>
                            <resolved>Wed, 14 Dec 2022 00:45:05 +0000</resolved>
                                    <version>2.15.1</version>
                    <version>2.18.0</version>
                                    <fixVersion>2.19.0</fixVersion>
                                    <component>Aggregation</component>
                    <component>Builders</component>
                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="5053147" author="xgen-internal-githook" created="Wed, 14 Dec 2022 00:44:29 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;rstam&apos;, &apos;email&apos;: &apos;robert@robertstam.org&apos;, &apos;username&apos;: &apos;rstam&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CSHARP-4445&quot; title=&quot;Support 64-bit values for Skip and Limit/Take&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CSHARP-4445&quot;&gt;&lt;del&gt;CSHARP-4445&lt;/del&gt;&lt;/a&gt;: Support 64-bit values for Skip and Limit/Take.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-csharp-driver/commit/701dc20d527d20e936ab8f33e8112f2595388a85&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-csharp-driver/commit/701dc20d527d20e936ab8f33e8112f2595388a85&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="5048249" author="james.kovacs" created="Mon, 12 Dec 2022 17:18:30 +0000"  >&lt;p&gt;&lt;tt&gt;Skip&lt;/tt&gt; and &lt;tt&gt;Take&lt;/tt&gt; appear to have changed in MongoDB 5.0 to 64-bit integers. We should test whether changing these to &lt;tt&gt;long&lt;/tt&gt; breaks pre-5.0 servers. Ensure that this change is made in both builders and LINQ.&lt;/p&gt;</comment>
                            <comment id="5044389" author="rstam" created="Fri, 9 Dec 2022 17:39:53 +0000"  >&lt;p&gt;Fair points. We will discuss this at our next triage meeting.&lt;/p&gt;

&lt;p&gt;Thanks again for bringing this up.&lt;/p&gt;</comment>
                            <comment id="5042883" author="justin.m.chase@gmail.com" created="Fri, 9 Dec 2022 05:30:03 +0000"  >&lt;p&gt;Why not I guess? It seems inaccurate to have it be an int. If you have an int it should cast up but if you need to skip 3 billion rows you&apos;re screwed. Unless there is a work around I&apos;m unaware of? I&apos;m guessing it will end up casting it to a long somewhere, since that is the actual data type so why not just use the correct data type?&lt;/p&gt;</comment>
                            <comment id="5041210" author="rstam" created="Thu, 8 Dec 2022 17:47:14 +0000"  >&lt;p&gt;Thanks for creating this ticket.&lt;/p&gt;

&lt;p&gt;I think one reason we haven&apos;t used `long` as the parameter type for `skip` is that it&apos;s hard to imagine skipping more than `int.MaxValue` documents. Just think about how long the server would have to work to skip millions of documents.&lt;/p&gt;

&lt;p&gt;Given that, do you still think we should have an overload of `Skip` that takes a `long skip`?&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|i14lm8:</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>