diff options
author | Dianna Hohensee <dianna.hohensee@10gen.com> | 2019-01-22 11:47:50 -0500 |
---|---|---|
committer | Dianna Hohensee <dianna.hohensee@10gen.com> | 2019-03-11 17:38:03 -0400 |
commit | d02edd5290131978f901ffc657bee3470d03f8fd (patch) | |
tree | 3e53beb391466f36d073d0ce710dee3f88d90273 /src/mongo/db/catalog/index_catalog_impl.h | |
parent | b69c97b4da596f1da8dea2b40cf32a7c5c657870 (diff) | |
download | mongo-d02edd5290131978f901ffc657bee3470d03f8fd.tar.gz |
SERVER-39079 Move BackgroundOperation checks out of the catalog layer; add parallel IndexBuildsCoordinator checks for all BackgroundOperation checks
Diffstat (limited to 'src/mongo/db/catalog/index_catalog_impl.h')
-rw-r--r-- | src/mongo/db/catalog/index_catalog_impl.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mongo/db/catalog/index_catalog_impl.h b/src/mongo/db/catalog/index_catalog_impl.h index 933bab58b62..d95f557102f 100644 --- a/src/mongo/db/catalog/index_catalog_impl.h +++ b/src/mongo/db/catalog/index_catalog_impl.h @@ -67,6 +67,7 @@ public: // ---- accessors ----- bool haveAnyIndexes() const override; + bool haveAnyIndexesInProgress() const override; int numIndexesTotal(OperationContext* opCtx) const override; int numIndexesReady(OperationContext* opCtx) const override; int numIndexesInProgress(OperationContext* opCtx) const { @@ -154,6 +155,9 @@ public: * Use this method to notify the IndexCatalog that the spec for this index has changed. * * It is invalid to dereference 'oldDesc' after calling this method. + * + * The caller must hold the collection X lock and ensure no index builds are in progress + * on the collection. */ const IndexDescriptor* refreshEntry(OperationContext* opCtx, const IndexDescriptor* oldDesc) override; @@ -201,6 +205,12 @@ public: stdx::function<void(const IndexDescriptor*)> onDropFn) override; void dropAllIndexes(OperationContext* opCtx, bool includingIdIndex) override; + /** + * Drops the index. + * + * The caller must hold the collection X lock and ensure no index builds are in progress on the + * collection. + */ Status dropIndex(OperationContext* opCtx, const IndexDescriptor* desc) override; /** |