[SERVER-31756] startParallelShell is not compatible with causal consistency test suite Created: 27/Oct/17  Updated: 17/Apr/20  Resolved: 17/Apr/20

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

Type: Bug Priority: Major - P3
Reporter: Randolph Tan Assignee: Max Hirschhorn
Resolution: Won't Fix Votes: 0
Labels: sharding-wfbf-day
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-40618 Remove removec.js from causally consi... Closed
Operating System: ALL
Sprint: Sharding 2018-05-21, Sharding 2018-10-22, Sharding 2020-04-20
Participants:
Linked BF Score: 7

 Description   

startParallelShell currently spawns a new mongo shell instance with the same TestData as the parent shell. However, it does not pass along the clusterTime information to the child process. Therefore, tests that assumes that the spawned process can immediately read something the parent process wrote can fail.



 Comments   
Comment by Max Hirschhorn [ 17/Apr/20 ]

The removec.js failure in the causally_consistent_jscore_passthrough_auth.yml test suite which prompted the creation of this ticket was already addressed by the changes from 351244d as part of SERVER-40618.

Rather than banning startParallelShell() in the causal consistency test suites, we could actually make operations in it causally consistent with the parent mongo shell by propagating the operation time and cluster time, as well as replacing the default session for the global db object with one that has isCausalConsistency() === true. This would be similar to what we do in worker_thread.js to make it so the effects of the $config.setup() function are guaranteed to be visible to the FSM worker threads at the time of them running their starting state function. Note that such an effort would be useful to do for Thread in addition to startParallelShell() for a similar reason.

If this issue continues to come up for other tests in the causal consistency test suites, then we can revisit making such a change.

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