<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:48:22 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-4487] Make BsonClassMap entirely non-static</title>
                <link>https://jira.mongodb.org/browse/CSHARP-4487</link>
                <project id="10041" key="CSHARP">C# Driver</project>
                    <description>&lt;p&gt;BsonClassMap __classMaps is static mutable, with popsicle immutablity.&lt;/p&gt;

&lt;p&gt;This makes:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Testing class maps in isolation is impossible.&lt;/li&gt;
	&lt;li&gt;Prevents parallel testing because setup is not thread-safe and (negative productivity effect)&lt;/li&gt;
	&lt;li&gt;Doesn&apos;t allow runtime service resolution of things like jsonserializers.&lt;/li&gt;
	&lt;li&gt;Problematic when using two or more seperate mongo databases in same process space (they end up sharing ClassMaps).&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Instead, perhaps, add a BsonClassMaps custom collection, move the static methods to there as non-static and allow it to be injected into a MongoClient (vis MongoClientSettings).&lt;/p&gt;

&lt;p&gt;&lt;tt&gt;services.AddBsonClassMaps(map =&amp;gt; map.RegisterClassMap&amp;lt;&amp;gt;...);&lt;/tt&gt;&lt;/p&gt;</description>
                <environment></environment>
        <key id="2241590">CSHARP-4487</key>
            <summary>Make BsonClassMap entirely non-static</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="dhickey@gmail.com">Damian Hickey</reporter>
                        <labels>
                    </labels>
                <created>Tue, 24 Jan 2023 10:17:07 +0000</created>
                <updated>Tue, 9 Jan 2024 00:34:45 +0000</updated>
                                            <version>2.18.0</version>
                                    <fixVersion>3.0.0</fixVersion>
                                    <component>Configuration</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="5264162" author="JIRAUSER1272639" created="Fri, 10 Mar 2023 15:43:29 +0000"  >&lt;p&gt;Hi James&lt;/p&gt;

&lt;p&gt;Long time no see - you may remember me from PSake days &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.mongodb.org/images/icons/emoticons/smile.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt; . &lt;/p&gt;

&lt;p&gt;That sounds awesome, I would &lt;b&gt;really&lt;/b&gt; like to see that happen. &lt;/p&gt;

&lt;p&gt;Thanks for fast response and sorry for slow one from me. &lt;/p&gt;

&lt;p&gt;Cheers!&lt;/p&gt;</comment>
                            <comment id="5157092" author="james.kovacs" created="Wed, 1 Feb 2023 01:37:05 +0000"  >&lt;p&gt;Hi, Damian,&lt;/p&gt;

&lt;p&gt;Thank you for raising this issue. Although serialization is a separate concern from the lifetime of a &lt;tt&gt;MongoClient&lt;/tt&gt; we plan to address both in &lt;a href=&quot;https://jira.mongodb.org/browse/CSHARP-3431&quot; title=&quot;Make MongoClient IDisposable to allow short lifetime scope usage&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CSHARP-3431&quot;&gt;CSHARP-3431&lt;/a&gt;. We want to scope all resources to the lifetime of a &lt;tt&gt;MongoClient&lt;/tt&gt; including connections, pools, serializers, etc. This would allow users to create two separate &lt;tt&gt;MongoClient&lt;/tt&gt; instances with different configurations for serializing a single class. Right now to achieve this, you have to mirror your class definitions and apply different mapping configurations to each one. This would also make testing the driver much easier as you could dispose of a &lt;tt&gt;MongoClient&lt;/tt&gt; and know that all configuration was cleaned up. You could also test two &lt;tt&gt;MongoClient&lt;/tt&gt; instances in parallel without worrying about automatic serializer configuration from one leaking into the other.&lt;/p&gt;

&lt;p&gt;Please watch this tickets for updates.&lt;/p&gt;

&lt;p&gt;Sincerely,&lt;br/&gt;
James&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_14266" key="com.atlassian.jira.plugin.system.customfieldtypes:textarea">
                        <customfieldname>Documentation Changes Summary</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>&lt;p&gt;1.  What would you like to communicate to the user about this feature?&lt;br/&gt;
2.  Would you like the user to see examples of the syntax and/or executable code and its output?&lt;br/&gt;
3.  Which versions of the driver/connector does this apply to?&lt;/p&gt;</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>CSHARP-4711</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_21553" key="com.atlassian.jira.plugin.system.customfieldtypes:labels">
                        <customfieldname>Quarter</customfieldname>
                        <customfieldvalues>
                                        <label>FY24Q3</label>
    
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|i1akbs:</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>