-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: 7.0.3
-
Component/s: None
-
Query Execution
-
ALL
-
-
(copied to CRM)
-
None
-
None
-
None
-
None
-
None
-
None
-
None
The serverStatus metrics.cursor.timedOut field stays at 0 even after cursors have timed out.
I created a simple Java program that established a bunch of cursors, and then abandoned them before exhausting them. I see the cursors tracked on the server:
Enterprise [direct: mongos] test> db.serverStatus().metrics.cursor
{
timedOut: Long('0'),
open: {
multiTarget: Long('0'),
singleTarget: Long('24'),
pinned: Long('0'),
total: Long('24')
}
}
After waiting 30 minutes, I tried again.
Enterprise [direct: mongos] test> db.serverStatus().metrics.cursor
{
timedOut: Long('0'),
open: {
multiTarget: Long('0'),
singleTarget: Long('0'),
pinned: Long('0'),
total: Long('0')
}
}
As expected, metrics.cursor.open.total dropped from 24 to 0.
But unexpectedly, metrics.cursor.timedOut remained at 0 instead of bumping to 24.
I also looked on the primary of the single shard in the cluster:
Enterprise shard01 [direct: primary] test> db.serverStatus().metrics.cursor
{
moreThanOneBatch: Long('183'),
timedOut: Long('0'),
totalOpened: Long('180562'),
lifespan: {
greaterThanOrEqual10Minutes: Long('24'),
lessThan10Minutes: Long('0'),
lessThan15Seconds: Long('2'),
lessThan1Minute: Long('0'),
lessThan1Second: Long('180381'),
lessThan30Seconds: Long('0'),
lessThan5Seconds: Long('153')
},
open: { noTimeout: Long('0'), pinned: Long('2'), total: Long('2') }
}
The value is also 0 there.
This is unexpected based on the documentation: https://www.mongodb.com/docs/v3.0/reference/command/serverStatus/#serverStatus.cursors.timedOut
timedOut provides a counter of the total number of cursors that have timed out since the server process started. If this number is large or growing at a regular rate, this may indicate an application error.
- is related to
-
SERVER-91632 Create a metrics.abortExpiredTransactions.totalAborted counter
-
- Closed
-