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

Secondary block on initialSync when the next oplog needed was removed on primary

    • Fully Compatible
    • ALL
    • Hide

      1. prepare replicaset with big dataset or small oplog.
      2. send resync command to Secondary.

      Show
      1. prepare replicaset with big dataset or small oplog. 2. send resync command to Secondary.
    • Repl 16 (06/24/16), Repl 17 (07/15/16)

      During initialSync, secondary need to apply oplog serveral times which will call _applyOplogUntil, if the next oplog was removed on primary, the secondary will block on this call, resync command will have no effect in this sutiation, and the process cannot be killed normally.

      Thread 54 (Thread 0x2b559c19f700 (LWP 60398)):
      #0  0x0000003349a0b7bb in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
      #1  0x0000000000e44f58 in mongo::repl::BackgroundSync::waitForMore() ()
      #2  0x0000000000f30c5a in mongo::repl::SyncTail::tryPopAndWaitForMore(mongo::OperationContext*, mongo::repl::SyncTail::OpQueue*) ()
      #3  0x0000000000e70c25 in mongo::repl::InitialSync::_applyOplogUntil(mongo::OperationContext*, mongo::repl::OpTime const&) ()
      #4  0x0000000000e71353 in mongo::repl::InitialSync::oplogApplication(mongo::OperationContext*, mongo::repl::OpTime const&) ()
      #5  0x0000000000f1cc0f in ?? ()
      #6  0x0000000000f1e530 in ?? ()
      #7  0x0000000000f1f23f in mongo::repl::syncDoInitialSync() ()
      #8  0x0000000000f29770 in mongo::repl::runSyncThread() ()
      #9  0x0000000001b0f500 in execute_native_thread_routine ()
      #10 0x0000003349a07851 in start_thread () from /lib64/libpthread.so.0
      #11 0x00000033496e767d in clone () from /lib64/libc.so.6
      

            Assignee:
            judah.schvimer@mongodb.com Judah Schvimer
            Reporter:
            zyd_com@126.com Zhang Youdong
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: