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

global lock on secondary

    • Type: Icon: Bug Bug
    • Resolution: Incomplete
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • ALL

      Hi,support !

           We found  slow logs about

      2021-04-14T16:54:06.865+0800 I COMMAND [conn671031] command db.table command: getMore \{ getMore: 8060710266719536787, collection: "bik4bos", batchSize: 101, lsid: { id: UUID("6d8a691e-5bff-4699-bfe7-5596cdca38ee"), uid: BinData(0, E12CB5D7782FE6D81309E5B284A1AB6AE43E3C7B01D00039E2B3A012AADA2312) }, $clusterTime: \{ clusterTime: Timestamp(1618390445, 1169), signature: { hash: BinData(0, 31188007A6BAE8EF4B3739C8E7A9D3912FBBE3D0), keyId: 6914165982348967966 } }, $client: \{ driver: { name: "mongo-java-driver|sync", version: "3.10.2" }, os: \{ type: "Linux", name: "Linux", architecture: "amd64", version: "2.6.32-754.23.1.el6.x86_64" }, platform: "Java/Oracle Corporation/1.8.0_66-b17", mongos: \{ host: "VECS018588:30000", client: "10.111.225.126:43716", version: "4.0.12" } }, $configServerState: \{ opTime: { ts: Timestamp(1618390445, 591), t: 6 } }, $db: "db" } originatingCommand: \{ aggregate: "table", pipeline: [ { $match: { cityGuid.value: "16a0d780eeff499e8a348fb29b5cb10b", pos.loc: { $geoWithin: { $geometry: { type: "Polygon", coordinates: [ [ [ 110.3369011480655, 22.66012923621993 ], [ 110.3369011480655, 22.70930431482262 ], [ 110.3637487187408, 22.70930431482262 ], [ 110.3637487187408, 22.66012923621993 ], [ 110.3369011480655, 22.66012923621993 ] ] ] } } }, bikeType.value: 1, opStatus.value: \{ $in: [ 2, 3, 4 ] }, bizType.value: \{ $in: [ 0 ] }, $or: [ \{ alert: { $in: [ "1124", "1122", "103", "101", "1123", "2042", "1125", "1126" ] } }, \{ opFault.value: 1 }, \{ opFaultCheck.value: 1 }, \{ lastScanUser.timestamp: { $gte: 1618131245701, $lte: 1618390445701 }, alert: \{ $in: [ "104" ] } }, \{ alertMsg.104: { $gte: 1531990445701, $lte: 1618368845701 }, alert: \{ $in: [ "104" ] } }, \{ alert: { $in: [ "7777" ] }, fault: \{ $in: [ "1-1013", "1-1002", "1-1001", "1-1000", "1-1004", "1-1015", "1-5", "1-1003", "1-1005", "1-1006", "1-1007", "1-1009", "1-1012", "1-1014", "1-1008", "1-10112", "1-10113", "1-11111" ] } } ] } }, \{ $project: { _id: true, bikeNo: true, pos: { lng: true, lat: true, geo: { geo6: true } } } }, \{ $group: { _id: "$pos.geo.geo6", count: { $sum: { $const: 1 } }, first: \{ $first: "$bikeNo" }, maxLat: \{ $max: "$pos.lat" }, minLat: \{ $min: "$pos.lat" }, maxLng: \{ $max: "$pos.lng" }, minLng: \{ $min: "$pos.lng" } } } ], fromMongos: true, needsMerge: true, mergeByPBRT: false, collation: \{ locale: "simple" }, cursor: \{ batchSize: 0 }, allowImplicitCollectionCreation: true, shardVersion: [ Timestamp(997, 1), ObjectId('5ff4312c8299c11b5bd1abaa') ], lsid: \{ id: UUID("6d8a691e-5bff-4699-bfe7-5596cdca38ee"), uid: BinData(0, E12CB5D7782FE6D81309E5B284A1AB6AE43E3C7B01D00039E2B3A012AADA2312) }, $readPreference: \{ mode: "secondaryPreferred" }, $clusterTime: \{ clusterTime: Timestamp(1618390445, 1150), signature: { hash: BinData(0, 31188007A6BAE8EF4B3739C8E7A9D3912FBBE3D0), keyId: 6914165982348967966 } }, $client: \{ driver: { name: "mongo-java-driver|sync", version: "3.10.2" }, os: \{ type: "Linux", name: "Linux", architecture: "amd64", version: "2.6.32-754.23.1.el6.x86_64" }, platform: "Java/Oracle Corporation/1.8.0_66-b17", mongos: \{ host: "VECS018588:30000", client: "10.111.225.126:43716", version: "4.0.12" } }, $configServerState: \{ opTime: { ts: Timestamp(1618390445, 591), t: 6 } }, $db: "db" } planSummary: IXSCAN \{ cityGuid.value: 1, pos.loc: "2dsphere" } cursorid:8060710266719536787 keysExamined:0 docsExamined:0 cursorExhausted:1 numYields:0 nreturned:0 reslen:381 locks:\{ Global: { acquireCount: { r: 3 }, acquireWaitCount: \{ r: 1 }, timeAcquiringMicros: \{ r: 1148383 } }, Database: \{ acquireCount: { r: 2 } }, Collection: \{ acquireCount: { r: 1 } } } storage:{} protocol:op_msg 1148ms

         We noticed the global lock had been sloved on 3.6 version , but our mongo version is 4.0.12

        1. metrics.2021-04-15T05-10-37Z-00000
          6.08 MB
        2. metrics.2021-04-21T06-11-43Z-000002021-04-21-1618992977
          2.18 MB
        3. mongo_logs.zip
          119.72 MB
        4. Screen Shot 2021-04-21 at 11.28.34 AM.png
          Screen Shot 2021-04-21 at 11.28.34 AM.png
          298 kB
        5. Screen Shot 2021-04-22 at 1.08.50 PM.png
          Screen Shot 2021-04-22 at 1.08.50 PM.png
          269 kB
        6. Screen Shot 2021-04-28 at 9.51.47 AM.png
          Screen Shot 2021-04-28 at 9.51.47 AM.png
          254 kB

            Assignee:
            edwin.zhou@mongodb.com Edwin Zhou
            Reporter:
            18621325186@163.com h jy
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: