-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
[Fix](recycler) Further fix for #47475 #47486
base: master
Are you sure you want to change the base?
Conversation
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
run buildall |
// Tmp rowsets may not be recycled in recycle_tablet correctly, | ||
// here we can not skip recycling them | ||
if (!is_recycle_tmp_rowset) { | ||
{ |
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.
redundant indention (extra curly brace)
int delete_rowset_data(const std::vector<doris::RowsetMetaCloudPB>& rowsets, | ||
bool is_recycle_tmp_rowset = 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.
Use enum class
enum class RowsetRecyclingState {
FORMAL_ROWSET,
TMP_ROWSET,
};
int delete_rowset_data(const std::vector<doris::RowsetMetaCloudPB>& rowsets,
RowsetRecyclingState type);
int delete_rowset_data(const std::vector<doris::RowsetMetaCloudPB>& rowsets, | ||
bool is_recycle_tmp_rowset = 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.
Use enum class
enum class RowsetRecyclingState {
FORMAL_ROWSET,
TMP_ROWSET,
};
int delete_rowset_data(const std::vector<doris::RowsetMetaCloudPB>& rowsets,
RowsetRecyclingState type);
int delete_rowset_data(const std::vector<doris::RowsetMetaCloudPB>& rowsets, | ||
bool is_recycle_tmp_rowset = 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.
Use enum class
enum class RowsetRecyclingState {
FORMAL_ROWSET,
TMP_ROWSET,
};
int delete_rowset_data(const std::vector<doris::RowsetMetaCloudPB>& rowsets,
RowsetRecyclingState type);
// Tmp rowsets may not be recycled in recycle_tablet correctly, | ||
// here we can not skip recycling them |
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.
// Tmp rowsets may not be recycled in recycle_tablet correctly, | |
// here we can not skip recycling them | |
// we have to treat tmp rowset as "orphans" that may not related to any existing tablets | |
// due to aborted schema change. |
@@ -1499,7 +1504,7 @@ int InstanceRecycler::delete_rowset_data(const std::vector<doris::RowsetMetaClou | |||
std::vector<std::pair<int64_t, std::string>> index_ids; | |||
// default format as v1. | |||
InvertedIndexStorageFormatPB index_format = InvertedIndexStorageFormatPB::V1; | |||
|
|||
int get_ret = 0; |
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.
suggested naming inverted_index_get_ret
@@ -1562,7 +1566,8 @@ int InstanceRecycler::delete_rowset_data(const std::vector<doris::RowsetMetaClou | |||
file_paths.push_back(inverted_index_path_v1(tablet_id, rowset_id, i, | |||
index_id.first, index_id.second)); | |||
} | |||
} else if (!index_ids.empty()) { | |||
} else if (!index_ids.empty() || get_ret == 1) { |
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.
add comment "we treat schema not found as if it has a v2 format inverted index to reduce chance of data leakage"
What problem does this PR solve?
Issue Number: close #xxx
Related PR: #47475
Problem Summary:
Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)