-
Type:
Task
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Replication
-
Repl 2026-11-23
-
None
-
None
-
None
-
None
-
None
-
None
-
None
All functional predicates (oplog rid emission, applier rid honoring, rid-inclusive dbhash) and the hello/replSetGetStatus reporting surface need one cheap, unified membership value. Add getEffectiveRecordIdsGroupId(opCtx) (naming TBD), returning boost::optional<{UUID, OpTime}>:
- Attached storage: the persisted marker and cached it in memory. Loaded once at startup before replication starts. Updated transactionally at every mint, every clear, and initial-sync adoption. The cache must not read storage on the hot path, emission and apply call it per op.
- Disaggregated storage: {kDisaggRecordIdsGroupIdUuid, OpTime(Timestamp(0,0), OpTime::kUninitializedTerm)} whenever
{provider.shouldUseReplicatedRecordIds()}
. Define the sentinel as a reserved constant UUID::gen() can never mint (all-zeros). This makes PersistenceProvider::shouldUseReplicatedRecordIds() collapse to a single call site (the disagg branch above).
Note the asymmetry: acquisition and clears stay provider-gated to attached storage (disagg never mints, never clears), while consumption unifies on the accessor.
Acceptance criteria
- Unit tests: attached groupless -> none; attached with marker -> marker value; disagg provider -> sentinel with (0,0) foundingOpTime.
- After startup load, the accessor performs no storage reads (assert with a storage-read counting hook or by construction review).
- Cache coherence unit test: mint/clear update the cache atomically with the underlying write.
- depends on
-
SERVER-138105 Create the RecordIds groupId consistency marker collection
-
- Closed
-
- is depended on by
-
SERVER-138106 Mint and announce the groupId at election (new-primary noop)
-
- Open
-