Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SERVER-6931 Don't attempt to look up a cursor using an invalid id. Pr…
…events an occasional incorrect warning message.
- Loading branch information
Showing
3 changed files
with
21 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// The 'cursor not found in map -1' warning is not logged when get more exhausts a client cursor. | ||
// SERVER-6931 | ||
|
||
t = db.jstests_cursorb; | ||
t.drop(); | ||
|
||
// Exhaust a client cursor in get more. | ||
for( i = 0; i < 200; ++i ) { | ||
t.save( { a:i } ); | ||
} | ||
t.find().itcount(); | ||
|
||
// Check that the 'cursor not found in map -1' message is not printed. This message indicates an | ||
// attempt to look up a cursor with an invalid id and should never appear in the log. | ||
log = db.adminCommand( { getLog:'global' } ).log | ||
log.forEach( function( line ) { assert( !line.match( /cursor not found in map -1 / ), | ||
'Cursor map lookup with id -1.' ); } ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters