diff options
author | Ben Becker <ben.becker@10gen.com> | 2012-11-16 13:13:47 -0800 |
---|---|---|
committer | Ben Becker <ben.becker@10gen.com> | 2012-11-16 13:42:56 -0800 |
commit | 294bce818add5c4bc59f7a7e8f5680bcdecff6e3 (patch) | |
tree | 5470adb0325a03227aedbe84c880792af8dc2a43 /src | |
parent | 0265277c79d818d09ed54ea815717c7b4d041778 (diff) | |
download | mongo-294bce818add5c4bc59f7a7e8f5680bcdecff6e3.tar.gz |
SERVER-7159: return early if a DeletedRecord matches the requested size
Diffstat (limited to 'src')
-rw-r--r-- | src/mongo/db/namespace_details.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mongo/db/namespace_details.cpp b/src/mongo/db/namespace_details.cpp index 5e416ea66c6..bc43ceeb8fc 100644 --- a/src/mongo/db/namespace_details.cpp +++ b/src/mongo/db/namespace_details.cpp @@ -357,6 +357,9 @@ namespace mongo { bestmatchlen = r->lengthWithHeaders(); bestmatch = cur; bestprev = prev; + if (r->lengthWithHeaders() == len) + // exact match, stop searching + break; } if ( bestmatchlen < 0x7fffffff && --extra <= 0 ) break; |