0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 09:32:32 +01:00

SERVER-56424 index build fasserts when system runs out of disk space

This commit is contained in:
Benety Goh 2021-05-26 10:36:28 -04:00 committed by Evergreen Agent
parent 01f22c5f20
commit 46cd6f9251

View File

@ -2155,6 +2155,12 @@ void IndexBuildsCoordinator::_runIndexBuildInner(
// Index builds only check index constraints when committing. If an error occurs at that point, // 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 // 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. // 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>() || invariant(status.isA<ErrorCategory::Interruption>() ||
status.isA<ErrorCategory::ShutdownError>(), status.isA<ErrorCategory::ShutdownError>(),
str::stream() << "Unexpected error code during index build cleanup: " << status); str::stream() << "Unexpected error code during index build cleanup: " << status);