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

Rollback test fixtures should log the beginning and end of each state transition

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • Replication

    Description

      The rollback_test.js fixture provides a generic template for testing replication rollbacks. It models a test execution as a state machine. There are a number of state transition functions that move the test fixture between states. Currently, we print a “Transitioning to <STATE>” message at some point inside each state transition function. This message can be a bit misleading when debugging logs from this test fixture, since “Transitioning” implies that a particular state change is just starting, even though we sometimes log this message after a state transition has already occurred. For example, in the transitionToSteadyStateOperations function. To improve clarity, we should add log messages that specifically indicate the start and end of a state transition, since most transitions of the test are not instantaneous. We can indicate this with a “Transitioning to <STATE>” message at the beginning of a state transition function, and a “Transitioned to <STATE>” message at the end of the function.

      For the purposes of the rollback test fixture, the state that we are concerned about throughout the test mostly consists of

      • member state of each node
      • state of each node’s oplog
      • network partition topology

      These are the relevant pieces of state that define the behavior of the test. Each state transition function is responsible for mutating some or all of this state. For some transition functions, like transitionToSyncSourceOperationsDuringRollback, this new logging may be a little odd, since after they update the necessary state, the state of the system may actually change further, before another state transition function is executed. Even with this slightly odd behavior, I think the messages demarcating the start and end of each transition function will greatly aid debugging. 

      Attachments

        Activity

          People

            backlog-server-repl Backlog - Replication Team
            william.schultz@mongodb.com William Schultz (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: