0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-11-30 00:56:44 +01:00

reset mem size audit correctly for repl ids

This commit is contained in:
Aaron Staple 2010-04-09 23:36:30 -07:00
parent f528f30c4f
commit 217860f1f1
2 changed files with 6 additions and 2 deletions

View File

@ -208,7 +208,10 @@ namespace mongo {
public:
MemIds() : size_() {}
friend class IdTracker;
void reset() { imp_.clear(); }
void reset() {
imp_.clear();
size_ = 0;
}
bool get( const char *ns, const BSONObj &id ) { return imp_[ ns ].count( id ); }
void set( const char *ns, const BSONObj &id, bool val ) {
if ( val ) {

View File

@ -1053,7 +1053,8 @@ namespace ReplTests {
check();
ASSERT( !s_.inMem() );
s_.reset();
s_.reset( 4 * sizeof( BSONObj ) - 1 );
s_.mayUpgradeStorage();
ASSERT( s_.inMem() );
}
private: