Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-84155

Add document checks for BSONColumn DocDiff application

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • None
    • Storage Execution

    Description

      This ensures the bucket document wasn't changed underneath us while generating the DocDiff from something like a direct write or synchronization bug in the BucketCatalog. This mechanism protects against data corruption.

      Rough draft of how we can achieve this:

      • When committing a WriteBatch
        • We have a Struct {anchor, preImageBytes, postImageBytes}. The bytes are after the anchor point
        • Before inserting measurements into the builders, set the anchor and preImageBytes for each data field
        • Insert measurements into the builders from the WriteBatch
        • Set the postImageBytes
      • Generate the DocDiff using the anchor as o(ffset) and postImageBytes as d(ata)
      • Pass this DocDiff into UpdateCommandRequest with preImageBytes.
        • In the query layer, we check that the current bucket document preImageBytes match after the anchor

      This is a primary only check

      Attachments

        Activity

          People

            backlog-server-execution Backlog - Storage Execution Team
            gregory.wlodarek@mongodb.com Gregory Wlodarek
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: