-
Notifications
You must be signed in to change notification settings - Fork 18
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
Migrate storage implementations to Appender lifecycle model #482
Conversation
6a6e039
to
6f7861d
Compare
lifecycle.go
Outdated
// NewCPFunc is the signature of a function which knows how to format and sign checkpoints. | ||
type NewCPFunc func(size uint64, hash []byte) ([]byte, error) | ||
|
||
// ParseCPFunc is the signature of a function which knows how to verify and parse checkpoints. | ||
type ParseCPFunc func(raw []byte) (*f_log.Checkpoint, error) | ||
|
||
// EntriesPathFunc is the signature of a function which knows how to format entry bundle paths. | ||
type EntriesPathFunc func(n uint64, p uint8) string | ||
|
||
// AppendOptions holds optional settings for all storage implementations. | ||
type AppendOptions struct { |
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.
I'm not immediately convinced that all of these need to be publicly exposed from the API?
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.
I've removed the func types for now, we can figure out whether/how to reintroduce in a less polluting way later on.
AppendOptions
needs to be exported so that storage impls can accept it, but again I think we can return to this and see if there's a better way/place - the primary goal of this PR is just to get us over the mark of broadly adopting the lifecycle API changes as it's blocking other work.
adced4d
to
c103690
Compare
921ded2
to
467967e
Compare
467967e
to
58ee74a
Compare
58ee74a
to
1587d48
Compare
1587d48
to
2f32046
Compare
This PR moves all the of the storage implementations fully over to the lifecycle model introduced in #433.
The functionality related to managing an append-only log, which was previously present on the drivers themselves, is moved to a new
Appender
type. While there have been a few small refactors and tweaks to make the transition easier/cleaner, no functional changes in the way each of the drivers manages append-only logs is intended.StorageOptions
functionality has been moved intotessera
and merged with the newappendOptions
struct introduced in #443.Towards #471 #472 #473 #474