<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:19:52 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>[CDRIVER-4078] Make server description immutable</title>
                <link>https://jira.mongodb.org/browse/CDRIVER-4078</link>
                <project id="10030" key="CDRIVER">C Driver</project>
                    <description>&lt;p&gt;&lt;b&gt;Background &amp;amp; Motivation&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;Server descriptions are used throughout the codebase. They have been the source of several bugs. I believe making server descriptions immutable would help maintainability.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-3653&quot; title=&quot;Connections should use server descriptions from handshake, not monitoring&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-3653&quot;&gt;&lt;del&gt;CDRIVER-3653&lt;/del&gt;&lt;/a&gt; describes an issue of attaching an incorrect server description to server streams. This resulted in &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-3404&quot; title=&quot;Assertion hit when handshake runs against unknown server type&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-3404&quot;&gt;&lt;del&gt;CDRIVER-3404&lt;/del&gt;&lt;/a&gt; and likely is the root cause of &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-4077&quot; title=&quot;OP_KILLCURSORS incorrectly used to destroy change stream during resume attempt&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-4077&quot;&gt;CDRIVER-4077&lt;/a&gt; and &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-3563&quot; title=&quot;Cursor may use an invalidated server description&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-3563&quot;&gt;&lt;del&gt;CDRIVER-3563&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Confusing error processing in &lt;tt&gt;mongoc_server_description_handle_hello&lt;/tt&gt; is the cause of &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-3696&quot; title=&quot;An &amp;quot;ok&amp;quot;:0 ismaster reply should only be considered an auth error during handshake&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-3696&quot;&gt;CDRIVER-3696&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;SDAM currently recommends &lt;a href=&quot;https://github.com/mongodb/specifications/blob/master/source/server-discovery-and-monitoring/server-discovery-and-monitoring.rst#immutable-data&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;treating a server description as immutable&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;Multi-threaded drivers should treat ServerDescriptions and TopologyDescriptions as immutable: the client replaces them, rather than modifying them, in response to new information about the topology. Thus readers of these data structures can simply acquire a reference to the current one and read it, without holding a lock that would block a monitor from making further updates.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;b&gt;Scope&lt;/b&gt;&lt;br/&gt;
 Remove mutable state from &lt;tt&gt;mongoc_server_description_t&lt;/tt&gt;:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;generation: This represents a generation counter to expire connections in pooled clients, emulating the behavior of clearing the connection pool described in &lt;a href=&quot;https://github.com/mongodb/specifications/blob/5334c6c33de34949d39eed913f325ad82dbbcf2a/source/connection-monitoring-and-pooling/connection-monitoring-and-pooling.rst#clearing-a-connection-pool&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Clearing a Connection Pool&lt;/a&gt;. It is only accessed from server descriptions associated with a connection.&lt;/li&gt;
	&lt;li&gt;generation_map: This stores the latest generation in the server. It is mapped from service IDs in load balanced mode. It is only accessed from server descriptions stored in the shared topology description.&lt;/li&gt;
	&lt;li&gt;opened: This tracks whether a ServerOpening event has been emitted&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Investigate whether removing the struct definition of &lt;tt&gt;mongoc_server_description_t&lt;/tt&gt; from &lt;tt&gt;mongoc-server-description-private.h&lt;/tt&gt; would be helpful.&lt;/p&gt;

&lt;p&gt;Investigate what new internal API we would need to for constructing and copying server descriptions.&lt;/p&gt;</description>
                <environment></environment>
        <key id="1817084">CDRIVER-4078</key>
            <summary>Make server description immutable</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="kevin.albertson@mongodb.com">Kevin Albertson</reporter>
                        <labels>
                    </labels>
                <created>Wed, 14 Jul 2021 00:53:37 +0000</created>
                <updated>Fri, 15 Apr 2022 18:38:29 +0000</updated>
                                                                                                <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                        <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_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>CDRIVER-4107</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr6ltv:</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>