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

Concurrency framework doesn't enforce causal relationship between main thread and worker threads

    XMLWordPrintable

    Details

    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Sprint:
      TIG 2017-10-23
    • Linked BF Score:
      0

      Description

      The functions defined with the $config object of an FSM workload are executed by multiple threads in the following way:

      1. The $config.setup() function is executed once by the main thread.
      2. The $config.states functions are executed $config.iterations times by each the worker threads.
      3. The $config.teardown() function is executed by the main thread.

      The changes from SERVER-30681 made it so a session is started with causal consistency enabled for each of the FSM worker threads. The changes from SERVER-30682 made it so that a readPreference of "secondary" is used, which made it possible for the $config.setup() function to do a write to the primary and for a $config.states function to do a read from a secondary. The main thread must forward its operationTime and clusterTime after #1 to each of the worker threads to ensure that a read from secondary will wait until the write has been applied.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              max.hirschhorn Max Hirschhorn
              Reporter:
              max.hirschhorn Max Hirschhorn
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: