Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In parallel with process of writing pages to disk, some thread may want to update data in the page being written (or scheduled to being written).

For such case Checkpoint pool is used for pages being updated in parallel with write. This pool has limitation.

Copy on write technique is used. If there is modification required in page which is under checkpoint now checkpoint, we will create temporary copy of this page in checkpoint pool.Image Removed

If page

  • was not involved into checkpoint,
  • but updated concurrenly with checkpointing process:

...


Image Added

To perform write to a dirty page scheduled to be checkpointed followin is done:

  • write lock is acquired to page to protect from inconsistent changes,
  • then full copy of page is created in checkpoint pool (CP pool is latest chunk of durable memory segment),
  • actual data is written to regular chunk after copy is created,
  • and later copy of page from the CP pool will be written to disk.

If page was not involved into checkpoint initially, and is updated concurrenly with checkpointing process:

  •  it is updated directly in memory bypassing checkpoint pool.
  • actual data will be stored to disk during next checkpoint.

If When dirty page was already flushed to disk, dirty flag is cleared. Every future write to such page (which was initially involved into checkpoint, but was flushed) does not require checkpoint pool usage, it is written dirrectly in segment.

...