-
Notifications
You must be signed in to change notification settings - Fork 32
Define SnapshotManager #1643
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
Define SnapshotManager #1643
Conversation
80421ad
to
7f77886
Compare
I plan on merging this as a PR stack:
This is a graph of the dependencies of the PRs
|
7f77886
to
8aa430b
Compare
8aa430b
to
9fca513
Compare
9fca513
to
bafbd1c
Compare
bafbd1c
to
6748c08
Compare
6748c08
to
bcc5b88
Compare
bcc5b88
to
26f08d1
Compare
4f208b3
to
c465594
Compare
26f08d1
to
3269dc7
Compare
Different LedgerDB backends will manage snapshots in different ways. In particular, before LSM trees each snapshot was fully contained in a directory in the ledger folder of the ChainDB. However LSM trees store part of the snapshot in the LSM database, which might be somewhere else. The SnapshotManagement record of functions provide a common interface for managing the snapshots.
c465594
to
1c31aeb
Compare
3269dc7
to
66c3d48
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like a sensible refactoring, I do not see anything that does not look right 👍
, deleteSnapshot :: DiskSnapshot -> m () | ||
, takeSnapshot :: | ||
Maybe String -> | ||
-- \^ The (possibly empty) suffix for the snapshot name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: fourmolu does not like the invalid haddock here. Consider converting -- \^
to --
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I thought to keep it like this to convey the message of "I would like this to be a haddock but it can't so read it as if it was a haddock please". What do you think?
No description provided.