summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Milkie <milkie@10gen.com>2013-02-20 17:26:55 -0500
committerEric Milkie <milkie@10gen.com>2013-02-20 17:26:55 -0500
commit1e1ee889c2bc36b315b1e92a50db0c996e90d5b9 (patch)
treebe8c6356cbf8b1520bc8c343004df01c5329bb85
parent6ddad8c0d34bdd0e1c08a85cf35b1fd0f0f235e2 (diff)
downloadmongo-1e1ee889c2bc36b315b1e92a50db0c996e90d5b9.tar.gz
Revert "SERVER-8418 Enable usePowerOf2Sizes on collection upon text index creation."
This reverts commit 6ddad8c0d34bdd0e1c08a85cf35b1fd0f0f235e2. Breaking slowNightly/32bit.js
-rw-r--r--jstests/fts1.js5
-rw-r--r--src/mongo/db/fts/fts_index.cpp8
-rw-r--r--src/mongo/db/fts/fts_index.h2
-rw-r--r--src/mongo/db/indexkey.h9
-rw-r--r--src/mongo/db/pdfile.cpp6
5 files changed, 0 insertions, 30 deletions
diff --git a/jstests/fts1.js b/jstests/fts1.js
index bc8c7581909..bd464eb4b41 100644
--- a/jstests/fts1.js
+++ b/jstests/fts1.js
@@ -9,12 +9,7 @@ t.save( { _id : 2 , x : "az b" } );
t.save( { _id : 3 , x : "b c" } );
t.save( { _id : 4 , x : "b c d" } );
-assert.eq(t.stats().userFlags, 0,
- "A new collection should not have power-of-2 storage allocation strategy");
t.ensureIndex( { x : "text" } );
-assert.eq(t.stats().userFlags, 1,
- "Creating a text index on a collection should change the allocation strategy " +
- "to power-of-2.");
assert.eq( [1,2,3,4] , queryIDS( t , "c az" ) , "A1" );
assert.eq( [4] , queryIDS( t , "d" ) , "A2" );
diff --git a/src/mongo/db/fts/fts_index.cpp b/src/mongo/db/fts/fts_index.cpp
index 2e667d0d1f7..04fafe12a83 100644
--- a/src/mongo/db/fts/fts_index.cpp
+++ b/src/mongo/db/fts/fts_index.cpp
@@ -26,7 +26,6 @@
#include "mongo/util/mongoutils/str.h"
#include "mongo/util/stringutils.h"
#include "mongo/util/timer.h"
-#include "mongo/db/pdfile.h"
namespace mongo {
@@ -85,13 +84,6 @@ namespace mongo {
return new FTSIndex( this, spec );
}
- void FTSIndexPlugin::postBuildHook( const IndexSpec& spec ) const {
- string ns = spec.getDetails()->parentNS();
- NamespaceDetails* nsd = nsdetails( ns );
- if ( nsd->setUserFlag( NamespaceDetails::Flag_UsePowerOf2Sizes ) ) {
- nsd->syncUserFlags( ns );
- }
- }
FTSIndexPlugin* ftsPlugin;
MONGO_INITIALIZER(FTSIndexPlugin)(InitializerContext* context) {
diff --git a/src/mongo/db/fts/fts_index.h b/src/mongo/db/fts/fts_index.h
index 2eff9207ab1..d9bf8a61b16 100644
--- a/src/mongo/db/fts/fts_index.h
+++ b/src/mongo/db/fts/fts_index.h
@@ -61,8 +61,6 @@ namespace mongo {
BSONObj adjustIndexSpec( const BSONObj& spec ) const;
- void postBuildHook( const IndexSpec& spec ) const;
-
};
} //namespace fts
diff --git a/src/mongo/db/indexkey.h b/src/mongo/db/indexkey.h
index 6753ee3bc60..85cba345897 100644
--- a/src/mongo/db/indexkey.h
+++ b/src/mongo/db/indexkey.h
@@ -109,15 +109,6 @@ namespace mongo {
*/
virtual BSONObj adjustIndexSpec( const BSONObj& spec ) const { return spec; }
- /**
- * Hook function to run after an index that uses this plugin is built.
- *
- * This will be called with an active write context (and lock) on the database.
- *
- * @param spec The IndexSpec of the newly built index.
- */
- virtual void postBuildHook( const IndexSpec& spec ) const { }
-
// ------- static below -------
static IndexPlugin* get( const string& name ) {
diff --git a/src/mongo/db/pdfile.cpp b/src/mongo/db/pdfile.cpp
index 948d7c392cb..8b90b6c7363 100644
--- a/src/mongo/db/pdfile.cpp
+++ b/src/mongo/db/pdfile.cpp
@@ -1538,12 +1538,6 @@ namespace mongo {
// clear transient info caches so they refresh; increments nIndexes
tableToIndex->addIndex(tabletoidxns.c_str());
getDur().writingInt(tableToIndex->indexBuildsInProgress) -= 1;
-
- const IndexPlugin *plugin = idx.getSpec().getType()->getPlugin();
- if (plugin) {
- plugin->postBuildHook( idx.getSpec() );
- }
-
}
catch (...) {
// Generally, this will be called as an exception from building the index bubbles up.