Skip to content

Commit

Permalink
[fix](build index)Remove index_meta in tablet schema when the index i…
Browse files Browse the repository at this point in the history
…s dropped.
  • Loading branch information
qidaye committed Jul 12, 2024
1 parent 1fcc3a3 commit 2c7c710
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions be/src/olap/task/index_builder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,9 @@ Status IndexBuilder::update_inverted_index_info() {
}
}
_dropped_inverted_indexes.push_back(*index_meta);
// ATTN: DO NOT REMOVE INDEX AFTER OUTPUT_ROWSET_WRITER CREATED.
// remove dropped index_meta from output rowset tablet schema
output_rs_tablet_schema->remove_index(index_meta->index_id());
}
} else {
// base on input rowset's tablet_schema to build
Expand Down Expand Up @@ -298,10 +301,6 @@ Status IndexBuilder::handle_single_rowset(RowsetMetaSharedPtr output_rowset_meta
output_rowset_meta->set_index_disk_size(output_rowset_meta->index_disk_size() +
inverted_index_size);
}
// remove dropped index_meta from output rowset tablet schema
for (auto& index_meta : _dropped_inverted_indexes) {
output_rs_tablet_schema->remove_index(index_meta.index_id());
}
LOG(INFO) << "all row nums. source_rows=" << output_rowset_meta->num_rows();
return Status::OK();
} else {
Expand Down

0 comments on commit 2c7c710

Please sign in to comment.