-
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 delete oplog entries: before deleting, recompute the pre-image's hash and size and compare against the primary's h.
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, and only when h is present. We may want to add a helper for checking these conditions.
Acceptance criteria
- Before deleting, the in-hand pre-image is hashed (SHA-256) and its size computed, then both compared against h.
- On mismatch, fassert and crash.
- Skipped on the primary, when the feature flag is off, on unsupported collections, and when m.h is absent.
- No update/insert handling (done in SERVER-128585 and SERVER-128516 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, and entries without h, are skipped.
- Any helper functions that we use that can be unit tested are also unit-tested.
- is related to
-
SERVER-128516 Verify document hash (h) for inserts on non-primaries
-
- Backlog
-
-
SERVER-128585 Verify document hash (h) for updates on non-primaries
-
- Backlog
-