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

Use truncate to delete the whole content of a btree in the history store

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.1.0-rc0, WT11.1.0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • 8
    • Storage Engines - 2022-08-08

      Summary
      RTS removes all the historical versions of a non-timestamp table as part of the rollback to stable operation. Sometimes this process of removing the historical versions can take a longer time whenever the history store table size is very big as it uses cursor->remove to remove the entries.

      Instead of using the cursor remove, using session truncate to fast truncate the entire range of the btree in the history store can improve the performance.

      Motivation

      • Does this affect any team outside of WT?
        Yes.
      • (Are they blocked? Are they waiting for an answer?)
        NO.
      • How likely is it that this use case or problem will occur?
        Edge case where the history store table size is very big.
      • If the problem does occur, what are the consequences and how severe are they?
        Long recovery time.
      • Is this issue urgent?
        NO.

      Acceptance Criteria (Definition of Done)
      The RTS HS truncate should be faster when the HS size is big.

            Assignee:
            chenhao.qu@mongodb.com Chenhao Qu
            Reporter:
            haribabu.kommi@mongodb.com Haribabu Kommi
            Votes:
            0 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved: