add -Wshorten-64-to-32 for share
This commit is contained in:
@ -1062,7 +1062,7 @@ void ObIDagNet::gene_dag_info(ObDagInfo &info, const char *list_info)
|
||||
info.running_task_cnt_ = dag_record_map_.size();
|
||||
info.add_time_ = add_time_;
|
||||
info.start_time_ = start_time_;
|
||||
int64_t tmp_ret = OB_SUCCESS;
|
||||
int tmp_ret = OB_SUCCESS;
|
||||
if (OB_TMP_FAIL(fill_dag_net_key(info.dag_net_key_, OB_DAG_KEY_LENGTH))) {
|
||||
COMMON_LOG_RET(WARN, tmp_ret, "failed to fill dag key", K(tmp_ret));
|
||||
}
|
||||
@ -1096,7 +1096,7 @@ void ObIDag::gene_dag_info(ObDagInfo &info, const char *list_info)
|
||||
info.running_task_cnt_ = running_task_cnt_;
|
||||
info.add_time_ = add_time_;
|
||||
info.start_time_ = start_time_;
|
||||
int64_t tmp_ret = OB_SUCCESS;
|
||||
int tmp_ret = OB_SUCCESS;
|
||||
if (OB_TMP_FAIL(fill_dag_key(info.dag_key_, OB_DAG_KEY_LENGTH))) {
|
||||
COMMON_LOG_RET(WARN, tmp_ret, "failed to fill dag key", K(tmp_ret));
|
||||
}
|
||||
@ -1384,7 +1384,7 @@ int ObTenantDagWorker::set_dag_resource()
|
||||
LOG_WARN("bind back thread to group failed", K(ret), K(GETTID()), K(MTL_ID()), K(group_id));
|
||||
} else {
|
||||
ATOMIC_SET(&group_id_, group_id);
|
||||
THIS_WORKER.set_group_id(group_id);
|
||||
THIS_WORKER.set_group_id(static_cast<int32_t>(group_id));
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
@ -1849,9 +1849,9 @@ int ObTenantDagScheduler::add_dag(
|
||||
void ObTenantDagScheduler::dump_dag_status()
|
||||
{
|
||||
if (REACH_TENANT_TIME_INTERVAL(DUMP_DAG_STATUS_INTERVAL)) {
|
||||
int32_t running_task[ObDagPrio::DAG_PRIO_MAX];
|
||||
int32_t low_limits[ObDagPrio::DAG_PRIO_MAX];
|
||||
int32_t up_limits[ObDagPrio::DAG_PRIO_MAX];
|
||||
int64_t running_task[ObDagPrio::DAG_PRIO_MAX];
|
||||
int64_t low_limits[ObDagPrio::DAG_PRIO_MAX];
|
||||
int64_t up_limits[ObDagPrio::DAG_PRIO_MAX];
|
||||
int64_t dag_count[ObDagType::DAG_TYPE_MAX];
|
||||
int64_t dag_net_count[ObDagNetType::DAG_NET_TYPE_MAX];
|
||||
int64_t ready_dag_count[ObDagPrio::DAG_PRIO_MAX];
|
||||
@ -2914,7 +2914,7 @@ int ObTenantDagScheduler::schedule()
|
||||
|
||||
void ObTenantDagScheduler::loop_dag_net()
|
||||
{
|
||||
int64_t tmp_ret = OB_SUCCESS;
|
||||
int tmp_ret = OB_SUCCESS;
|
||||
if (OB_TMP_FAIL(loop_blocking_dag_net_list())) {
|
||||
COMMON_LOG_RET(WARN, tmp_ret, "failed to loop blocking dag net list", K(tmp_ret));
|
||||
}
|
||||
@ -3071,18 +3071,18 @@ void ObTenantDagScheduler::update_work_thread_num()
|
||||
work_thread_num_ = threads_sum;
|
||||
}
|
||||
|
||||
int ObTenantDagScheduler::set_thread_score(const int64_t priority, const int32_t score)
|
||||
int ObTenantDagScheduler::set_thread_score(const int64_t priority, const int64_t score)
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
if (IS_NOT_INIT) {
|
||||
ret = OB_NOT_INIT;
|
||||
COMMON_LOG(WARN, "ObTenantDagScheduler is not inited", K(ret));
|
||||
} else if (OB_UNLIKELY(priority < 0 || priority >= ObDagPrio::DAG_PRIO_MAX || score < 0)) {
|
||||
} else if (OB_UNLIKELY(priority < 0 || priority >= ObDagPrio::DAG_PRIO_MAX || score < 0 || score > INT32_MAX)) {
|
||||
ret = OB_INVALID_ARGUMENT;
|
||||
COMMON_LOG(WARN, "invalid argument", K(ret), K(priority), K(score));
|
||||
} else {
|
||||
ObThreadCondGuard guard(scheduler_sync_);
|
||||
const int32_t old_val = up_limits_[priority];
|
||||
const int64_t old_val = up_limits_[priority];
|
||||
up_limits_[priority] = 0 == score ? OB_DAG_PRIOS[priority].score_ : score;
|
||||
low_limits_[priority] = up_limits_[priority];
|
||||
if (old_val != up_limits_[priority]) {
|
||||
@ -3096,9 +3096,9 @@ int ObTenantDagScheduler::set_thread_score(const int64_t priority, const int32_t
|
||||
return ret;
|
||||
}
|
||||
|
||||
int32_t ObTenantDagScheduler::get_running_task_cnt(const ObDagPrio::ObDagPrioEnum priority)
|
||||
int64_t ObTenantDagScheduler::get_running_task_cnt(const ObDagPrio::ObDagPrioEnum priority)
|
||||
{
|
||||
int32_t count = -1;
|
||||
int64_t count = -1;
|
||||
if (priority >= 0 && priority < ObDagPrio::DAG_PRIO_MAX) {
|
||||
ObThreadCondGuard guard(scheduler_sync_);
|
||||
count = running_task_cnts_[priority];
|
||||
@ -3108,7 +3108,7 @@ int32_t ObTenantDagScheduler::get_running_task_cnt(const ObDagPrio::ObDagPrioEnu
|
||||
return count;
|
||||
}
|
||||
|
||||
int ObTenantDagScheduler::get_up_limit(const int64_t prio, int32_t &up_limit)
|
||||
int ObTenantDagScheduler::get_up_limit(const int64_t prio, int64_t &up_limit)
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
up_limit = 0;
|
||||
|
||||
Reference in New Issue
Block a user