Investigate memory usage implication of using updateWithDamages()

XMLWordPrintableJSON

    • Storage Execution
    • Storage Execution 2025-09-29
    • None
    • 3
    • TBD
    • None
    • None
    • None
    • None
    • None
    • None

      WiredTiger provides the interface to perform updates with diffs which get appended to a chain besides updating with the full document. While this reduces memory footprint during the update, when the record's latest version needs to be read, the reader needs to allocate memory and materialize the post-images using the last known full document and the diffs. Although the full document and diffs are tracked through the WiredTiger cache, the memory used to materialize the post-image is not tracked and can grow unbounded with the increase of number of readers.

      For this ticket, write a reproducer to demonstrate that finding a document that is stored as a base record and a chain of WT_UPDATEs (caused by updateWithDamages()) allocates memory on the heap local to the thread. And running lots of these operations concurrently can cause a spike of memory usage on top of the WT cache.

            Assignee:
            Ernesto Rodriguez Reina
            Reporter:
            Yuhong Zhang
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated: