-
Notifications
You must be signed in to change notification settings - Fork 412
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
[FLASH-530] Reclaim obsolete meta file in PageStorage #369
[FLASH-530] Reclaim obsolete meta file in PageStorage #369
Conversation
@@ -17,7 +18,7 @@ extern const int LOGICAL_ERROR; | |||
} // namespace ErrorCodes | |||
|
|||
std::set<PageFile, PageFile::Comparator> | |||
PageStorage::listAllPageFiles(const String & storage_path, bool remove_tmp_file, bool ignore_legacy, Logger * page_file_log) | |||
PageStorage::listAllPageFiles(const String & storage_path, Poco::Logger * page_file_log, ListPageFilesOption option) |
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.
Please add some tests for this function.
dbms/src/Storages/Page/PageStorage.h
Outdated
listAllPageFiles(const String & storage_path, bool remove_tmp_file, bool ignore_legacy, Poco::Logger * page_file_log); | ||
listAllPageFiles(const String & storage_path, Poco::Logger * page_file_log, ListPageFilesOption option = ListPageFilesOption()); | ||
|
||
static std::optional<PageFile> tryGetLastSnapshot(const String & storage_path, Poco::Logger * page_file_log, bool remove_old = false); |
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.
tryGetLastSnapshot
here is easily confuse with getSnapshot
, maybe Checkpoint
for PageFile is better?
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.
And also replace these "snapshot" with "checkpoint".
PageFile::Type::Snapshot
, PageFile::folder_prefix_snapshot
, PageStorage::ListPageFilesOption::ignore_snapshot
Signed-off-by: leiysky <leiysky@outlook.com>
Signed-off-by: leiysky <leiysky@outlook.com>
Signed-off-by: JaySon-Huang <jayson.hjs@gmail.com>
Signed-off-by: JaySon-Huang <jayson.hjs@gmail.com>
/run-integration-tests |
3 similar comments
/run-integration-tests |
/run-integration-tests |
/run-integration-tests |
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
We can safely remove neighbouring meta files if they are both legacy.