Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-6339

Stop creating snapshots for history store cursors

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • WT10.0.0, 4.4.0-rc9, 4.7.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • 5
    • Storage - Ra 2020-06-15

      I noticed while doing some diagnostic work that we are allocating and freeing a lot of transaction snapshots on history store cursors. Specifically when a history store cursor goes through cursor_func_init, which is pretty much any data access or modification cursor API a snapshot will be allocated if we don't already have one (it will subsequently be released when that operation finishes). For internal sessions, we don't generally have a snapshot pre-allocated.

      History store cursors don't expect to be using a snapshot - so this could cause some visibility issues, and is definitely causing contention since we can allocate a lot of snapshots, especially during some reconciliation calls.

      We can probably set the WT_CBT_NO_TXN flag on history store cursors, but need to be careful and check whether that has consequences for cursor caching as well.

        1. t2_stats_develop.png
          t2_stats_develop.png
          63 kB
        2. t2_stats_after_change.png
          t2_stats_after_change.png
          70 kB

            Assignee:
            ravi.giri@mongodb.com Ravi Giri
            Reporter:
            alexander.gorrod@mongodb.com Alexander Gorrod
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: