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

Decide and act on value of explain_remove.js and explain_update.js FSM workloads

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: None
    • Query Execution

      The explain_remove.js and explain_update.js FSM workloads have existed for a while (SERVER-16648, MongoDB 3.2) yet haven't actually been running the explain command for the delete and update commands as intended. This can be observed most recently with eslint-disable-line being applied to ignore the undefined explain variable referenced in the explainMultiRemove() and explainBasicUpdate() $config.state functions.

      The reason the undefined explain variable hasn't led to a JavaScript error in testing is because the definition for $config.transitions doesn't include the newly defined $config.state functions to be included in the transition table and so these functions are never called. This is because Object.extend() overwrites the "explain" property with the $super.transitions definition despite the extended FSM workloads intending to preserve the existing transition table except for the "explain" property.

      What was likely intended is reversing the order of the arguments and using Object.merge() to combine the objects instead:

      $config.transitions = Object.merge(
          $super.transitions, {explain: $config.data.assignEqualProbsToTransitions($config.states)});
      

      Given these FSM workloads have never been running as intended and we almost surely have coverage elsewhere, it may also be considered acceptable to delete these JavaScript files entirely rather than fix them.

            Assignee:
            backlog-query-execution [DO NOT USE] Backlog - Query Execution
            Reporter:
            max.hirschhorn@mongodb.com Max Hirschhorn
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: