Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-50501

Move TransactionsUtil.deepCopyObject to a more generic library

    • Cluster Scalability

      This method is being used outside transactions tests, so it doesn't make sense for it to be in a transactions-specific library:

      $ git grep deepCopyObject jstests/
      jstests/concurrency/fsm_libs/fsm.js:115:                        data = TransactionsUtil.deepCopyObject({}, args.data);
      jstests/libs/override_methods/network_error_and_txn_override.js:595:        const objCopy = TransactionsUtil.deepCopyObject({}, cmdObj);
      jstests/libs/transactions_util.js:80:    function deepCopyObject(dst, src) {
      jstests/libs/transactions_util.js:93:                    v = deepCopyObject({}, v);
      jstests/libs/transactions_util.js:95:                    v = deepCopyObject([], v);
      jstests/libs/transactions_util.js:114:        deepCopyObject,
      

      Having it in this library also makes it less discoverable.

      It would be better to put it in src/mongo/shell/types.js next to extend, which it was originally based on.

            Assignee:
            backlog-server-cluster-scalability [DO NOT USE] Backlog - Cluster Scalability
            Reporter:
            esha.maharishi@mongodb.com Esha Maharishi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: