diff options
-rw-r--r-- | src/mongo/db/SConscript | 1 | ||||
-rw-r--r-- | src/mongo/db/index_legacy.cpp | 34 | ||||
-rw-r--r-- | src/mongo/db/index_legacy.h | 17 | ||||
-rw-r--r-- | src/mongo/db/s/SConscript | 1 |
4 files changed, 2 insertions, 51 deletions
diff --git a/src/mongo/db/SConscript b/src/mongo/db/SConscript index bb653aa9e7c..f49da245bac 100644 --- a/src/mongo/db/SConscript +++ b/src/mongo/db/SConscript @@ -863,7 +863,6 @@ env.Library( ], LIBDEPS=[ 'index/index_access_methods', - '$BUILD_DIR/mongo/db/catalog/index_catalog', ], ) diff --git a/src/mongo/db/index_legacy.cpp b/src/mongo/db/index_legacy.cpp index a44c609b340..a18d4a9dc52 100644 --- a/src/mongo/db/index_legacy.cpp +++ b/src/mongo/db/index_legacy.cpp @@ -27,15 +27,13 @@ * it in the license file. */ +#include "mongo/platform/basic.h" + #include "mongo/db/index_legacy.h" #include <string> -#include "mongo/db/catalog/collection.h" -#include "mongo/db/catalog/index_catalog.h" -#include "mongo/db/client.h" #include "mongo/db/fts/fts_spec.h" -#include "mongo/db/index/expression_keys_private.h" #include "mongo/db/index/s2_access_method.h" #include "mongo/db/index_names.h" #include "mongo/db/jsobj.h" @@ -57,32 +55,4 @@ StatusWith<BSONObj> IndexLegacy::adjustIndexSpecObject(const BSONObj& obj) { return obj; } -// static -BSONObj IndexLegacy::getMissingField(Collection* collection, const BSONObj& infoObj) { - BSONObj keyPattern = infoObj.getObjectField("key"); - std::string accessMethodName; - if (collection) - accessMethodName = collection->getIndexCatalog()->getAccessMethodName(keyPattern); - else - accessMethodName = IndexNames::findPluginName(keyPattern); - - if (IndexNames::HASHED == accessMethodName) { - int hashVersion = infoObj["hashVersion"].numberInt(); - HashSeed seed = infoObj["seed"].numberInt(); - - // Explicit null valued fields and missing fields are both represented in hashed indexes - // using the hash value of the null BSONElement. This is partly for historical reasons - // (hash of null was used in the initial release of hashed indexes and changing would - // alter the data format). Additionally, in certain places the hashed index code and - // the index bound calculation code assume null and missing are indexed identically. - BSONObj nullObj = BSON("" << BSONNULL); - return BSON("" << ExpressionKeysPrivate::makeSingleHashKey( - nullObj.firstElement(), seed, hashVersion)); - } else { - BSONObjBuilder b; - b.appendNull(""); - return b.obj(); - } -} - } // namespace mongo diff --git a/src/mongo/db/index_legacy.h b/src/mongo/db/index_legacy.h index 16b38b2de0a..7ac6f8eb983 100644 --- a/src/mongo/db/index_legacy.h +++ b/src/mongo/db/index_legacy.h @@ -34,10 +34,6 @@ namespace mongo { -class Collection; -class IndexDescriptor; -class OperationContext; - /** * There has been some behavior concerning indexed access patterns -- both pre and post-index * construction -- that does not quite fit in the access pattern model implemented in @@ -56,19 +52,6 @@ public: * object to conform to their expected format. */ static StatusWith<BSONObj> adjustIndexSpecObject(const BSONObj& obj); - - /** - * Returns the BSONObj that is inserted into an index when the object is missing the keys - * the index is over. - * - * For every index *except hash*, this is the BSON equivalent of jstNULL. - * For the hash index, it's the hash of BSON("" << BSONNULL). - * - * s/d_split.cpp needs to know this. - * - * This is a significant leak of index functionality out of the index layer. - */ - static BSONObj getMissingField(Collection* collection, const BSONObj& infoObj); }; } // namespace mongo diff --git a/src/mongo/db/s/SConscript b/src/mongo/db/s/SConscript index 5db7844a060..06f557c108b 100644 --- a/src/mongo/db/s/SConscript +++ b/src/mongo/db/s/SConscript @@ -311,7 +311,6 @@ env.Library( '$BUILD_DIR/mongo/db/commands/server_status', '$BUILD_DIR/mongo/db/commands/test_commands_enabled', '$BUILD_DIR/mongo/db/commands/txn_cmd_request', - '$BUILD_DIR/mongo/db/index_d', '$BUILD_DIR/mongo/db/repl/repl_coordinator_interface', '$BUILD_DIR/mongo/db/repl/replica_set_messages', '$BUILD_DIR/mongo/s/commands/shared_cluster_commands', |