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

storage: bootstrap manifest replay #739

Closed
yyin-dev opened this issue Dec 12, 2022 · 1 comment · Fixed by #760
Closed

storage: bootstrap manifest replay #739

yyin-dev opened this issue Dec 12, 2022 · 1 comment · Fixed by #760

Comments

@yyin-dev
Copy link
Contributor

When bootstrapping secondary storage, the manifest log is replayed to restore the internal state of VersionManager. This is done via the commit_changes call.

engine.version.commit_changes(changeset).await?;

The problem with this is that any effective AddRowset/AddDV are written to the manifest file again at bootstrap. This means that, if the database keeps crashing and coming back, the manifest will keep growing (due to the bootstrap), even if no write happens.

Under the textbook WAL setting, redo&undo phase append more logs (and those logs provide useful information). But I don't think those logs are necessary/useful for RisingLight, because it's using a much simpler logging scheme.

@skyzh
Copy link
Member

skyzh commented Dec 19, 2022

Yes! My idea is to periodically take a snapshot of the database and replace some of the manifest entries with snapshot.

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

Successfully merging a pull request may close this issue.

2 participants