<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:49:24 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-4799] Pipeline stage with BsonDocumentSearchDefinition can be rendered only once</title>
                <link>https://jira.mongodb.org/browse/CSHARP-4799</link>
                <project id="10041" key="CSHARP">C# Driver</project>
                    <description>&lt;p&gt;The issue as described to me by Boris is that if a caller to Render modifies the returned BsonDocument then a subsequent call to Render returns the modified BsonDocument.&lt;/p&gt;

&lt;p&gt;This could be resolved by clarifying ownership rules of the mutable BsonDocument. Only the owner of the BsonDocument should modify it.&lt;/p&gt;

&lt;p&gt;Most likely this would mean that that BsonDocumentSearchDefinition should own the BsonDocument, which in turn means that callers to Render should &lt;b&gt;not&lt;/b&gt; modify the returned BsonDocument because they don&apos;t own it. However, such a rule can&apos;t be enforced at compile time because BsonDocument is mutable.&lt;/p&gt;

&lt;p&gt;Alternatively, BsonDocumentSearchDefinition could make a defensive copy of the BsonDocument before returning it from Render (and possibly in the constructor as well to protect the document even further). This approach would be safe but involves more memory allocations.&lt;/p&gt;</description>
                <environment></environment>
        <key id="2446535">CSHARP-4799</key>
            <summary>Pipeline stage with BsonDocumentSearchDefinition can be rendered only once</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</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="13201">Fixed</resolution>
                                        <assignee username="boris.dogadov@mongodb.com">Boris Dogadov</assignee>
                                    <reporter username="boris.dogadov@mongodb.com">Boris Dogadov</reporter>
                        <labels>
                    </labels>
                <created>Wed, 20 Sep 2023 00:16:45 +0000</created>
                <updated>Sat, 28 Oct 2023 11:46:46 +0000</updated>
                            <resolved>Wed, 4 Oct 2023 18:24:56 +0000</resolved>
                                                    <fixVersion>2.22.0</fixVersion>
                                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="5753075" author="xgen-internal-githook" created="Wed, 4 Oct 2023 18:24:35 +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-4799&quot; title=&quot;Pipeline stage with BsonDocumentSearchDefinition can be rendered only once&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CSHARP-4799&quot;&gt;&lt;del&gt;CSHARP-4799&lt;/del&gt;&lt;/a&gt;: Pipeline stage with BsonDocumentSearchDefinition can be rendered only once (#1188)&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-csharp-driver/commit/00a0c7230a590f09683f77c04faf3247a722b58e&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-csharp-driver/commit/00a0c7230a590f09683f77c04faf3247a722b58e&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="5719261" author="rstam" created="Wed, 20 Sep 2023 19:39:48 +0000"  >&lt;p&gt;Note that there are other similar classes that return an owned BsonDocument from their Render method on the assumption that callers won&apos;t modify the returned BsonDocument. So the consistent thing to do would be for callers of this Render method to also not modify the returned BsonDocument.&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_10257" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Documentation Changes</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="11861"><![CDATA[Not Needed]]></customfieldvalue>

                        </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_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|i298j0:</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>