summaryrefslogtreecommitdiff
path: root/src/mongo/db/catalog/index_builds_manager.h
diff options
context:
space:
mode:
authorGregory Noma <gregory.noma@gmail.com>2020-09-30 10:26:06 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-09-30 14:58:26 +0000
commitcadb990e1ac4229bcf419f47c82656b6458faf8a (patch)
treec0d6f1c5ddb2b9f0144c449c50d4fde047bf7b37 /src/mongo/db/catalog/index_builds_manager.h
parent28186581b3fddfc8d24d47a22e15aa05e0881e89 (diff)
downloadmongo-cadb990e1ac4229bcf419f47c82656b6458faf8a.tar.gz
SERVER-51008 Enable resuming index builds in the drain writes phase for rollback
Diffstat (limited to 'src/mongo/db/catalog/index_builds_manager.h')
-rw-r--r--src/mongo/db/catalog/index_builds_manager.h37
1 files changed, 8 insertions, 29 deletions
diff --git a/src/mongo/db/catalog/index_builds_manager.h b/src/mongo/db/catalog/index_builds_manager.h
index bf731dfeb15..2f2a4d6663a 100644
--- a/src/mongo/db/catalog/index_builds_manager.h
+++ b/src/mongo/db/catalog/index_builds_manager.h
@@ -168,23 +168,16 @@ public:
* Signals the index build to be aborted without being cleaned up and returns without waiting
* for it to stop. Does nothing if the index build has already been cleared away.
*
+ * Writes the current state of the index build to disk if the specified index build is a
+ * two-phase hybrid index build and resumable index builds are supported.
+ *
* Returns true if a build existed to be signaled, as opposed to having already finished and
- * been cleared away, or not having yet started..
- */
- bool abortIndexBuildWithoutCleanupForRollback(OperationContext* opCtx,
- const CollectionPtr& collection,
- const UUID& buildUUID,
- bool isResumable);
-
- /**
- * The same as abortIndexBuildWithoutCleanupForRollback above, but additionally writes the
- * current state of the index build to disk if the specified index build is a two-phase hybrid
- * index build and resumable index builds are supported.
+ * been cleared away, or not having yet started.
*/
- bool abortIndexBuildWithoutCleanupForShutdown(OperationContext* opCtx,
- const CollectionPtr& collection,
- const UUID& buildUUID,
- bool isResumable);
+ bool abortIndexBuildWithoutCleanup(OperationContext* opCtx,
+ const CollectionPtr& collection,
+ const UUID& buildUUID,
+ bool isResumable);
/**
* Returns true if the index build supports background writes while building an index. This is
@@ -197,17 +190,6 @@ public:
*/
void verifyNoIndexBuilds_forTestOnly();
- /**
- * Returns the information to resume each resumable index build that was aborted for rollback.
- */
- std::vector<ResumeIndexInfo> getResumeInfos() const;
-
- /**
- * Clears the vector that was used to store the information to resume each resumable index
- * build after rollback.
- */
- void clearResumeInfos();
-
private:
/**
* Creates and registers a new builder in the _builders map, mapped by the provided buildUUID.
@@ -226,9 +208,6 @@ private:
// taken on and information passed to and from index builds.
std::map<UUID, std::unique_ptr<MultiIndexBlock>> _builders;
- // The information to resume each resumable index build that was aborted for rollback.
- std::vector<ResumeIndexInfo> _resumeInfos;
-
/**
* Deletes record containing duplicate keys and insert it into a local lost and found collection
* titled "local.lost_and_found.<original collection UUID>". Returns the size of the