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

Change to identify read-only objects.

    • Type: Icon: Task Task
    • Resolution: Done
    • WT1.3
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None

      Add an "was object ever modified" flag to the btree handle, and use it to avoid writing read-only objects during internal checkpoints, issue WT-272.

      Michael, the problem in WT-272 was I was talking about writing the data file itself and didn't realize you were talking about writing the schema file (and, because the schema file was written, the turtle file).

      What's happening here is we're creating dirty files because that's what we want to reconcile, and we're checkpointing empty files because they're dirty. This is a little tricky, because we have to checkpoint these files if the checkpoint is named, it's only if it's a close or an internal checkpoint that we don't have to do any work.

      This is actually a performance change, because it allows us to ignore read-only objects during internal checkpoints, that is, unless there's a reason to checkpoint an unmodified object, we can skip walking it just to figure out that there aren't any dirty pages.

      Here's a fix for your review. I'll add a few comments into the diff to flag the interesting parts.

            Assignee:
            michael.cahill@mongodb.com Michael Cahill (Inactive)
            Reporter:
            keith.bostic@mongodb.com Keith Bostic (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: