-
Type:
Task
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Storage Execution
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Make logical initial sync the join procedure for set-wide Replicated RecordIds : a node initial-syncing from an in-group source ends the sync holding the source's groupId, with its data in the group's rid space.
Details
- New cloner stage fetching the sync source's groupId, modeled on getInitialSyncIdStage. The fetch must run after beginApplyingTs is established (fixed in InitialSyncer::_setUp before cloner stages run), so every membership change is either reflected in the fetched value or leaves its noop inside the application window where C1 catches it. Unlike the FCV precedent, a mid-window change does not fail the sync: C1 clears and the sync completes groupless.
- The cloning phase clones documents with the source's rids iff the fetched groupId is non-null (existing $meta recordId projection, now conditional). Groupless source or flag off: no projection, so flag-off deployments keep today's byte-identical behavior and non-joining syncs skip the envelope cost.
- The oplog application phase initializes rid honoring from the fetched value; C1 stays active during the window (a flap mid-clone mixes rid spaces in the cloned data, and honoring post-flap rids against it would collide).
- The node adopts the (possibly cleared) groupId durably only at completion. "Initial sync succeeded" and "joined the group" are distinct postconditions: a groupless completion is logged with its reason (groupless source vs flap at timestamp T).
Acceptance criteria
- In-group source: node adopts the groupId at completion and honors rids.
- Groupless source: node completes groupless, logs the reason.
- Flap mid-window (both cloning and application phases): node completes groupless, no rid collision.
- Test pinning the fetch-after-beginApplyingTs ordering.
- depends on
-
SERVER-138106 Mint and announce the groupId at election (new-primary noop)
-
- Open
-
-
SERVER-138110 Clear groupId on mismatched new-primary noop (C1), with batcher fence
-
- Open
-
-
SERVER-138123 Add the shared in-scope predicate for set-wide Replicated RecordIds
-
- Closed
-
- is depended on by
-
SERVER-138124 Membership-based recordId emission and honoring in the oplog path
-
- Open
-