summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenety Goh <benety@mongodb.com>2021-05-26 10:36:28 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-07-20 19:36:31 +0000
commitc020cc421e71ea47281dc99a8130ad666eaa28f0 (patch)
tree396f7aec763ac6cd8f47a31257a7b688644966df
parenta01bd3475af76d65f1b2aadff970120774d7f2ab (diff)
downloadmongo-c020cc421e71ea47281dc99a8130ad666eaa28f0.tar.gz
SERVER-56424 index build fasserts when system runs out of disk space
(cherry picked from commit 46cd6f9251a1595e640fcdb1788329e520acf695)
-rw-r--r--src/mongo/db/index_builds_coordinator.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mongo/db/index_builds_coordinator.cpp b/src/mongo/db/index_builds_coordinator.cpp
index 312be2202c5..ecfafbcf168 100644
--- a/src/mongo/db/index_builds_coordinator.cpp
+++ b/src/mongo/db/index_builds_coordinator.cpp
@@ -2122,6 +2122,12 @@ void IndexBuildsCoordinator::_runIndexBuildInner(OperationContext* opCtx,
// Index builds only check index constraints when committing. If an error occurs at that point,
// then the build is cleaned up while still holding the appropriate locks. The only errors that
// we cannot anticipate are user interrupts and shutdown errors.
+ if (status == ErrorCodes::OutOfDiskSpace) {
+ LOGV2_ERROR(5642401,
+ "Index build unable to proceed due to insufficient disk space",
+ "error"_attr = status);
+ fassertFailedNoTrace(5642402);
+ }
invariant(status.isA<ErrorCategory::Interruption>() ||
status.isA<ErrorCategory::ShutdownError>(),
str::stream() << "Unnexpected error code during index build cleanup: " << status);