zhannngchen commented on code in PR #53086:
URL: https://github.com/apache/doris/pull/53086#discussion_r2212458496
##########
fe/fe-core/src/main/java/org/apache/doris/cloud/transaction/CloudGlobalTransactionMgr.java:
##########
@@ -1011,15 +1021,24 @@ private void getDeleteBitmapUpdateLock(long
transactionId, List<OlapTable> mowTa
"check delete bitmap lock release
fail,response is " + response
+ ", tableList=(" +
StringUtils.join(mowTableList, ",") + ")");
}
- // sleep random millis [20, 300] ms, avoid txn conflict
- int randomMillis = 20 + (int) (Math.random() * (300 - 20));
- if (LOG.isDebugEnabled()) {
- LOG.debug("randomMillis:{}", randomMillis);
- }
- try {
- Thread.sleep(randomMillis);
- } catch (InterruptedException e) {
- LOG.info("InterruptedException: ", e);
+
+ // don't sleep if it's urgent
+ if (!urgent) {
+ long base = Config.mow_get_ms_lock_retry_backoff_base;
+ long interval =
Config.mow_get_ms_lock_retry_backoff_interval;
+ if (Config.enable_mow_load_force_take_ms_lock
+ && interval >
Config.mow_load_force_take_ms_lock_threshold_ms) {
+ interval =
Config.mow_load_force_take_ms_lock_threshold_ms;
+ }
+ long randomMillis = base + (long) (Math.random() *
interval);
Review Comment:
should sleep no more than `Config.mow_load_force_take_ms_lock_threshold_ms
- waitTime`
##########
cloud/src/meta-service/meta_service.cpp:
##########
@@ -2981,6 +2981,45 @@ bool
MetaServiceImpl::get_mow_tablet_stats_and_meta(MetaServiceCode& code, std::
return true;
}
+static bool clear_all_mow_tablet_job_keys(MetaServiceCode& code, std::string&
msg,
+ std::stringstream& ss,
std::unique_ptr<Transaction>& txn,
+ std::string& instance_id, int64_t
table_id,
+ int64_t lock_id) {
+ std::string key0 = mow_tablet_job_key({instance_id, table_id, 0});
+ std::string key1 = mow_tablet_job_key({instance_id, table_id + 1, 0});
+ MowTabletJobPB mow_tablet_job;
+ std::unique_ptr<RangeGetIterator> it;
+ int64_t job_key_num = 0;
Review Comment:
+1, why not remove by range?
--
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]