-
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
Context
On non-primaries, verify insert oplog entries: after applying the insert, compare h and the hashed o.
On a mismatch, fassert with a stack crash until we have different modes for handling a mismatch.
Runs only on non-primaries (OplogApplication::Mode::kSecondary), with the feature flag on, for supported collections. We may want to add a helper for checking these conditions.
Acceptance criteria
- After applying an insert on a non-primary we compare the h value and the hashed o field.
- On mismatch, fassert and crash.
- Skipped on the primary, when the feature flag is off, on unsupported collections, and when h is absent.
- No update/delete handling (done in SERVER-128585 and SERVER-128533 respectively)
- Unit-test!
- Round-trip / happy path: The recomputed h and size match the primary's h and no mismatch is reported.
- Mismatch detected: when h diverges, the comparison reports a mismatch.
- Without the feature flag or without h, we don't perform the check.
- Non-steady-state modes (initial sync, recovering) neither generate nor compare h.
- Unsupported collections are skipped.
- Any helper functions that we use that can be unit tested are also unit-tested.
- is related to
-
SERVER-128585 Verify document hash (h) for updates on non-primaries
-
- Backlog
-
- related to
-
SERVER-128533 Verify document hash (h) for deletes on non-primaries
-
- Backlog
-
-
SERVER-128507 Compute and set the document hash (h) on the primary for insert oplog entries
-
- In Code Review
-