diff --git a/be/src/index-tools/index_tool.cpp b/be/src/index-tools/index_tool.cpp index 62593c1178..32ed178e36 100644 --- a/be/src/index-tools/index_tool.cpp +++ b/be/src/index-tools/index_tool.cpp @@ -76,7 +76,7 @@ DEFINE_string(pred_type, "", "inverted index term query predicate, eq/lt/gt/le/g DEFINE_bool(print_row_id, false, "print row id when query terms"); DEFINE_bool(print_doc_id, false, "print doc id when check terms stats"); // only for debug index compaction -DEFINE_int32(idx_id, -1, "inverted index id"); +DEFINE_int64(idx_id, -1, "inverted index id"); DEFINE_string(src_idx_dirs_file, "", "source segment index files"); DEFINE_string(dest_idx_dirs_file, "", "destination segment index files"); DEFINE_string(dest_seg_num_rows_file, "", "destination segment number of rows"); @@ -406,7 +406,7 @@ int main(int argc, char** argv) { return true; }; - int32_t index_id = FLAGS_idx_id; + int64_t index_id = FLAGS_idx_id; std::string tablet_path = FLAGS_tablet_path; std::string src_index_dirs_string; std::string dest_index_dirs_string; diff --git a/be/src/olap/rowset/rowset_writer_context.h b/be/src/olap/rowset/rowset_writer_context.h index 89147aca04..54be9f9597 100644 --- a/be/src/olap/rowset/rowset_writer_context.h +++ b/be/src/olap/rowset/rowset_writer_context.h @@ -89,6 +89,7 @@ struct RowsetWriterContext { int64_t newest_write_timestamp = -1; bool enable_unique_key_merge_on_write = false; + // store column_unique_id to skip write inverted index std::set skip_inverted_index; DataWriteType write_type = DataWriteType::TYPE_DEFAULT; BaseTabletSPtr tablet = nullptr; diff --git a/be/src/olap/rowset/segment_v2/inverted_index_desc.cpp b/be/src/olap/rowset/segment_v2/inverted_index_desc.cpp index 1544d18ed7..1761f8f39d 100644 --- a/be/src/olap/rowset/segment_v2/inverted_index_desc.cpp +++ b/be/src/olap/rowset/segment_v2/inverted_index_desc.cpp @@ -28,14 +28,14 @@ const std::string InvertedIndexDescriptor::index_suffix = ".idx"; const std::string InvertedIndexDescriptor::index_name_separator = "_"; std::string InvertedIndexDescriptor::get_temporary_index_path( - const std::string& segment_path, uint32_t uuid, const std::string& index_suffix_path) { + const std::string& segment_path, uint64_t uuid, const std::string& index_suffix_path) { std::string suffix = index_suffix_path.empty() ? "" : "@" + index_suffix_path; return StripSuffixString(segment_path, segment_suffix) + index_name_separator + std::to_string(uuid) + suffix; } std::string InvertedIndexDescriptor::get_index_file_name(const std::string& segment_path, - uint32_t uuid, + uint64_t uuid, const std::string& index_suffix_path) { std::string suffix = index_suffix_path.empty() ? "" : "@" + index_suffix_path; return StripSuffixString(segment_path, segment_suffix) + index_name_separator + diff --git a/be/src/olap/rowset/segment_v2/inverted_index_desc.h b/be/src/olap/rowset/segment_v2/inverted_index_desc.h index 5d86e7ddd3..0f9d591be6 100644 --- a/be/src/olap/rowset/segment_v2/inverted_index_desc.h +++ b/be/src/olap/rowset/segment_v2/inverted_index_desc.h @@ -31,9 +31,9 @@ public: static const std::string segment_suffix; static const std::string index_suffix; static const std::string index_name_separator; - static std::string get_temporary_index_path(const std::string& segment_path, uint32_t uuid, + static std::string get_temporary_index_path(const std::string& segment_path, uint64_t uuid, const std::string& index_suffix_path); - static std::string get_index_file_name(const std::string& path, uint32_t uuid, + static std::string get_index_file_name(const std::string& path, uint64_t uuid, const std::string& index_suffix_path); static std::string get_index_file_name(const std::string& path); static const std::string get_temporary_null_bitmap_file_name() { return "null_bitmap"; } diff --git a/be/src/olap/rowset/segment_v2/inverted_index_reader.h b/be/src/olap/rowset/segment_v2/inverted_index_reader.h index bf56d31a2d..f5cb43c43f 100644 --- a/be/src/olap/rowset/segment_v2/inverted_index_reader.h +++ b/be/src/olap/rowset/segment_v2/inverted_index_reader.h @@ -98,7 +98,7 @@ public: virtual InvertedIndexReaderType type() = 0; - [[nodiscard]] uint32_t get_index_id() const { return _index_meta.index_id(); } + [[nodiscard]] uint64_t get_index_id() const { return _index_meta.index_id(); } [[nodiscard]] const std::map& get_index_properties() const { return _index_meta.properties();