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

mongodb 4.4 secondary replication hang

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 4.4.12
    • Component/s: None
    • None
    • Storage Engines
    • ALL

      1、i check replication info that i find the one secondary lag more than 9000s
      shard4:SECONDARY> rs.printSlaveReplicationInfo()
      source: mongodb68:31004
      syncedTo: Tue Feb 14 2023 12:36:01 GMT+0800 (CST)
      0 secs (0 hrs) behind the primary
      source: mongodb69:31004
      syncedTo: Tue Feb 14 2023 10:03:40 GMT+0800 (CST)
      9141 secs (2.54 hrs) behind the primary
      2、i check lock. serverStatus:1 is locked by "ParallelBatchWriterMode" : "r"

      {
      "type" : "op",
      "desc" : "conn323699",
      "connectionId" : 323699,
      "clientMetadata" : {
      "driver" :

      { "name" : "mongo-go-driver", "version" : "v1.0.1" }

      ,
      "os" :

      { "type" : "linux", "architecture" : "amd64" }

      ,
      "platform" : "go1.13.10"
      },
      "active" : true,
      "currentOpTime" : "2023-02-14T10:43:50.888+08:00",

      "opid" : -1523928877,
      "secs_running" : NumberLong(2831),
      "microsecs_running" : NumberLong("2831816411"),
      "op" : "command",
      "ns" : "admin.$cmd",
      "command" : {
      "serverStatus" : 1,
      "advisoryHostFQDNs" : 1,
      "locks" : 0,
      "recordStats" : 0,
      "oplog" : 0,
      "$clusterTime" : {
      "clusterTime" : Timestamp(1676339797, 2140),
      "signature" :

      { "hash" : BinData(0,"/2uRF//p/2dkSYG0iauiyFybodI="), "keyId" : NumberLong("7143870411116118530") }

      },
      "$db" : "admin",
      "$readPreference" :

      { "mode" : "primaryPreferred" }

      },
      "numYields" : 0,
      "waitingForLatch" :

      { "timestamp" : ISODate("2023-02-14T02:43:50.876Z"), "captureName" : "CondVarLockGrantNotification::_mutex" }

      ,
      "locks" :

      { "ParallelBatchWriterMode" : "r" }

      ,
      "waitingForLock" : true,
      "lockStats" : {
      "ParallelBatchWriterMode" : {
      "acquireCount" :

      { "r" : NumberLong(2) }

      ,
      "acquireWaitCount" :

      { "r" : NumberLong(2) }

      ,
      "timeAcquiringMicros" :

      { "r" : NumberLong("2831703688") }

      }
      },
      "waitingForFlowControl" : false,
      "flowControlStats" : {

      }
      },
      {
      "type" : "op",
      "desc" : "OplogApplier-0",
      "active" : true,
      "currentOpTime" : "2023-02-14T11:20:14.842+08:00",
      "effectiveUsers" : [

      { "user" : "__system", "db" : "local" }

      ],
      "opid" : -1524195878,
      "op" : "none",
      "ns" : "",
      "command" : {

      },
      "numYields" : 0,
      "locks" :

      { "ParallelBatchWriterMode" : "W" }

      ,
      "waitingForLock" : false,
      "lockStats" : {
      "ParallelBatchWriterMode" : {
      "acquireCount" :

      { "W" : NumberLong(1) }

      },
      "ReplicationStateTransition" : {
      "acquireCount" :

      { "w" : NumberLong(4) }

      },
      "Global" : {
      "acquireCount" :

      { "r" : NumberLong(1), "w" : NumberLong(3) }

      },
      "Database" : {
      "acquireCount" :

      { "r" : NumberLong(1), "w" : NumberLong(3) }

      },
      "Collection" : {
      "acquireCount" :

      { "r" : NumberLong(1), "w" : NumberLong(3) }

      },
      "Mutex" : {
      "acquireCount" :

      { "r" : NumberLong(4) }

      }
      },
      "waitingForFlowControl" : false,
      "flowControlStats" : {

      }
      }

        1. SERVER-73972.png
          SERVER-73972.png
          563 kB
        2. single active writer.png
          single active writer.png
          20 kB

            Assignee:
            yuan.fang@mongodb.com Yuan Fang
            Reporter:
            601290552@qq.com jing xu
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: