-
Type: Task
-
Resolution: Unresolved
-
Priority: Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: None
-
2
https://www.mongodb.com/docs/upcoming/reference/command/fsync/#check-lock-status
There is a function in the docs page that a user can run to check the lock status - it parses currentOp output
However, when running from a mongos, the currentOp output shows output from each shard, and the fsyncLock field is inside these documents, e.g.
{ shard: 'shard02', fsyncLock: true, type: 'op', host: 'M-K4F3614CKP:30004', desc: 'Checkpointer', active: true, currentOpTime: '2024-05-16T17:32:45.613+10:00', isFromUserConnection: false, opid: 'shard02:4120', op: 'none', ns: '', redacted: false, command: {}, numYields: 0, queues: { execution: { admissions: 0, totalTimeQueuedMicros: Long("0") }, ingress: { admissions: 0, totalTimeQueuedMicros: Long("0") } }, currentQueue: null, locks: {}, waitingForLock: false, lockStats: {}, waitingForFlowControl: false, flowControlStats: {} }
But there is no top level field called fsyncLock and so this function returns "false" when run against a mongos, even when the cluster is fsyncLocked
Please either revise the function so it works against a mongos, or add a note saying this only works when connected to a replica set (or standalone, I guess)
I think the former (revise the function so it works against a mongos) is preferred, as soon all deployments will be sharded clusters (coming in 8.3?)