[SERVER-39117] Must deep-copy objects in ops array in txn_override.js Created: 22/Jan/19  Updated: 27/Oct/23  Resolved: 04/Apr/19

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Matthew Russotto Assignee: Judah Schvimer
Resolution: Gone away Votes: 0
Labels: prepare_testing
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Duplicate
duplicates SERVER-38937 Unify txn_override.js and auto_retry_... Closed
Related
is related to SERVER-38936 Create unittests for txn_override.js Closed
Operating System: ALL
Sprint: Repl 2019-01-28, Repl 2019-02-11, Repl 2019-02-25, Repl 2019-03-11, Repl 2019-03-25, Repl 2019-04-08
Participants:
Linked BF Score: 18

 Description   

When pushing an object onto the 'ops' array in continueTransaction, we currently do not deep-copy it. This means that if a test modifies one of the objects it uses, if we retry the transaction the retry will use the modified objects. We should do a deep copy.

Note we have a deepCopyObject method in jstests/concurrency/fsm_libs/fsm.js which might be appropriate for this.



 Comments   
Comment by Judah Schvimer [ 04/Apr/19 ]

This code went away with SERVER-38937.

Comment by Max Hirschhorn [ 22/Jan/19 ]

Note we have a deepCopyObject method in jstests/concurrency/fsm_libs/fsm.js which might be appropriate for this.

The deepCopyObject() function itself is based on the Object.extend() function.

Generated at Thu Feb 08 04:51:05 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.