summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathias Stearn <redbeard0531@gmail.com>2014-09-22 16:14:51 -0400
committerMathias Stearn <redbeard0531@gmail.com>2014-09-22 17:08:59 -0400
commit7f3e27009faafa5b3f8913f05c1be3d49e36ff08 (patch)
tree542705bf812b8ec2ce58d99ce192cfb004149979
parent4dcdc66318f9fc8665c0bad68dab24ee86f5c4ae (diff)
downloadmongo-7f3e27009faafa5b3f8913f05c1be3d49e36ff08.tar.gz
SERVER-15319 Forward-compatible change for 2.8 freelist
Makes NamespaceDetails::orphanDeletedList() also orphan the new 2.8-only deleted lists. This ensures that 2.8 won't attempt to reuse the space in extents that no longer belong to this collection.
-rw-r--r--src/mongo/db/structure/catalog/namespace_details.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mongo/db/structure/catalog/namespace_details.cpp b/src/mongo/db/structure/catalog/namespace_details.cpp
index ea003e07bbf..9d8489f3264 100644
--- a/src/mongo/db/structure/catalog/namespace_details.cpp
+++ b/src/mongo/db/structure/catalog/namespace_details.cpp
@@ -710,6 +710,9 @@ namespace mongo {
for( int i = 0; i < Buckets; i++ ) {
_deletedList[i].writing().Null();
}
+
+ // SERVER-15319: Zero out reserved bytes that will become deleted-list buckets in 2.8.
+ memset(_reserved, 0, sizeof(_reserved) - 8);
}
int NamespaceDetails::_catalogFindIndexByName(const StringData& name,