mymeiyi commented on code in PR #49716: URL: https://github.com/apache/doris/pull/49716#discussion_r2032549529
########## cloud/src/meta-service/meta_service_job.cpp: ########## @@ -587,7 +587,32 @@ static void remove_delete_bitmap_update_lock(std::unique_ptr<Transaction>& txn, mow_tablet_compaction_key({instance_id, table_id, lock_initiator}); std::string tablet_compaction_val; TxnErrorCode err = txn->get(tablet_compaction_key, &tablet_compaction_val); - if (err != TxnErrorCode::TXN_OK) { + if (err == TxnErrorCode::TXN_KEY_NOT_FOUND) { + // initiator may remain in initiators when upgrade ms, need to clear it + std::string lock_key = meta_delete_bitmap_update_lock_key({instance_id, table_id, -1}); + std::string lock_val; + err = txn->get(lock_key, &lock_val); + LOG(INFO) << "get remove delete bitmap update lock info, table_id=" << table_id + << " key=" << hex(lock_key) << " err=" << err; + if (err != TxnErrorCode::TXN_OK) { + LOG(WARNING) << "failed to get delete bitmap update lock key, instance_id=" + << instance_id << " table_id=" << table_id << " key=" << hex(lock_key) + << " err=" << err; + return; + } + DeleteBitmapUpdateLockPB lock_info; + if (!lock_info.ParseFromString(lock_val)) [[unlikely]] { + LOG(WARNING) << "failed to parse DeleteBitmapUpdateLockPB, instance_id=" + << instance_id << " table_id=" << table_id << " key=" << hex(lock_key); + return; + } + if (lock_info.initiators_size() > 0) { + lock_info.clear_initiators(); Review Comment: the lock key is not saved to fdb -- 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: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org