add debug log & fix skip_cur_ls

This commit is contained in:
yangqise7en 2023-07-01 02:18:02 +00:00 committed by ob-robot
parent 572b58d303
commit fc374c7ce0
3 changed files with 6 additions and 4 deletions

View File

@ -2888,7 +2888,7 @@ int ObTenantDagScheduler::pop_task_from_ready_list(
COMMON_LOG(WARN, "failed to start sys task", K(tmp_ret));
}
if (OB_TMP_FAIL(generate_next_dag_(cur))) {
LOG_WARN("failed to generate next dag", K(ret), K(cur));
LOG_WARN("failed to generate next dag", K(tmp_ret), K(cur));
}
}
next_dag_status = ObIDag::DAG_STATUS_NODE_RUNNING;

View File

@ -497,6 +497,7 @@ int ObTenantTabletScheduler::schedule_all_tablets_minor()
} else {
const ObLSID &ls_id = ls->get_ls_id();
if (OB_TMP_FAIL(schedule_ls_minor_merge(ls_handle, schedule_tablet_cnt))) {
LOG_TRACE("meet error when schedule", K(tmp_ret), K(minor_ls_tablet_iter_));
minor_ls_tablet_iter_.skip_cur_ls();
if (!schedule_ignore_error(tmp_ret)) {
LOG_WARN("failed to schedule ls minor merge", K(tmp_ret), K(ls_id));
@ -958,7 +959,6 @@ int ObTenantTabletScheduler::schedule_ls_minor_merge(
int64_t &schedule_tablet_cnt)
{
int ret = OB_SUCCESS;
ObLSTabletIterator tablet_iter(ObMDSGetTabletMode::READ_ALL_COMMITED);
bool need_merge = false;
bool need_fast_freeze = false;
ObLS &ls = *ls_handle.get_ls();
@ -1458,6 +1458,7 @@ int ObCompactionScheduleIterator::get_next_ls(ObLSHandle &ls_handle)
|| tablet_idx_ >= tablet_ids_.count()) { // tablet iter end, need get next ls
++ls_idx_;
tablet_ids_.reuse();
LOG_TRACE("tablet iter end", K(ret), K(ls_idx_), K(tablet_idx_));
}
do {
if (ls_idx_ >= ls_ids_.count()) {
@ -1540,7 +1541,7 @@ int64_t ObCompactionScheduleIterator::to_string(char *buf, const int64_t buf_len
J_KV(K_(ls_idx), K_(ls_ids), K_(tablet_idx), K(tablet_ids_.count()));
if (is_valid()) {
J_COMMA();
J_KV("cur_ls", ls_ids_.at(ls_idx_));
J_KV("cur_ls", ls_ids_.at(ls_idx_), K_(tablet_idx));
if (!tablet_ids_.empty() && tablet_idx_ < tablet_ids_.count()) {
J_COMMA();
J_KV("next_tablet", tablet_ids_.at(tablet_idx_));

View File

@ -88,6 +88,7 @@ public:
void skip_cur_ls()
{
++ls_idx_;
tablet_idx_ = -1;
tablet_ids_.reuse();
}
OB_INLINE int64_t to_string(char *buf, const int64_t buf_len) const;
@ -316,7 +317,7 @@ private:
int64_t inner_table_merged_scn_;
ObScheduleStatistics schedule_stats_;
MergeLoopTask merge_loop_task_;
MediumLoopTask medium_loop_task_;
MediumLoopTask medium_loop_task_;
SSTableGCTask sstable_gc_task_;
InfoPoolResizeTask info_pool_resize_task_;
ObFastFreezeChecker fast_freeze_checker_;