Index side-write drain moving-denominator progress in r8.2.0
Parent: serverStatus indexBuilds metrics and index build observability · Published reference · snapshot 2026-11-02
↓ Facts as markdownall context files
Source-anchored research for Index side-write drain moving-denominator progress in r8.2.0. 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.
Problems, failure modes and limitations
- After committing a nonempty batch in r8.2.0, the drain calls progress.hit(batchSize), increments _numApplied, optionally yields when DrainYieldPolicy::kYield applies, and then calls setTotalWhileRunning(_sideWritesCounter->loadRelaxed() - appliedAtStart). Thus the total is refreshed after batch progress and any yield; the code explicitly attributes the refresh to writes arriving during a batch and warns that the meter cannot be completely accurate. (low confidence) [source]
Comparisons and alternatives
- In r8.2.0, IndexBuildInterceptor::drainWritesIntoIndex captures const int64_t appliedAtStart = _numApplied at entry and resets its CurOp progress meter total to _sideWritesCounter->load() - appliedAtStart. This subtracts records applied before this invocation, rather than continually subtracting the current _numApplied from the denominator. (low confidence) [source]
- The r8.2.0 drain meter counts side-table records for key operations rather than collection documents: batchSize advances per side-table record, and _finishSideWrite adds toInsert.size() to _sideWritesCounter with an onRollback subtraction. The release README illustrates why document-write counts differ: changing one indexed value records both deletion of the old key and insertion of the new key. The counter can also decrease on rollback; the refreshed total is not invariably increasing. (medium confidence) [source 1] [source 2]
Facts and statements
- Inference from the refreshed denominator: arrivals can lower the displayed completion fraction despite applied work increasing. The pinned README permits new keys during IX-lock draining; the 8.0 manual and Percona describe snapshot-bounded processing. Those snapshot limits do not establish a fixed denominator across successive drain batches or yields, or a whole-build ETA. Optional yielding abandons the snapshot and releases locks; a drain therefore must not be modeled as invariably processing one immutable snapshot. Percona provides procedural context, not release-specific corroboration of the denominator formula. (medium confidence) [source 1] [source 2] [source 3] [source 4]
Children
- No children recorded.