Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Find new memory pages when node drops disk #833

Closed
wants to merge 1 commit into from

Conversation

yingchunliu-zte
Copy link

When the system is powered off and reset, containerd experiences a panic:
panic: freepages: failed to get all reachable pages (key[0]=(hex)** on leaf page(1229) needs to be < than key of the next element in ancestor(hex)**. Pages stack: [1974,1229])

Every time a commit is made, the essence is that all nodes on the paths involved in the operation (from tree roots to tree leaves) will drop to the disk. If a new memory page is always found when dropping to the disk, and a conflict occurs due to power failure, the tree roots in the two metas must be healthy because the commit drops to the new memory page.

The node involved in the commit operation collects the original pgid and calls tx.db.freelist after the commit Free。

This always allows for the recovery of database files (./bbolt surgery revise meta page) through meta pages.

Signed-off-by: yingchunliu-zte <liu.yingchun@zte.com.cn>
@k8s-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: yingchunliu-zte
Once this PR has been reviewed and has the lgtm label, please assign serathius for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@yingchunliu-zte
Copy link
Author

When the system is powered off and reset, containerd experiences a panic: panic: freepages: failed to get all reachable pages (key[0]=(hex)** on leaf page(1229) needs to be < than key of the next element in ancestor(hex)**. Pages stack: [1974,1229])

Every time a commit is made, the essence is that all nodes on the paths involved in the operation (from tree roots to tree leaves) will drop to the disk. If a new memory page is always found when dropping to the disk, and a conflict occurs due to power failure, the tree roots in the two metas must be healthy because the commit drops to the new memory page.

The node involved in the commit operation collects the original pgid and calls tx.db.freelist after the commit Free。

This always allows for the recovery of database files (./bbolt surgery revise meta page) through meta pages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

2 participants