-
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, re-read the document by RID, recompute its hash and size, and compare against the primary's m.h and m.sz.
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 m.h is present. We may want to add a helper for checking these conditions.
Acceptance criteria
- After applying an insert on a non-primary, the document is fetched by RID; its hash (SHA-256) and size are computed and compared against m.h/m.sz.
- 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/delete handling.
- Unit-test!
- related to
-
SERVER-128533 Verify document hash (h) and document size (sz) for deletes on non-primaries
-
- Backlog
-