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

ReplicaSet rollback should use slaveOk

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.0.0-rc2
    • Affects Version/s: None
    • Component/s: Replication
    • None
    • ALL

      Currently we are already querying secondaries but it will fail and get stuck in ROLLBACK state:

      Th│Thu Aug 18 17:30:55 [rsSync] replSet syncing to: redbeard:10003
      Th│Thu Aug 18 17:30:55 [rsSync] replSet our last op time written: Aug 18 17:26:03:1
      Th│Thu Aug 18 17:30:55 [rsSync] replset source's GTE: Aug 18 17:28:08:1
      Th│Thu Aug 18 17:30:55 [rsSync] replSet rollback 0
      Th│Thu Aug 18 17:30:55 [rsSync] replSet ROLLBACK
      Th│Thu Aug 18 17:30:55 [rsSync] replSet rollback 1
      Th│Thu Aug 18 17:30:55 [rsSync] replSet rollback 2 FindCommonPoint
      Th Thu Aug 18 17:30:55 [rsSync] replSet info rollback our last optime: Aug 18 17:26:03:1
      03 Thu Aug 18 17:30:55 [rsSync] replSet info rollback their last optime: Aug 18 17:29:59:1
      Th Thu Aug 18 17:30:55 [rsSync] replSet info rollback diff in end of log times: -236 seconds
      Th Thu Aug 18 17:30:55 [rsSync] replSet rollback found matching events at Aug 18 17:20:12:1
      Th Thu Aug 18 17:30:55 [rsSync] replSet rollback findcommonpoint scanned : 5
      Th Thu Aug 18 17:30:55 [rsSync] replSet replSet rollback 3 fixup
      Th Thu Aug 18 17:30:55 [rsSync] replSet rollback re-get objects: 13106 nextSafe():

      { $err: "not master and slaveok=false", code: 13435 }

      Th Thu Aug 18 17:30:55 [rsSync] rollback couldn't re-get ns:test.foo _id:_id: 1.0 1/1
      Th Thu Aug 18 17:30:55 [rsSync] replSet syncThread: 13106 nextSafe():

      { $err: "not master and slaveok=false", code: 13435 }

      Th Thu Aug 18 17:31:06 [rsSync] replSet syncing to: redbeard:10003
      Th Thu Aug 18 17:31:06 [rsSync] replSet our last op time written: Aug 18 17:26:03:1
      Th Thu Aug 18 17:31:06 [rsSync] replset source's GTE: Aug 18 17:28:08:1
      Th Thu Aug 18 17:31:06 [rsSync] replSet rollback 0
      04 Thu Aug 18 17:31:06 [rsSync] replSet rollback 1
      Th Thu Aug 18 17:31:06 [rsSync] replSet rollback 2 FindCommonPoint
      Th Thu Aug 18 17:31:06 [rsSync] replSet rollback 2 error findcommonpoint waiting a while before trying again
      Th Thu Aug 18 17:31:17 [rsSync] replSet syncing to: redbeard:10003
      Th Thu Aug 18 17:31:17 [rsSync] replSet our last op time written: Aug 18 17:26:03:1
      Th Thu Aug 18 17:31:17 [rsSync] replset source's GTE: Aug 18 17:28:08:1
      Th Thu Aug 18 17:31:17 [rsSync] replSet rollback 0
      Th Thu Aug 18 17:31:17 [rsSync] replSet rollback 1
      Th Thu Aug 18 17:31:17 [rsSync] replSet rollback 2 FindCommonPoint
      Th Thu Aug 18 17:31:17 [rsSync] replSet rollback 2 error findcommonpoint waiting a while before trying again
      Th Thu Aug 18 17:31:20 [initandlisten] connection accepted from 127.0.0.1:49341 #8
      Th Thu Aug 18 17:31:20 [initandlisten] warning: Stack size set to 768KB. We suggest 1MB
      05 Thu Aug 18 17:31:28 [rsSync] replSet syncing to: redbeard:10003
      Th Thu Aug 18 17:31:28 [rsSync] replSet our last op time written: Aug 18 17:26:03:1
      Th Thu Aug 18 17:31:28 [rsSync] replset source's GTE: Aug 18 17:28:08:1
      Th Thu Aug 18 17:31:28 [rsSync] replSet rollback 0
      Th Thu Aug 18 17:31:28 [rsSync] replSet rollback 1
      Th Thu Aug 18 17:31:28 [rsSync] replSet rollback 2 FindCommonPoint
      Th Thu Aug 18 17:31:28 [rsSync] replSet rollback 2 error findcommonpoint waiting a while before trying again
      Th Thu Aug 18 17:31:39 [rsSync] replSet syncing to: redbeard:10003
      Th Thu Aug 18 17:31:39 [rsSync] replSet our last op time written: Aug 18 17:26:03:1

      and so on...

      I'll try to work up a jstest

            Assignee:
            mathias@mongodb.com Mathias Stearn
            Reporter:
            mathias@mongodb.com Mathias Stearn
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: