Primary-driven index builds (spill to a replicated table)
Parent: Index build resource limits (maxNumActiveUserIndexBuilds, disk space) · Published reference · snapshot 2026-10-23 · skill mongodb-cohort-7cd1c9c93f1a-pending
↓ Facts as markdownall context files
Source-anchored research for Primary-driven index builds (spill to a replicated table). Run status: COMPLETED.
These notes link each claim to its source. Some citations identify archived research reports that are no longer hosted on this site. A published reference means the content is available; it does not certify independent review or accuracy.Read the editorial policy and follow the sources before relying on a claim.
Measurements and reference values
- SERVER-132662 asks engineers to measure foreground-throughput impact against build duration when choosing scan/load throttles. Its 1.5x build-duration target is a goal, not a reported benchmark result. (low confidence) (verified as of 2026-08-04) [source]
Problems, failure modes and limitations
- SERVER-112247 records historical test-coverage loss because step-up aborted builds with InterruptedDueToReplStateChange. Later coordinator code includes conditional resumption, so the historical ticket cannot establish universal present-day failover behavior. (medium confidence) (verified as of 2026-10-20) [source]
Comparisons and alternatives
- Primary-driven builds generate the index on the primary and replicate internal writes with ci/cd oplog entries; secondaries apply those entries instead of independently scanning and sorting. (low confidence) [source]
- SERVER-131721 reports scan-phase tests producing many single-key ci entries after initially batched applyOps, potentially wasting oplog space. The ticket was resolved as Gone away, rather than documenting a quantified performance fix. (low confidence) (verified as of 2026-09-04) [source]
- Step-up resumption is conditional: coordinator code checks the resumability flag, build ident and pending interceptors. If resumption does not succeed, it aborts the build rather than unconditionally continuing it. (high confidence) (verified as of 2026-10-20) [source]
Facts and statements
- Primary-driven builds spill sorted keys into a replicated storage-engine table. Conventional two-phase builds use local, unreplicated temporary sorter files; both paths use the bulk builder. (low confidence) [source]
- Commit quorum does not apply to primary-driven builds; startIndexBuild and commitIndexBuild or abortIndexBuild entries still delimit the build. (medium confidence) [source]
- The implementation documents resumption after failover or primary restart across scan, load and drain phases. If resumption fails, it aborts the build. (medium confidence) (verified as of 2026-10-20) [source]
- With n indexes being built, a collection write plus its n side writes must replicate atomically to preserve consistency between the collection and indexes. (low confidence) [source]
- In the master source snapshot fetched on 2026-10-20, featureFlagPrimaryDrivenIndexBuilds and featureFlagResumablePrimaryDrivenIndexBuilds both default to false and are FCV-gated. This snapshot does not establish Atlas deployment availability. (low confidence) (verified as of 2026-10-20) [source]
- SERVER-127648 records a historical race: cleanup delayed past re-election could self-abort a build and destroy its catalog entry. It was closed as a duplicate of SERVER-127769; this is not evidence of an unresolved production defect. (low confidence) (verified as of 2026-06-02) [source]
- The implementation describes primary-only build execution: secondaries apply internal ci/cd oplog writes, with startIndexBuild and commitIndexBuild/abortIndexBuild boundaries. Primary-driven builds do not use the two-phase commit quorum model. (low confidence) [source]
- Resumption metadata covers scan, load and drain phases. Scan spills persist sorter ranges, loading periodically saves iterator positions, and entering drain saves the phase state. (low confidence) [source]
- Collection writes and associated index side writes must be applied atomically. The README describes n+1 operations for n indexes under construction; the sharding investigation explains why grouped writes must preserve the required timestamp behavior. (medium confidence) [source]
- In the inspected source snapshot, featureFlagPrimaryDrivenIndexBuilds, featureFlagResumablePrimaryDrivenIndexBuilds and featureFlagContainerWrites each default to false and are FCV-gated. These definitions do not establish Atlas enablement. (low confidence) (verified as of 2026-10-20) [source]
- The baseline being changed is simultaneous per-node building: Percona's July 2022 walkthrough describes builds on all data-bearing members, while MongoDB's implementation README explains their independent collection scans. (medium confidence) [source]
Children
- No children recorded.