diff options
author | Aaron Staple <aaron@10gen.com> | 2010-04-09 23:36:30 -0700 |
---|---|---|
committer | Aaron Staple <aaron@10gen.com> | 2010-04-09 23:39:14 -0700 |
commit | 811623e38508fb03eb073098ed68403fc0e41c6f (patch) | |
tree | 5a6ba41f2633cb5a1618316b1c3b468ce2befa9d | |
parent | 4fb7888bfeb08cd538fc9cdf090e19f00c3605ee (diff) | |
download | mongo-811623e38508fb03eb073098ed68403fc0e41c6f.tar.gz |
reset mem size audit correctly for repl ids
-rw-r--r-- | db/repl.h | 5 | ||||
-rw-r--r-- | dbtests/repltests.cpp | 3 |
2 files changed, 6 insertions, 2 deletions
diff --git a/db/repl.h b/db/repl.h index c5e0f639e0a..a42fa8e25fb 100644 --- a/db/repl.h +++ b/db/repl.h @@ -205,7 +205,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 ) { diff --git a/dbtests/repltests.cpp b/dbtests/repltests.cpp index c6ef6c2f802..53e3609d3a0 100644 --- a/dbtests/repltests.cpp +++ b/dbtests/repltests.cpp @@ -1053,7 +1053,8 @@ namespace ReplTests { check(); ASSERT( !s_.inMem() ); - s_.reset(); + s_.reset( 4 * sizeof( BSONObj ) - 1 ); + s_.mayUpgradeStorage(); ASSERT( s_.inMem() ); } private: |