<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:39:36 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>[GODRIVER-2901] Separate batching, retry, and single-operation execution logic</title>
                <link>https://jira.mongodb.org/browse/GODRIVER-2901</link>
                <project id="14289" key="GODRIVER">Go Driver</project>
                    <description>&lt;p&gt;Currently, all batching, retry, server and connection selection, single-operation execution, and error handling logic are part of the giant 500-line &lt;a href=&quot;https://github.com/mongodb/mongo-go-driver/blob/f8b88fc241a91c32455f61c57557921ba7d17d2d/x/mongo/driver/operation.go#L412&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Operation.Execute&lt;/a&gt; function. That function is becoming unmaintainable as more and more logic is added to it (e.g. RTT short-circuit, memory buffer reuse, additional error handling, etc). Difficulty maintaining &lt;tt&gt;Operation.Execute&lt;/tt&gt; has also contributed to several bugs (&lt;a href=&quot;https://jira.mongodb.org/browse/GODRIVER-2677&quot; title=&quot;Investigate excess memory usage that may be due to pooling&quot; class=&quot;issue-link&quot; data-issue-key=&quot;GODRIVER-2677&quot;&gt;&lt;del&gt;GODRIVER-2677&lt;/del&gt;&lt;/a&gt;, GODRIVER-2768) and Go driver version retractions (v1.11.0 - v1.11.2).&lt;/p&gt;

&lt;p&gt;Refactor &lt;tt&gt;Operation.Execute&lt;/tt&gt; into functions and/or types with separate concerns. For example, it might make sense to create a function and/or type for each of:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;Batching&lt;/li&gt;
	&lt;li&gt;Retry&lt;/li&gt;
	&lt;li&gt;Single-operation execution&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;Definition of done:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Split &lt;tt&gt;Operation.Execute&lt;/tt&gt; into functions and/or types that separate at least batching, retry, and single-operation execution concerns.&lt;/li&gt;
	&lt;li&gt;Add tests that assert the behavior of each concern individually.&lt;/li&gt;
&lt;/ul&gt;
</description>
                <environment></environment>
        <key id="2388887">GODRIVER-2901</key>
            <summary>Separate batching, retry, and single-operation execution logic</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="10038" iconUrl="https://jira.mongodb.org/images/icons/subtask.gif" description="">Backlog</status>
                    <statusCategory id="2" key="new" colorName="default"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="matt.dale@mongodb.com">Matt Dale</reporter>
                        <labels>
                    </labels>
                <created>Tue, 11 Jul 2023 18:27:58 +0000</created>
                <updated>Mon, 17 Jul 2023 19:48:42 +0000</updated>
                                                                            <component>Retryability</component>
                                        <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="5558288" author="JIRAUSER1259527" created="Tue, 11 Jul 2023 18:33:34 +0000"  >&lt;p&gt;Past attempts at this have been blocked by some issues:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/GODRIVER-2579&quot; title=&quot;Incorporate connection pool checkout into server selection loop&quot; class=&quot;issue-link&quot; data-issue-key=&quot;GODRIVER-2579&quot;&gt;GODRIVER-2579&lt;/a&gt; - The current server selection retry logic depends on the operation retry logic. The selected server impacts how batching and retry work, so pulling those concerns apart is impractical to impossible. Making server selection an independently retryable operation would significantly simplify the server selection and error handling logic, reducing the complexity of the separation of concerns refactor.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/GODRIVER-2892&quot; title=&quot;Remove all code that is only required for MongoDB 3.4 and earlier&quot; class=&quot;issue-link&quot; data-issue-key=&quot;GODRIVER-2892&quot;&gt;&lt;del&gt;GODRIVER-2892&lt;/del&gt;&lt;/a&gt; - The additional code for supporting legacy MongoDB APIs has added to the cost of refactoring the existing code. Now that the Go Driver only needs to support OP_MSG (MongoDB 3.6+), we can remove the legacy logic, reducing the complexity of the separation of concerns refactor.&lt;/li&gt;
&lt;/ul&gt;
</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="2155430">GODRIVER-2579</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="2385672">GODRIVER-2892</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <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|i1zk1k:</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>