Tanya-W commented on code in PR #21574:
URL: https://github.com/apache/doris/pull/21574#discussion_r1255117376
##########
be/src/olap/task/index_builder.cpp:
##########
@@ -74,6 +74,18 @@ Status IndexBuilder::update_inverted_index_info() {
for (auto t_inverted_index : _alter_inverted_indexes) {
TabletIndex index;
index.init_from_thrift(t_inverted_index,
*input_rs_tablet_schema);
+ auto column_uid = index.col_unique_ids()[0];
+ const TabletIndex* exist_index =
+
output_rs_tablet_schema->get_inverted_index(column_uid);
+ if (exist_index && exist_index->index_id() !=
index.index_id()) {
+ // maybe there are concurrent drop index request did not
obtain the lock,
+ // so return error, to wait the drop index request
finished.
+ LOG(WARNING) << "column: " << column_uid << " has a exist
inverted index"
+ << ", but the index id not equal request's
index id, "
+ << ", exist index id: " <<
exist_index->index_id()
+ << ", request's index id: " <<
index.index_id();
+ return
Status::Error<ErrorCode::INVERTED_INDEX_BUILD_WAITTING>();
Review Comment:
the task will retry by fe
--
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]