dataroaring commented on code in PR #48024:
URL: https://github.com/apache/doris/pull/48024#discussion_r1992563405
##########
cloud/src/meta-service/meta_service.cpp:
##########
@@ -2215,79 +2284,223 @@ void
MetaServiceImpl::get_delete_bitmap_update_lock(google::protobuf::RpcControl
LOG(INFO) << msg << ", cloud_unique_id=" << cloud_unique_id;
return;
}
-
- RPC_RATE_LIMIT(get_delete_bitmap_update_lock)
- std::unique_ptr<Transaction> txn;
- TxnErrorCode err = txn_kv_->create_txn(&txn);
- if (err != TxnErrorCode::TXN_OK) {
- code = cast_as<ErrCategory::CREATE>(err);
- msg = "failed to init txn";
- return;
- }
auto table_id = request->table_id();
std::string lock_key = meta_delete_bitmap_update_lock_key({instance_id,
table_id, -1});
- std::string lock_val;
- DeleteBitmapUpdateLockPB lock_info;
- err = txn->get(lock_key, &lock_val);
- if (err != TxnErrorCode::TXN_OK && err != TxnErrorCode::TXN_KEY_NOT_FOUND)
{
- ss << "failed to get delete bitmap update lock, instance_id=" <<
instance_id
- << " table_id=" << table_id << " key=" << hex(lock_key) << " err="
<< err;
- msg = ss.str();
- code = MetaServiceCode::KV_TXN_GET_ERR;
- return;
- }
- using namespace std::chrono;
- int64_t now =
duration_cast<seconds>(system_clock::now().time_since_epoch()).count();
- if (err == TxnErrorCode::TXN_OK) {
- if (!lock_info.ParseFromString(lock_val)) [[unlikely]] {
- code = MetaServiceCode::PROTOBUF_PARSE_ERR;
- msg = "failed to parse DeleteBitmapUpdateLockPB";
+ bool first_retry = true;
+ while (true) {
Review Comment:
1. Why do we remove the rpc_rate_limit?
2. while (true) is dangerous.
--
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]