Skip to content

Diff Snapshotting feature does not take into account full snapshots #4543

@JonathanWoollett-Light

Description

@JonathanWoollett-Light

Description

When a diff snapshot it taken, it always contains all pages that were dirtied since either instance start, or since the last diff snapshot was taken, whichever is more recent. This is not what we document it to do 1: We say " the diff consists of the memory pages which have been dirtied since the last snapshot creation or since the creation of the microVM, whichever of these events was the most recent." Here "last snapshot creation" includes full snapshots, not just diff snapshots (and that makes sense, if I take a diff snapshot after a full snapshot, I expect the diff snapshot to be a diff compared to the full snapshot).

Acceptance Criteria

The issue arises because full snapshots do not reset the KVM or Firecracker dirty log. Therefore to fix this, we need to clear them on the "take full snapshot" path. This should happen only after the snapshot was successfully written to disk.

Footnotes

  1. https://github.com/firecracker-microvm/firecracker/blob/main/docs/snapshotting/snapshot-support.md#creating-diff-snapshots

Metadata

Metadata

Assignees

No one assigned

    Labels

    Good first issueIndicates a good issue for first-time contributors

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions