<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:51:29 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>[SERVER-61079] Move TransactionsUtil.deepCopyObject into its own class</title>
                <link>https://jira.mongodb.org/browse/SERVER-61079</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;(From what we can tell)&#160;&lt;a href=&quot;https://github.com/10gen/mongo/blob/2a0cafd88c343e3df4c20f8d94c5a12fb21bd9c1/jstests/libs/override_methods/inject_tenant_prefix.js#L144&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;TransactionsUtil.&lt;/a&gt; &lt;a href=&quot;https://github.com/10gen/mongo/blob/2a0cafd88c343e3df4c20f8d94c5a12fb21bd9c1/jstests/libs/override_methods/inject_tenant_prefix.js#L144&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;deepCopyObject&lt;/a&gt; is how some of the jstests do deep copies of objects.&#160;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://javascript.plainenglish.io/how-to-deep-copy-objects-and-arrays-in-javascript-7c911359b089&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;This article &lt;/a&gt;outlines what we discovered as a side effect of shallow copying in javascript.&lt;/p&gt;


&lt;p&gt;It would be nice for this helper method to be separated from Transactions util (or to be pointed to a more preferable method of deep copying for our codebase).&lt;/p&gt;</description>
                <environment></environment>
        <key id="1912420">SERVER-61079</key>
            <summary>Move TransactionsUtil.deepCopyObject into its own class</summary>
                <type id="3" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14718&amp;avatarType=issuetype">Task</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="12300">Won&apos;t Do</resolution>
                                        <assignee username="backlog-server-execution">Backlog - Storage Execution Team</assignee>
                                    <reporter username="haley.connelly@mongodb.com">Haley Connelly</reporter>
                        <labels>
                    </labels>
                <created>Thu, 28 Oct 2021 17:08:32 +0000</created>
                <updated>Fri, 16 Dec 2022 16:27:18 +0000</updated>
                            <resolved>Thu, 28 Oct 2021 17:36:02 +0000</resolved>
                                                                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="4155176" author="haley.connelly" created="Thu, 28 Oct 2021 17:35:48 +0000"  >&lt;p&gt;I didn&apos;t know Object.extend had the option for deep copy! Going to close this as won&apos;t do. Thanks for the quick feedback &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;&#160;&lt;/p&gt;</comment>
                            <comment id="4155169" author="max.hirschhorn@10gen.com" created="Thu, 28 Oct 2021 17:33:34 +0000"  >&lt;p&gt;I think if there&apos;s a goal to move TransactionsUtil.deepCopyObject({}, cmdObj) to a more common place then we should attempt to unify its interface with the pattern of Object.extend({}, cmdObj, true /&amp;#42; deep &amp;#42;/). As a bit of history/context, the original deepCopyObject() function was written for &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-35037&quot; title=&quot;Create new concurrency suite that runs consecutive operations inside of a single transaction&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-35037&quot;&gt;&lt;del&gt;SERVER-35037&lt;/del&gt;&lt;/a&gt; because custom types like &lt;tt&gt;DB&lt;/tt&gt; and &lt;tt&gt;DBCollection&lt;/tt&gt; have underlying C++ data (the Mongo connection object) and cannot be copied through enumerating over all properties on the object. The deepCopyObject() function was then moved to become TransactionsUtil.deepCopyObject() in &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-38937&quot; title=&quot;Unify txn_override.js and auto_retry_on_network_error.js&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-38937&quot;&gt;&lt;del&gt;SERVER-38937&lt;/del&gt;&lt;/a&gt; because Object.extend() doesn&apos;t handle other custom types like &lt;tt&gt;BinData&lt;/tt&gt; and &lt;tt&gt;NumberInt&lt;/tt&gt; which have underlying C++ data. We don&apos;t actually need to make copies of those values because they are effectively immutable (as far as the underlying C++ data is concerned).&lt;/p&gt;

&lt;p&gt;I&apos;d be concerned about proliferating more usages of TransactionsUtil.deepCopyObject() we had made for expediency over doing &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-40425&quot; title=&quot;fix Object.extend() for all custom javascript objects&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-40425&quot;&gt;SERVER-40425&lt;/a&gt;.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="1450793">SERVER-50501</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="727281">SERVER-40425</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                <customfield id="customfield_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25136"><![CDATA[Storage Execution]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Thu, 28 Oct 2021 17:33:34 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        2 years, 14 weeks, 6 days ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[]]></customfieldvalue>


                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>max.hirschhorn@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            2 years, 14 weeks, 6 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>backlog-server-execution</customfieldvalue>
            <customfieldvalue>haley.connelly@mongodb.com</customfieldvalue>
            <customfieldvalue>max.hirschhorn@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i084qn:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hzrnxr:</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>
                                                                                            <customfield id="customfield_23361" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Requested By</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10053" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>Time In Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_22870" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Triagers</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i07qvz:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                    </customfields>
    </item>
</channel>
</rss>