Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
csun5285 committed Oct 10, 2024
1 parent 4f8864b commit 72de391
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
6 changes: 6 additions & 0 deletions be/src/olap/compaction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -688,6 +688,12 @@ void Compaction::construct_skip_inverted_index(RowsetWriterContext& ctx) {
for (const auto& rowset : _input_rowsets) {
const auto* tablet_index =
rowset->tablet_schema()->get_inverted_index(col_unique_id, "");
// no inverted index
if (tablet_index == nullptr) {
ctx.skip_inverted_index.insert(col_unique_id);
is_continue = true;
break;
}
const auto& properties = tablet_index->properties();
if (!first_properties.has_value()) {
first_properties = properties;
Expand Down
14 changes: 14 additions & 0 deletions be/src/olap/rowset/segment_v2/inverted_index_file_writer.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,20 @@ class InvertedIndexFileWriter {

void set_file_writer_opts(const io::FileWriterOptions& opts) { _opts = opts; }

std::string debug_string() {
std::stringstream indices_dirs;
for (const auto& [index, dir] : _indices_dirs) {
indices_dirs << "index id is: " << index.first << " , index suffix is: " << index.second
<< " , index dir is: " << dir->toString();
}
return fmt::format(
"inverted index file writer debug string: index storage format is: {}, index path "
"prefix is: {}, rowset id is: {}, seg id is: {}, closed is: {}, total file size "
"is: {}, index dirs is: {}",
_storage_format, _index_path_prefix, _rowset_id, _seg_id, _closed, _total_file_size,
indices_dirs.str());
}

private:
InvertedIndexDirectoryMap _indices_dirs;
const io::FileSystemSPtr _fs;
Expand Down

0 comments on commit 72de391

Please sign in to comment.