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

Skip creating a checkpoint if there have been no changes

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: WT2.9.0, 3.2.11, 3.4.0-rc1
    • Labels:
      None

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: