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

Race in tenant_migration_recipient_current_op.js

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 5.2.0, 5.1.1
    • Affects Version/s: None
    • Component/s: Replication
    • None
    • Fully Compatible
    • ALL
    • v5.1
    • Server Serverless 2021-11-15, Server Serverless 2021-11-29
    • 37

      Since there are no writes on the donor during migration, the recipient can enter "consistent" before applying any oplog entries:

          // If this optime has already passed, just return a ready future.
          if (_lastAppliedOpTimesUpToLastBatch.donorOpTime >= donorOpTime ||
              _beginApplyingAfterOpTime >= donorOpTime) {
              return SemiFuture<OpTimePair>::makeReady(_lastAppliedOpTimesUpToLastBatch);
          }
      

      The tenant_migration_recipient_current_op.js test waits for the recipient to be "consistent" and asserts its currentOp's numOpsApplied is ≥ 1, which may be false if the recipient took this shortcut.

            Assignee:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Reporter:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: