-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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
Refactor and unify blob file saving and the logic that finds the oldest live blob file #9122
Refactor and unify blob file saving and the logic that finds the oldest live blob file #9122
Conversation
…linked SSTs logic
… of MutableBlobFileMetaData
@ltamasi has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
@ltamasi has updated the pull request. You must reimport the pull request before landing. |
@ltamasi has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
@ltamasi has updated the pull request. You must reimport the pull request before landing. |
@ltamasi has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
@ltamasi has updated the pull request. You must reimport the pull request before landing. |
@ltamasi has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
@ltamasi has updated the pull request. You must reimport the pull request before landing. |
@ltamasi has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
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.
LGTM.
db/version_builder.cc
Outdated
|
||
// Add the blob file specified by meta to *vstorage if it is determined to | ||
// contain valid data (blobs). | ||
template <typename T> |
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: maybe use a more informative type name than T
?
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.
Sure. Will follow the rebranding process and change it to Meta
:)
… template parameters
@ltamasi has updated the pull request. You must reimport the pull request before landing. |
@ltamasi has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
Summary:
The patch refactors and unifies the logic in
VersionBuilder::SaveBlobFilesTo
and
VersionBuilder::GetMinOldestBlobFileNumber
by introducing a generichelper that can "merge" the list of
BlobFileMetaData
in the base version withthe list of
MutableBlobFileMetaData
representing the updated state afterapplying a sequence of
VersionEdit
s. This serves as groundwork for subsequentchanges that will enable us to determine whether a blob file is live after applying
a sequence of edits without calling
VersionBuilder::SaveTo
.Test Plan:
make check