summaryrefslogtreecommitdiff
path: root/src/mongo/db/clientcursor.cpp
diff options
context:
space:
mode:
authorAaron <aaron@10gen.com>2012-02-29 17:07:33 -0800
committerAaron <aaron@10gen.com>2012-02-29 17:42:25 -0800
commitcdf7e46a11fda538cb74b8abf7a2bb1a751c2626 (patch)
treea36124f051b16b07444afbbd1b08c685e265506a /src/mongo/db/clientcursor.cpp
parent1ca44e09a176fdf6dbdf0d966eaec89feac6e86d (diff)
downloadmongo-cdf7e46a11fda538cb74b8abf7a2bb1a751c2626.tar.gz
SERVER-4617 more descriptive error message on attempt to kill a cursor while in use
Diffstat (limited to 'src/mongo/db/clientcursor.cpp')
-rw-r--r--src/mongo/db/clientcursor.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mongo/db/clientcursor.cpp b/src/mongo/db/clientcursor.cpp
index d5d73457493..c9e05e283a2 100644
--- a/src/mongo/db/clientcursor.cpp
+++ b/src/mongo/db/clientcursor.cpp
@@ -747,7 +747,11 @@ namespace mongo {
if ( ! cc().getAuthenticationInfo()->isAuthorizedReads( nsToDatabase( cursor->ns() ) ) )
return false;
- assert( cursor->_pinValue < 100 ); // mustn't have an active ClientCursor::Pointer
+ // mustn't have an active ClientCursor::Pointer
+ massert( 16089,
+ str::stream() << "Cannot kill active cursor " << id,
+ cursor->_pinValue < 100 );
+
delete cursor;
return true;
}