Add optional h (document hash) sub-field to SingleOpSizeMetadata

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 add the h field alongside the existing sz field in the m size-metadata oplog sub-document created from the Replicated Size and Count project (SPM-4163).
      This ticket only adds the field to the oplog entry. Nothing should produce or read h yet.

      m (cpp name sizeMetadata) is an optional oplog-entry field whose value is a variant: a SingleOpSizeMetadata for a single insert/update/delete, or an array<MultiOpSizeMetadata> for commitTransaction.

      Add h to SingleOpSizeMetadata only so it lands on i/u/d entries (and transaction inner ops, which use the same struct).

      h must be optional. This is because m can legitimately carry sz without h (older binaries, feature-off, FCV downgrade, unsupported collections), and a required field would fail to parse those entries.

      Acceptance criteria

      • h added to SingleOpSizeMetadata as optional: true, as a int32 safeInt.
      • Round-trip test: a SingleOpSizeMetadata with only __ sz (no h) parses without error (this may exist).
      • Round-trip test: one with both sz and h serializes and parses back equal.
      • No producer or consumer wired
      • Marked downstream-impacting; tools team notified per the Downstream Impact process.

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

              Created:
              Updated: