-
Type: Question
-
Resolution: Done
-
Priority: Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
hi, i encountered a problem about dropDatabase recently with my 4.0.3 replica set cluster.
here's the mongod's log and i can't find the reason:
Fri Dec 4 17:43:50.219 I NETWORK [conn6054599] received client metadata from 100.67.165.240:47353 conn6054599: { driver: { name: "mongo-go-driver", version: "v1.0.0" }, os: { type: "linux", architecture: "amd64" }, platform: "go1.10.2" } ... ... Fri Dec 4 17:44:59.669 I COMMAND [conn5561779] command admin.$cmd appName: "mongoimport" command: isMaster { isMaster: 1, $clusterTime: { clusterTime: Timestamp(1607075023, 1), signature: { hash: BinData(0, 1D71E9754104E92D9DE02EDF5BA5AAAC5D64B195), keyId: 6848505140803010590 } }, $db: "admin", $readPreference: { mode: "primaryPreferred" } } numYields:0 reslen:866 locks:{ Global: { acquireCount: { r: 1 }, acquireWaitCount: { r: 1 }, timeAcquiringMicros: { r: 65714573 } }, Database: { acquireCount: { r: 1 } }, Collection: { acquireCount: { r: 1 } } } protocol:op_msg 65716ms Fri Dec 4 17:44:59.667 I COMMAND [conn6054599] command tnt-dnio46v0e command: dropDatabase { dropDatabase: 1, lsid: { id: UUID("949b9c3c-c138-46cc-92d4-e57d7d1e87ba") }, $clusterTime: { clusterTime: Timestamp(1607075029, 1), signature: { hash: BinData(0, 9EC708C8A07F2B59BD858A86F1E4653F29CFF207), keyId: 6848505140803010590 } }, $db: "tnt-dnio46v0e" } numYields:0 reslen:333 locks:{ Global: { acquireCount: { r: 2, w: 1, W: 1 }, acquireWaitCount: { W: 1 }, timeAcquiringMicros: { W: 69436501 } }, Database: { acquireCount: { W: 1 } } } protocol:op_msg 69436ms Fri Dec 4 17:44:59.669 I NETWORK [conn6054599] end connection 100.67.165.240:47353 (140 connections now open)
- this seems to be highly related to the 'dropDatabase' command;
- stuck affect all cmds during the time and application will get timeout error (of course since it's global lock issue)
- not related to resource(cpu, memory) bottleneck;
- but not every call of 'dropDatabase' command will trigger a stuck;
- i can't do `db.currentOp()` to get more infos exactly when this happened cause i don't know when will it happen;
my question:
- which operation will hold the global lock for such long time?
- why does this appear?
the mongod.log files and diagnostic.data is attached, BTW, time zone is GMT+8
Thank you!