diff options
author | Eric Milkie <milkie@10gen.com> | 2014-03-21 10:17:20 -0400 |
---|---|---|
committer | Eric Milkie <milkie@10gen.com> | 2014-03-21 10:17:33 -0400 |
commit | 70c062eb0646506df8979b49c052a54e6e4f9f8e (patch) | |
tree | a73a3994cbbab8856d191ed044e8a783b12ede84 /src/mongo/db/index_builder.h | |
parent | f6713955af2bfe8a2c5f5ac7d0dfcabebbc821c5 (diff) | |
download | mongo-70c062eb0646506df8979b49c052a54e6e4f9f8e.tar.gz |
SERVER-13053 track index builds explicitly instead of using CurOp
Diffstat (limited to 'src/mongo/db/index_builder.h')
-rw-r--r-- | src/mongo/db/index_builder.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/mongo/db/index_builder.h b/src/mongo/db/index_builder.h index 621ea8e11cf..c3d042b5cea 100644 --- a/src/mongo/db/index_builder.h +++ b/src/mongo/db/index_builder.h @@ -30,6 +30,7 @@ #include <string> +#include "mongo/db/catalog/index_catalog.h" #include "mongo/db/client.h" #include "mongo/db/jsobj.h" #include "mongo/util/background.h" @@ -39,6 +40,8 @@ */ namespace mongo { + class Collection; + class IndexBuilder : public BackgroundJob { public: IndexBuilder(const BSONObj& index); @@ -54,10 +57,13 @@ namespace mongo { Status build( Client::Context& context ) const; /** - * Kill all in-progress indexes matching criteria and, optionally, store them in the - * indexes list. + * Kill all in-progress indexes matching criteria, if non-empty: + * index ns, index name, and/or index key spec. + * Returns a vector of the indexes that were killed. */ - static std::vector<BSONObj> killMatchingIndexBuilds(const BSONObj& criteria); + static std::vector<BSONObj> + killMatchingIndexBuilds(Collection* collection, + const IndexCatalog::IndexKillCriteria& criteria); /** * Retry all index builds in the list. Builds each index in a separate thread. If ns does |