@@ -28,7 +28,7 @@ function attach(anything, done) {
2828function getIndexes ( done , results ) {
2929 var client = results . client ;
3030 var ns = mongodbNS ( results . namespace ) ;
31- client . db ( ns . database , { returnNonCachedInstance : true } ) . collection ( ns . collection ) . indexes ( function ( err , indexes ) {
31+ client . db ( ns . database ) . collection ( ns . collection ) . indexes ( function ( err , indexes ) {
3232 if ( err ) {
3333 done ( err ) ;
3434 }
@@ -52,7 +52,7 @@ function getIndexStats(done, results) {
5252 { $indexStats : { } } ,
5353 { $project : { name : 1 , usageHost : '$host' , usageCount : '$accesses.ops' , usageSince : '$accesses.since' } }
5454 ] ;
55- var collection = client . db ( ns . database , { returnNonCachedInstance : true } ) . collection ( ns . collection ) ;
55+ var collection = client . db ( ns . database ) . collection ( ns . collection ) ;
5656 collection . aggregate ( pipeline , { cursor : { } } ) . toArray ( function ( err , res ) {
5757 if ( err ) {
5858 if ( isNotAuthorizedError ( err ) ) {
@@ -86,7 +86,7 @@ function getIndexStats(done, results) {
8686function getIndexSizes ( done , results ) {
8787 var client = results . client ;
8888 var ns = mongodbNS ( results . namespace ) ;
89- client . db ( ns . database , { returnNonCachedInstance : true } ) . collection ( ns . collection ) . stats ( function ( err , res ) {
89+ client . db ( ns . database ) . collection ( ns . collection ) . stats ( function ( err , res ) {
9090 if ( err ) {
9191 if ( isNotAuthorizedError ( err ) ) {
9292 debug ( 'Not authorized to get collection stats. Returning default for indexSizes {}.' ) ;
0 commit comments