gavinchou commented on code in PR #53876:
URL: https://github.com/apache/doris/pull/53876#discussion_r2234770683
##########
cloud/src/recycler/checker.cpp:
##########
@@ -1243,6 +1234,200 @@ int InstanceChecker::get_pending_delete_bitmap_keys(
return 0;
}
+int InstanceChecker::check_inverted_index_file_storage_format_v1(
+ int64_t tablet_id, const std::string& file_path, const std::string&
rowset_info,
+ RowsetIndexesFormatV1& rowset_index_cache_v1) {
+ // format v1:
data/{tablet_id}/{rowset_id}_{seg_num}_{idx_id}{idx_suffix}.idx
+ int64_t rowset_id, segment_id;
+ std::string index_id_with_suffix_name;
+ // {rowset_id}_{seg_num}_{idx_id}{idx_suffix}.idx
+ std::vector<std::string> str;
+ butil::SplitString(rowset_info.substr(0, rowset_info.size() - 4), '_',
&str);
+ if (str.size() < 3) {
+ LOG(WARNING) << "Split rowset info with '_' error, str size < 3,
rowset_info = "
+ << rowset_info;
+ return -1;
+ }
+ rowset_id = std::atoll(str[0].c_str());
Review Comment:
rowset_id is string not integer, this is incorrect
##########
cloud/src/recycler/checker.h:
##########
@@ -114,6 +114,18 @@ class InstanceChecker {
void stop() { stopped_.store(true, std::memory_order_release); }
bool stopped() const { return stopped_.load(std::memory_order_acquire); }
+private:
+ struct RowsetIndexesFormatV1 {
+ int64_t rowset_id {0};
+ std::unordered_set<int64_t> segment_ids;
+ std::unordered_set<std::string> index_ids;
+ };
+
+ struct RowsetIndexesFormatV2 {
+ int64_t rowset_id {0};
Review Comment:
ditto
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]