Unit-test that transaction/applyOps inner ops carry the document hash (h)

XMLWordPrintableJSON

    • 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

      Add unit tests confirming that CRUD ops nested in a transaction/applyOps carry h on the primary and are verified on non-primaries, while the commitTransaction/prepareTransaction/abortTransaction command entries carry no h.

      This pattern already exists for sz. We can use some of the existing scaffolding, although something to note is that we will need to perform the checks under this projects feature flag, namely a good example is ReplicatedFastCountTxnTest::ApplyOpsOplogEntryContainsSizeDeltaMetadata. PreparedSizeMetadataTest covers the prepared transactions case.

      Acceptance criteria

      • Unprepared transaction: each inner insert/update/delete in the applyOps entry carries the expected h.
      • Prepared transaction: inner ops carry h; the commitTransaction Multi-op m carries no h.
      • commitTransaction/prepareTransaction/abortTransaction command entries carry no h.
      • Non-primary round-trip: a transaction's inner ops are re-hashed at apply and compared.

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

              Created:
              Updated: