[SERVER-20632] Query execute time not include some LOCK acquire time Created: 25/Sep/15  Updated: 25/Sep/15  Resolved: 25/Sep/15

Status: Closed
Project: Core Server
Component/s: Diagnostics, Querying
Affects Version/s: 3.0.4
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: YANG Chenghu Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-18637 Measure initial lock time in operatio... Closed
Operating System: ALL
Participants:

 Description   

slowlog info:

2015-09-22T04:53:10.248+0800 I QUERY    [conn1664530] query external.dianping query: { flag: { $ne: "d" }, data.poiid: { $in: [ "aaaaa", "xxxxx", "yyyyy" ] } } planSummary: IXSCAN { data.poiid: 1.0 } ntoreturn:0 ntoskip:0 nscanned:2 nscannedObjects:0 keyUpdates:0 writeConflicts:0 numYields:2 nreturned:0 reslen:20 locks:{ Global: { acquireCount: { r: 6 }, acquireWaitCount: { r: 1 }, timeAcquiringMicros: { r: 195093 } }, Database: { acquireCount: { r: 3 } }, Collection: { acquireCount: { r: 3 } } } 52ms

execute time is 52ms,but Global timeAcquiringMicros is 195ms.

AutoGetCollectionForRead::AutoGetCollectionForRead(OperationContext* txn    ,
                                                        const std::string& ns    )
             : _txn(txn),
               _transaction(txn, MODE_IS),
               _db(_txn, nsToDatabaseSubstring(ns), MODE_IS),
               _collLock(_txn->lockState(), ns, MODE_IS),
               _coll(NULL) {
          _init(ns, nsToCollectionSubstring(ns));
 }

_db and _collLock will acquire lock, may spend a lot time. but query started time is in _init set.



 Comments   
Comment by Scott Hernandez (Inactive) [ 25/Sep/15 ]

This is a duplicate of SERVER-18637. Please vote/watch and direct any comments there.

Generated at Thu Feb 08 03:54:48 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.