From c020cc421e71ea47281dc99a8130ad666eaa28f0 Mon Sep 17 00:00:00 2001 From: Benety Goh Date: Wed, 26 May 2021 10:36:28 -0400 Subject: SERVER-56424 index build fasserts when system runs out of disk space (cherry picked from commit 46cd6f9251a1595e640fcdb1788329e520acf695) --- src/mongo/db/index_builds_coordinator.cpp | 6 ++++++ 1 file changed, 6 insertions(+) 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() || status.isA(), str::stream() << "Unnexpected error code during index build cleanup: " << status); -- cgit v1.2.1