diff options
author | Aaron <aaron@10gen.com> | 2012-02-29 17:07:33 -0800 |
---|---|---|
committer | Aaron <aaron@10gen.com> | 2012-02-29 17:42:25 -0800 |
commit | cdf7e46a11fda538cb74b8abf7a2bb1a751c2626 (patch) | |
tree | a36124f051b16b07444afbbd1b08c685e265506a /src/mongo/db/clientcursor.cpp | |
parent | 1ca44e09a176fdf6dbdf0d966eaec89feac6e86d (diff) | |
download | mongo-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.cpp | 6 |
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; } |