From 05afa3b8a07f2dd0c7bd4e216066a01494e5a0f2 Mon Sep 17 00:00:00 2001 From: Eliot Horowitz Date: Wed, 30 Mar 2011 21:01:37 -0400 Subject: [PATCH] better error messages for killCursors --- db/instance.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/db/instance.cpp b/db/instance.cpp index a43a5b87c98..2eae1914c28 100644 --- a/db/instance.cpp +++ b/db/instance.cpp @@ -383,9 +383,10 @@ namespace mongo { x++; // reserved int n = *x++; - assert( m.dataSize() == 8 + ( 8 * n ) ); + uassert( 13659 , "sent 0 cursors " , n == 0 ); + massert( 13658 , str::stream() << "bad kill cursors size: " << m.dataSize() , m.dataSize() == 8 + ( 8 * n ) ); + uassert( 13004 , str::stream() << "sent negative cursors to kill: " << n , n >= 1 ); - uassert( 13004 , "sent 0 cursors to kill" , n >= 1 ); if ( n > 2000 ) { log( n < 30000 ? LL_WARNING : LL_ERROR ) << "receivedKillCursors, n=" << n << endl; assert( n < 30000 );