log simplify
This commit is contained in:
		@ -851,7 +851,7 @@ int ObMediumCompactionScheduleFunc::prepare_medium_info(
 | 
			
		||||
    LOG_WARN("failed to init parallel range", K(ret), K(medium_info));
 | 
			
		||||
  } else {
 | 
			
		||||
    medium_info.last_medium_snapshot_ = result.handle_.get_table(0)->get_snapshot_version();
 | 
			
		||||
    LOG_INFO("success to prepare medium info", K(ret), K(medium_info));
 | 
			
		||||
    LOG_TRACE("success to prepare medium info", K(ret), K(medium_info));
 | 
			
		||||
  }
 | 
			
		||||
  return ret;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -273,7 +273,7 @@ int ObTabletMediumCompactionInfoRecorder::sync_clog_succ_for_leader(const int64_
 | 
			
		||||
  } else if (OB_FAIL(submit_trans_on_mds_table(true/*is_commit*/))) {
 | 
			
		||||
    LOG_WARN("failed to dec ref on memtable", K(ret), K_(tablet_id), KPC(medium_info_));
 | 
			
		||||
  } else {
 | 
			
		||||
    FLOG_INFO("success to save medium info for leader", K(ret), K_(ls_id), K_(tablet_id), KPC(medium_info_),
 | 
			
		||||
    LOG_TRACE("success to save medium info for leader", K(ret), K_(ls_id), K_(tablet_id), KPC(medium_info_),
 | 
			
		||||
        K(max_saved_version_), K_(clog_scn));
 | 
			
		||||
  }
 | 
			
		||||
  return ret;
 | 
			
		||||
 | 
			
		||||
@ -1484,20 +1484,21 @@ bool ObTenantTabletScheduler::get_enable_adaptive_compaction()
 | 
			
		||||
  int ret = OB_SUCCESS;
 | 
			
		||||
  bool enable_adaptive_compaction = enable_adaptive_compaction_;
 | 
			
		||||
  ObTenantSysStat cur_sys_stat;
 | 
			
		||||
  if (!enable_adaptive_compaction_) {
 | 
			
		||||
  if (!enable_adaptive_compaction) {
 | 
			
		||||
    // do nothing
 | 
			
		||||
#ifdef ENABLE_DEBUG_LOG
 | 
			
		||||
  } else if (GCONF.enable_crazy_medium_compaction) {
 | 
			
		||||
    enable_adaptive_compaction = true;
 | 
			
		||||
    LOG_DEBUG("set crazy medium, set enable_adaptive_compaction = true");
 | 
			
		||||
#endif
 | 
			
		||||
  } else if (OB_FAIL(MTL(ObTenantTabletStatMgr *)->get_sys_stat(cur_sys_stat))) {
 | 
			
		||||
    LOG_WARN("failed to get tenant sys stat", K(ret), K(cur_sys_stat));
 | 
			
		||||
  } else if (cur_sys_stat.is_full_cpu_usage()) {
 | 
			
		||||
    enable_adaptive_compaction = false;
 | 
			
		||||
    FLOG_INFO("disable adaptive compaction due to the high load CPU", K(ret), K(cur_sys_stat));
 | 
			
		||||
    if (REACH_TENANT_TIME_INTERVAL(PRINT_LOG_INVERVAL)) {
 | 
			
		||||
      FLOG_INFO("disable adaptive compaction due to the high load CPU", K(ret), K(cur_sys_stat));
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
#ifdef ENABLE_DEBUG_LOG
 | 
			
		||||
  if (GCONF.enable_crazy_medium_compaction) {
 | 
			
		||||
    enable_adaptive_compaction = true;
 | 
			
		||||
    LOG_DEBUG("set crazy medium, set enable_adaptive_compaction = true");
 | 
			
		||||
  }
 | 
			
		||||
#endif
 | 
			
		||||
  return enable_adaptive_compaction;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user