<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:48:10 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-4413] Equality operator of MongoClientSettings is bugged</title>
                <link>https://jira.mongodb.org/browse/CSHARP-4413</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 bug is very obvious, the equality does not work because you forgot to implement an equality operator for the WriteConcern class and you are using the equality operator inside the Equals method of the&lt;/em&gt;&#160;MongoClientSettings.&lt;br/&gt;
therefore it uses the default equality (by reference) and fails.&lt;/p&gt;

&lt;p&gt;You might be fooled to think that the equality by reference will still work because you have declared all your WriteConcern types static and use only those.&lt;br/&gt;
but in MongoUrl.GetWriteConcern function&lt;/p&gt;

&lt;p&gt;you are creating a new instance of WriteConcern out side of the &quot;if&quot;.&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;&#160;&lt;/p&gt;

&lt;p&gt;version 2.18.0&lt;/p&gt;

&lt;p&gt;&#160;&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;&#160;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;```&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;var settings1 = MongoClientSettings.FromConnectionString(&quot;mongodb+srv://arik:arik123@test.abcd.mongodb.net/?w=majority&quot;); var settings2 = MongoClientSettings.FromConnectionString(&quot;mongodb+srv://arik:arik123@test.abcd.mongodb.net/?w=majority&quot;); Console.WriteLine(settings1 == settings2);&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;```&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Result is false.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&#160;&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="2187074">CSHARP-4413</key>
            <summary>Equality operator of MongoClientSettings is bugged</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</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="13201">Fixed</resolution>
                                        <assignee username="boris.dogadov@mongodb.com">Boris Dogadov</assignee>
                                    <reporter username="arik.shapiro@audiocodes.com">Arik Shapiro</reporter>
                        <labels>
                    </labels>
                <created>Tue, 15 Nov 2022 21:35:04 +0000</created>
                <updated>Sat, 28 Oct 2023 11:47:02 +0000</updated>
                            <resolved>Mon, 28 Nov 2022 18:25:58 +0000</resolved>
                                                    <fixVersion>2.19.0</fixVersion>
                                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="5012372" author="xgen-internal-githook" created="Mon, 28 Nov 2022 18:25:42 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;BorisDog&apos;, &apos;email&apos;: &apos;BorisDog@users.noreply.github.com&apos;, &apos;username&apos;: &apos;BorisDog&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CSHARP-4413&quot; title=&quot;Equality operator of MongoClientSettings is bugged&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CSHARP-4413&quot;&gt;&lt;del&gt;CSHARP-4413&lt;/del&gt;&lt;/a&gt;: Equality operator of MongoClientSettings is bugged (#976)&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-csharp-driver/commit/3fd05384a272ee94153fc8136a80656f4e87fd4b&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-csharp-driver/commit/3fd05384a272ee94153fc8136a80656f4e87fd4b&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4984982" author="dmitry.lukyanov" created="Tue, 15 Nov 2022 21:44:31 +0000"  >&lt;p&gt;Hey &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=arik.shapiro%40audiocodes.com&quot; class=&quot;user-hover&quot; rel=&quot;arik.shapiro@audiocodes.com&quot;&gt;arik.shapiro@audiocodes.com&lt;/a&gt;, thanks for your report, you&apos;re right, we will fix it in one of upcoming releases&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|i11cds:</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>