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:
parent
f528f30c4f
commit
217860f1f1
@ -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 ) {
|
||||
|
@ -1053,7 +1053,8 @@ namespace ReplTests {
|
||||
check();
|
||||
ASSERT( !s_.inMem() );
|
||||
|
||||
s_.reset();
|
||||
s_.reset( 4 * sizeof( BSONObj ) - 1 );
|
||||
s_.mayUpgradeStorage();
|
||||
ASSERT( s_.inMem() );
|
||||
}
|
||||
private:
|
||||
|
Loading…
Reference in New Issue
Block a user