feat(mongodb): set indexBuildMinAvailableDiskSpaceMB to 10 GiB#2436
Open
delthas wants to merge 1 commit into
Open
feat(mongodb): set indexBuildMinAvailableDiskSpaceMB to 10 GiB#2436delthas wants to merge 1 commit into
delthas wants to merge 1 commit into
Conversation
Contributor
Hello delthas,My role is to assist you with the merge of this Available options
Available commands
Status report is not available. |
Contributor
Waiting for approvalThe following approvals are needed before I can proceed with the merge:
|
mongod refuses to start new index builds and kills in-flight ones when free disk on the data volume drops below this threshold. The default (500 MB) only stops a runaway lifecycle index build once the volume is nearly full, leaving almost no headroom for regular writes; raise the threshold to 10 GiB so builds are stopped well before the disk gets critically full. Applied to config servers and shard data servers; mongos and arbiters host no data and build no indexes, so they are left untouched. The flag is appended next to the MONGODB_SHARDSERVER_EXTRA_FLAGS placeholder, which consumers substitute with plain string replacement, so the substitution keeps working unchanged. Supersedes the installer-side implementation from scality/artesca#5228 (ARTESCA-17683). Issue: ZENKO-5295
68d15dd to
9b1875b
Compare
francoisferrand
approved these changes
Jun 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add
--setParameter indexBuildMinAvailableDiskSpaceMB=10000(10 GiB) to the mongod startup flags of config servers and shard data servers in the renderedmongodb-shardedmanifests (solution-base/build.sh).The MongoDB default (500 MB) is far below the transient disk peak of a real lifecycle index build — spill files plus the partial index B-tree can transiently use tens of GB on a 100M-document bucket. With this parameter (7.1+ semantics; we ship MongoDB 8.0.13) raised to 10 GiB, mongod refuses to start new index builds and kills in-flight ones while the volume still has comfortable headroom, rather than at the last 500 MB.
This supersedes the Artesca installer-side implementation from scality/artesca#5228 (ARTESCA-17683): per review feedback there, this is purely MongoDB behavior and belongs in zenko-base, where every consumer of the rendered manifests benefits.
Implementation notes
mongodbExtraFlagslist item: next to the existingrollbackTimeLimitSecs=259200constant on configsvr, and next to theMONGODB_SHARDSERVER_EXTRA_FLAGSplaceholder on shardsvr. Consumers substitute that placeholder with plain string replacement (Artescaread_manifest, CIsed), so a partial-value placeholder keeps working unchanged.deploy/mongodb-sharded-*.yamlagainstdevelopment/2.15: the only changes are the 59 expectedMONGODB_EXTRA_FLAGSvalues (13 configsvr + 46 shard-data StatefulSets across the 13 topology files), e.g.:Related
putBucketIndexesFailedmetric on the failure pathIssue: ZENKO-5295