Compute and set the document hash (h) on the primary for insert oplog entries

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Storage Execution
    • Storage Execution 2026-06-22
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Context

      We need to compute the document hash on the primary and populate the h field on the insert oplog entry during steady-state replication. SERVER-128506 only produces h on the primary.

      The hash is computed over the document affected by the op: the post-image for inserts and updates, and the pre-image for deletes. Use SHA-256 to start.

      Acceptance criteria

      • Inserts on the primary set m.h when the feature flag is on with a hash of the document's post-image.
      • When the feature flag is off, m.h is not set on inserts.
      • We unit-test the above two points.

            Assignee:
            Elise Zhu
            Reporter:
            Stephanie Eristoff
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: