MCPcopy
hub / github.com/mongodb/node-mongodb-native / markUnpinned

Method markUnpinned

src/cmap/metrics.ts:27–35  ·  view source on GitHub ↗

* Unmark a connection as pinned for an operation.

(pinType: string)

Source from the content-addressed store, hash-verified

25 * Unmark a connection as pinned for an operation.
26 */
27 markUnpinned(pinType: string): void {
28 if (pinType === ConnectionPoolMetrics.TXN) {
29 this.txnConnections -= 1;
30 } else if (pinType === ConnectionPoolMetrics.CURSOR) {
31 this.cursorConnections -= 1;
32 } else {
33 this.otherConnections -= 1;
34 }
35 }
36
37 /**
38 * Return information about the cmap metrics as a string.

Callers 2

metrics.test.jsFile · 0.80
createConnectionMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected