<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:38:40 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-1102] Remove RequestStart from the public API</title>
                <link>https://jira.mongodb.org/browse/CSHARP-1102</link>
                <project id="10041" key="CSHARP">C# Driver</project>
                    <description>&lt;p&gt;We are removing the ability to start and end requests in .NET.&lt;/p&gt;

&lt;p&gt;The purpose of requests was to provide read-your-writes consistency when using w=0 write concern. Starting a request pins a socket to a thread so any operations on that thread end up in the same queue on the server side. &lt;/p&gt;

&lt;p&gt;Justification for removing:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;mongos 2.6+ doesn&apos;t support socket pinning by default, and mongos 2.8+ doesn&apos;t support it at all (&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-12273&quot; title=&quot;Remove RCAR option in v2.8&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-12273&quot;&gt;&lt;del&gt;SERVER-12273&lt;/del&gt;&lt;/a&gt;), so whatever weak consistency guarantees a request was supposed to provide are not provided with sharding.&lt;/li&gt;
	&lt;li&gt;It&apos;s a confusing feature that should rarely be used, if ever, yet people incorrectly use it all the time.&lt;/li&gt;
	&lt;li&gt;The connection pool cannot be utilized as efficiently.&lt;/li&gt;
&lt;/ul&gt;
</description>
                <environment></environment>
        <key id="169017">CSHARP-1102</key>
            <summary>Remove RequestStart from the public API</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="robert@mongodb.com">Robert Stam</assignee>
                                    <reporter username="robert@mongodb.com">Robert Stam</reporter>
                        <labels>
                    </labels>
                <created>Thu, 13 Nov 2014 14:01:53 +0000</created>
                <updated>Thu, 2 Apr 2015 18:05:55 +0000</updated>
                            <resolved>Mon, 17 Nov 2014 17:35:53 +0000</resolved>
                                                    <fixVersion>2.0</fixVersion>
                                    <component>Connectivity</component>
                                        <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="766186" author="xgen-internal-githook" created="Mon, 17 Nov 2014 19:05:07 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;rstam&apos;, u&apos;name&apos;: u&apos;rstam&apos;, u&apos;email&apos;: u&apos;robert@robertstam.org&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CSHARP-1102&quot; title=&quot;Remove RequestStart from the public API&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CSHARP-1102&quot;&gt;&lt;del&gt;CSHARP-1102&lt;/del&gt;&lt;/a&gt;: Remove RequestStart from the public API.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-csharp-driver/commit/2b3be94dd0da4d974b74151f535c1f382471b05a&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-csharp-driver/commit/2b3be94dd0da4d974b74151f535c1f382471b05a&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="766069" author="rstam" created="Mon, 17 Nov 2014 17:35:53 +0000"  >&lt;p&gt;We don&apos;t yet know what, if anything, will replace RequestStart in the new API.&lt;/p&gt;

&lt;p&gt;Once that is determined we will link this ticket to any other related tickets.&lt;/p&gt;</comment>
                            <comment id="765170" author="rstam" created="Sat, 15 Nov 2014 15:56:59 +0000"  >&lt;p&gt;As mentioned in the description above, the original motivation for RequestStart was to provide read-your-own-writes behavior when using a { w : 0 } WriteConcern.&lt;/p&gt;

&lt;p&gt;But since then, RequestStart has been discovered to be useful in additional scenarios.&lt;/p&gt;

&lt;h4&gt;&lt;a name=&quot;1.%5Cthrottling&quot;&gt;&lt;/a&gt;1. { w : 0 } throttling&lt;/h4&gt;

&lt;p&gt;Besides using RequestStart to ensure read-your-own-writes behavior when using { w : 0 }, it is also important to send all the unacknowledged writes over the same connection. Since you can stuff an arbitrary number of unacknowledged writes onto a connection, if you don&apos;t use a dedicated connection then the { w : 0 } writes can get randomly distributed over all the connections in your connection pool, essentially blocking all other operations that end up queued behind all the { w : 0 } writes.&lt;/p&gt;

&lt;p&gt;This is mostly a historical issue, since { w : 0 } writes are going away.&lt;/p&gt;

&lt;h4&gt;&lt;a name=&quot;2.Consistentreadsfromsecondarieswhenconnectedtoareplicaset&quot;&gt;&lt;/a&gt;2. Consistent reads from secondaries when connected to a replica set&lt;/h4&gt;

&lt;p&gt;When reading a number of related documents from secondaries, it is sometimes important that all the related documents be read from the same secondary. Otherwise, if the reads are randomly distributed over the secondaries, and if the secondaries happen to have different replication lags, you can get inconsistent results.&lt;/p&gt;

&lt;p&gt;Unfortunately, as mentioned in the description above, using a single connection no longer ensures consistent reads from secondaries when reading through mongos.&lt;/p&gt;

&lt;h4&gt;&lt;a name=&quot;3.Serverversiondependentcode&quot;&gt;&lt;/a&gt;3. Server version dependent code&lt;/h4&gt;

&lt;p&gt;If you have any code that does different things depending on the version of the server you are connected to, subtle issues can arise when connected to a deployment with mixed server versions. For example, if you check the version of one random secondary, but then allow the version dependent operations to be sent to another random secondary, the secondary that receives your operation might not be running the version you were expecting it to. The same issue can arise when connected to multiple mongos servers.&lt;/p&gt;

&lt;h4&gt;&lt;a name=&quot;4.Failpoints&quot;&gt;&lt;/a&gt;4. Fail points&lt;/h4&gt;

&lt;p&gt;This primarily affects our internal testing, but it is possible an application&apos;s test code might use fail points to test its own response to certain server failure modes. In our tests, if we set a fail point on a particular secondary, then we must ensure that the operations for that test are sent to the same secondary. If we allow the operations for that test to be sent to a random secondary, then the test will fail randomly.&lt;/p&gt;

&lt;h4&gt;&lt;a name=&quot;5.GridFS&quot;&gt;&lt;/a&gt;5. GridFS&lt;/h4&gt;

&lt;p&gt;Our GridFS implementation uses RequestStart extensively to ensure that all operations related to a single high level GridFS operation go to the same server using the same connection. For uploads, this is only really important for { w : 0 } throttling. For downloads, it is an example of the need for consistent reads from secondaries. If we allow the chunks to be downloaded from random secondaries, which might have varying replication lags, the download could fail or be inconsistent.&lt;/p&gt;

&lt;p&gt;However, even though RequestStart has proven useful in the above scenarios, it has two major flaws:&lt;/p&gt;

&lt;p&gt;1. It is thread bound&lt;br/&gt;
2. Sometimes we only need to pin to a server, not a connection&lt;/p&gt;

&lt;p&gt;The first issue is the biggest issue for us, as we move to an async based API, and execution of a Task bounces from thread to thread, so that a thread bound Request is useless.&lt;/p&gt;

&lt;p&gt;The second issue is mostly a performance issue. Pinning to a connection certainly has the effect of pinning to a server, but it has the side effect of keeping that connection out of the connection pool for the duration of the request, which means it can&apos;t be used for anything else in the meantime.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="168382">JAVA-1544</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="168099">PYTHON-785</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                        <customfield id="customfield_10011" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Backwards Compatibility</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10012"><![CDATA[Major Change]]></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_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hs3y47:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>147930</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="339">C# Sprint 11</customfieldvalue>

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