-
Type:
Improvement
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Storage Execution
-
None
-
None
-
None
-
None
-
None
-
None
-
None
The interceptor-timestamp setup in IndexBuildsCoordinator::_setUpIndexBuildInner
(src/mongo/db/index_builds/index_builds_coordinator.cpp, currently around thereplState->setLastOpTimeBeforeInterceptors(...) call) belongs to the hybrid two-phase resume mechanism.
Now that SPM-4469 (PDIB) introduces a second, independent resume path based on replicated container writes, the current shape of this code is misleading and brittle: a single try-block guarded by isIndexBuildResumable mixes a hybrid-specific side effect (recording the last opTime before interceptors) with logic that conceptually applies to "any resumable build."
We should restructure this so the interceptor-timestamp work is explicitly isolated to
the hybrid path, and PDIB resumability is wired up via its own clearly-named branch.
isIndexBuildResumable(opCtx, replState, options) is the setup-time gate. It already returns false for everything that is not kTwoPhase, so today PDIB silently falls out of this branch. We can just rename this to make it more distinct.