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

Skip creating a checkpoint if there have been no changes

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • WT2.9.0, 3.2.11, 3.4.0-rc1
    • Affects Version/s: None
    • Component/s: None
    • None

      At the moment we always review all handles when a checkpoint is started. That can be disruptive if there are a lot of tables, and is not necessary for read-only workloads. We could skip the handle gathering phase if we knew that there haven't been changes since the last checkpoint.

      The mechanism Could be:

      • The connection is marked as clean on open.
      • The connection is marked as clean as soon as the transaction ID is allocated for a checkpoint.
      • If the checkpoint fails with an error the connection is marked as dirty.
      • Any time a btree is currently marked as dirty the connection is also marked as dirty.

      Once those markers are in place a full non-forced checkpoint could skip creating a new checkpoint if the connection is clean.

      It'd also be worthwhile to add assertions to validate the scheme. Maybe sweep could ensure that the connection is dirty any time it encounters a dirty btree handle.

        1. graph.png
          546 kB
          Sulabh Mahajan

            Assignee:
            sulabh.mahajan@mongodb.com Sulabh Mahajan
            Reporter:
            alexander.gorrod@mongodb.com Alexander Gorrod
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: