[FEAT MERGE] dbms_scheduler media related support
This commit is contained in:
parent
e957044033
commit
bf0272041a
@ -379,6 +379,11 @@ int ObDBMSSchedJobMaster::scheduler_job(ObDBMSSchedJobKey *job_key, bool is_retr
|
||||
OZ (load_and_register_all_jobs(job_key));
|
||||
} else if (job_key->is_check_new()) {
|
||||
OZ (load_and_register_new_jobs(job_key->get_tenant_id(), job_key->is_oracle_tenant(), job_key));
|
||||
} else if (job_key->is_purge_run_detail()) {
|
||||
//purge run detail
|
||||
OZ (table_operator_.purge_run_detail_histroy(job_key->get_tenant_id()));
|
||||
//update purge run detail job
|
||||
OZ (register_purge_run_detail_job(job_key->get_tenant_id(), job_key->is_oracle_tenant(), job_key));
|
||||
} else {
|
||||
ObArenaAllocator allocator;
|
||||
OZ (table_operator_.get_dbms_sched_job_info(
|
||||
@ -398,8 +403,7 @@ int ObDBMSSchedJobMaster::scheduler_job(ObDBMSSchedJobKey *job_key, bool is_retr
|
||||
if (OB_SUCC(ret) && can_running) {
|
||||
OZ (get_execute_addr(job_info, execute_addr));
|
||||
OZ (table_operator_.update_for_start(
|
||||
job_info.get_tenant_id(), job_info,
|
||||
(job_info.next_date_ == job_key->get_execute_at())));
|
||||
job_info.get_tenant_id(), job_info));
|
||||
OZ (job_rpc_proxy_->run_dbms_sched_job(
|
||||
job_key->get_tenant_id(), job_key->is_oracle_tenant(), job_key->get_job_id(), execute_addr, self_addr_));
|
||||
}
|
||||
@ -560,6 +564,30 @@ int ObDBMSSchedJobMaster::register_check_tenant_job()
|
||||
return ret;
|
||||
}
|
||||
|
||||
int ObDBMSSchedJobMaster::register_purge_run_detail_job(int64_t tenant_id, bool is_oracle_tenant, ObDBMSSchedJobKey *job_key)
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
int64_t now = ObTimeUtility::current_time();
|
||||
int64_t day_duration = 24L * 60L * 60L * 1000000L;
|
||||
if (OB_FAIL(ret)) {
|
||||
} else if (OB_ISNULL(job_key)) { //
|
||||
OZ (alloc_job_key(job_key, tenant_id, is_oracle_tenant, 0, now + day_duration, day_duration, false, false, false));
|
||||
job_key->set_purge_run_detail(true);
|
||||
CK (job_key->is_purge_run_detail());
|
||||
CK (OB_NOT_NULL(job_key));
|
||||
CK (job_key->is_valid());
|
||||
} else {
|
||||
CK (job_key->get_tenant_id() == tenant_id);
|
||||
CK (job_key->is_oracle_tenant() == is_oracle_tenant);
|
||||
CK (job_key->is_purge_run_detail());
|
||||
OX (job_key->set_execute_at(now + day_duration));
|
||||
OX (job_key->set_delay(day_duration));
|
||||
}
|
||||
|
||||
OZ (scheduler_task_.scheduler(job_key));
|
||||
return ret;
|
||||
}
|
||||
|
||||
int ObDBMSSchedJobMaster::load_and_register_all_jobs(ObDBMSSchedJobKey *job_key)
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
@ -584,6 +612,15 @@ int ObDBMSSchedJobMaster::load_and_register_all_jobs(ObDBMSSchedJobKey *job_key)
|
||||
OZ (schema_guard.get_tenant_info(tenant_ids.at(i), tenant_schema));
|
||||
CK (OB_NOT_NULL(tenant_schema));
|
||||
if (OB_SUCC(ret)) {
|
||||
uint64_t data_version = 0;
|
||||
if (OB_FAIL(GET_MIN_DATA_VERSION(tenant_ids.at(i), data_version))) {
|
||||
LOG_WARN("fail to get tenant data version", KR(ret), K(data_version));
|
||||
} else if (DATA_VERSION_4_2_1_0 <= data_version) {
|
||||
//add default job class
|
||||
OZ (table_operator_.register_default_job_class(tenant_ids.at(i)));
|
||||
//add purge run detail job
|
||||
OZ (register_purge_run_detail_job(tenant_ids.at(i), tenant_schema->is_oracle_tenant()));
|
||||
}
|
||||
OZ (load_and_register_new_jobs(tenant_ids.at(i), tenant_schema->is_oracle_tenant()));
|
||||
LOG_INFO("register single tenant",
|
||||
K(ret), K(tenant_ids.at(i)), K(tenant_schema->get_compatibility_mode()));
|
||||
@ -679,9 +716,9 @@ int ObDBMSSchedJobMaster::register_job(
|
||||
OZ (table_operator_.check_job_timeout(job_info));
|
||||
OZ (table_operator_.check_auto_drop(job_info));
|
||||
if (OB_FAIL(ret)) {
|
||||
} else if (job_info.is_broken() || job_info.is_running() || job_info.is_disabled()) {
|
||||
} else if (job_info.is_broken() || job_info.is_disabled()) {
|
||||
execute_at = now + MIN_SCHEDULER_INTERVAL;
|
||||
delay = MIN_SCHEDULER_INTERVAL; // every 5s check job status
|
||||
delay = MIN_SCHEDULER_INTERVAL; // every MIN_SCHEDULER_INTERVAL check job status
|
||||
check_job = true;
|
||||
} else {
|
||||
OZ (table_operator_.calc_execute_at(job_info, execute_at, delay, ignore_nextdate));
|
||||
|
@ -74,6 +74,7 @@ public:
|
||||
OB_INLINE bool is_check() { return check_job_ || check_new_ || check_new_tenant_; }
|
||||
OB_INLINE bool is_check_new() { return check_new_; }
|
||||
OB_INLINE bool is_check_new_tenant() { return check_new_tenant_; }
|
||||
OB_INLINE bool is_purge_run_detail() { return purge_run_detail_; }
|
||||
|
||||
OB_INLINE void set_tenant_id(uint64_t tenant_id) { tenant_id_ = tenant_id; }
|
||||
OB_INLINE void set_job_id(uint64_t job_id) { job_id_ = job_id; }
|
||||
@ -84,6 +85,8 @@ public:
|
||||
OB_INLINE void set_check_job(bool check_job) { check_job_ = check_job; }
|
||||
OB_INLINE void set_check_new(bool check_new) { check_new_ = check_new; }
|
||||
OB_INLINE void set_check_new_tenant(bool check_new) { check_new_tenant_ = check_new; }
|
||||
OB_INLINE void set_purge_run_detail(bool purge_run_detail) { purge_run_detail_ = purge_run_detail; }
|
||||
|
||||
|
||||
OB_INLINE uint64_t get_adjust_delay() const
|
||||
{
|
||||
@ -112,6 +115,7 @@ private:
|
||||
bool check_job_; // for check job update ...
|
||||
bool check_new_; // for check new job coming ...
|
||||
bool check_new_tenant_; // for check new tenant ...
|
||||
bool purge_run_detail_; // for purge run detail
|
||||
};
|
||||
|
||||
class ObDBMSSchedJobTask : public ObTimerTask
|
||||
@ -198,6 +202,7 @@ public:
|
||||
int get_execute_addr(ObDBMSSchedJobInfo &job_info, common::ObAddr &execute_addr);
|
||||
|
||||
int register_check_tenant_job();
|
||||
int register_purge_run_detail_job(int64_t tenant_id, bool is_oracle_tenant, ObDBMSSchedJobKey *job_key = NULL);
|
||||
int load_and_register_all_jobs(ObDBMSSchedJobKey *job_key = NULL);
|
||||
int load_and_register_new_jobs(uint64_t tenant_id,
|
||||
bool is_oracle_tenant,
|
||||
|
@ -75,9 +75,24 @@ int ObDBMSSchedJobInfo::deep_copy(ObIAllocator &allocator, const ObDBMSSchedJobI
|
||||
OZ (ob_write_string(allocator, other.field1_, field1_));
|
||||
OZ (ob_write_string(allocator, other.exec_env_, exec_env_));
|
||||
OZ (ob_write_string(allocator, other.job_name_, job_name_));
|
||||
OZ (ob_write_string(allocator, other.job_class_, job_class_));
|
||||
OZ (ob_write_string(allocator, other.program_name_, program_name_));
|
||||
return ret;
|
||||
}
|
||||
|
||||
int ObDBMSSchedJobClassInfo::deep_copy(common::ObIAllocator &allocator, const ObDBMSSchedJobClassInfo &other)
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
tenant_id_ = other.tenant_id_;
|
||||
is_oracle_tenant_ = other.is_oracle_tenant_;
|
||||
log_history_ = other.log_history_;
|
||||
OZ (ob_write_string(allocator, other.job_class_name_, job_class_name_));
|
||||
OZ (ob_write_string(allocator, other.service_, service_));
|
||||
OZ (ob_write_string(allocator, other.resource_consumer_group_, resource_consumer_group_));
|
||||
OZ (ob_write_string(allocator, other.logging_level_, logging_level_));
|
||||
OZ (ob_write_string(allocator, other.comments_, comments_));
|
||||
return ret;
|
||||
}
|
||||
|
||||
} // end for namespace dbms_scheduler
|
||||
} // end for namespace oceanbase
|
||||
|
@ -104,7 +104,8 @@ public:
|
||||
K(field1_),
|
||||
K(scheduler_flags_),
|
||||
K(enabled_),
|
||||
K(max_run_duration_));
|
||||
K(max_run_duration_),
|
||||
K(interval_ts_));
|
||||
|
||||
bool valid()
|
||||
{
|
||||
@ -135,6 +136,7 @@ public:
|
||||
common::ObString &get_interval() { return interval_; }
|
||||
common::ObString &get_program_name() { return program_name_; }
|
||||
common::ObString &get_job_name() { return job_name_; }
|
||||
common::ObString &get_job_class() { return job_class_; }
|
||||
|
||||
bool is_oracle_tenant() { return is_oracle_tenant_; }
|
||||
|
||||
@ -184,6 +186,50 @@ public:
|
||||
bool is_oracle_tenant_;
|
||||
};
|
||||
|
||||
class ObDBMSSchedJobClassInfo
|
||||
{
|
||||
public:
|
||||
ObDBMSSchedJobClassInfo() :
|
||||
tenant_id_(common::OB_INVALID_ID),
|
||||
job_class_name_(),
|
||||
resource_consumer_group_(),
|
||||
logging_level_(),
|
||||
log_history_(0),
|
||||
comments_(),
|
||||
is_oracle_tenant_(true) {}
|
||||
|
||||
TO_STRING_KV(K(tenant_id_),
|
||||
K(job_class_name_),
|
||||
K(service_),
|
||||
K(resource_consumer_group_),
|
||||
K(logging_level_),
|
||||
K(log_history_),
|
||||
K(comments_));
|
||||
bool valid()
|
||||
{
|
||||
return tenant_id_ != common::OB_INVALID_ID
|
||||
&& !job_class_name_.empty();
|
||||
}
|
||||
uint64_t get_tenant_id() { return tenant_id_; }
|
||||
uint64_t get_log_history() { return log_history_; }
|
||||
common::ObString &get_job_class_name() { return job_class_name_; }
|
||||
common::ObString &get_service() { return service_; }
|
||||
common::ObString &get_resource_consumer_group() { return resource_consumer_group_; }
|
||||
common::ObString &get_logging_level() { return logging_level_; }
|
||||
common::ObString &get_comments() { return comments_; }
|
||||
bool is_oracle_tenant() { return is_oracle_tenant_; }
|
||||
int deep_copy(common::ObIAllocator &allocator, const ObDBMSSchedJobClassInfo &other);
|
||||
public:
|
||||
uint64_t tenant_id_;
|
||||
common::ObString job_class_name_;
|
||||
common::ObString service_;
|
||||
common::ObString resource_consumer_group_;
|
||||
common::ObString logging_level_;
|
||||
uint64_t log_history_;
|
||||
common::ObString comments_;
|
||||
bool is_oracle_tenant_;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -123,11 +123,26 @@ int ObDBMSSchedTableOperator::update_for_end(
|
||||
CK (OB_NOT_NULL(sql_proxy_));
|
||||
CK (OB_LIKELY(tenant_id != OB_INVALID_ID));
|
||||
CK (OB_LIKELY(job_info.job_ != OB_INVALID_ID));
|
||||
|
||||
uint64_t data_version = 0;
|
||||
if (OB_SUCC(ret)) {
|
||||
if (OB_FAIL(GET_MIN_DATA_VERSION(tenant_id, data_version))) {
|
||||
LOG_WARN("fail to get tenant data version", KR(ret), K(data_version));
|
||||
} else if (DATA_VERSION_4_2_1_0 <= data_version) {
|
||||
CK (OB_LIKELY(!job_info.job_class_.empty()));
|
||||
}
|
||||
}
|
||||
|
||||
ObDBMSSchedJobClassInfo job_class_info;
|
||||
ObArenaAllocator allocator;
|
||||
if (DATA_VERSION_4_2_1_0 <= data_version) {
|
||||
OZ (get_dbms_sched_job_class_info(tenant_id, job_info.is_oracle_tenant(), job_info.get_job_class(), allocator, job_class_info));
|
||||
}
|
||||
// when if failures > 16 then set broken flag.
|
||||
OX (job_info.failures_ = errmsg.empty() ? 0 : (job_info.failures_ + 1));
|
||||
OX (job_info.flag_ = job_info.failures_ > 15 ? (job_info.flag_ | 0x1) : (job_info.flag_ & 0xfffffffffffffffE));
|
||||
if ((now >= job_info.end_date_) && (true == job_info.auto_drop_)) {
|
||||
// when end_date is reach and auto_drop is set true, drop job.
|
||||
if ((now >= job_info.end_date_ || job_info.get_interval_ts() == 0) && (true == job_info.auto_drop_)) {
|
||||
// when end_date is reach or no interval set, and auto_drop is set true, drop job.
|
||||
OZ (dml1.add_gmt_modified(now));
|
||||
OZ (dml1.add_pk_column("tenant_id",
|
||||
ObSchemaUtils::get_extract_tenant_id(tenant_id, tenant_id)));
|
||||
@ -158,23 +173,51 @@ int ObDBMSSchedTableOperator::update_for_end(
|
||||
OZ (dml1.add_column("total", job_info.total_));
|
||||
OZ (dml1.splice_update_sql(OB_ALL_TENANT_SCHEDULER_JOB_TNAME, sql1));
|
||||
}
|
||||
OZ (dml2.add_gmt_create(now));
|
||||
OZ (dml2.add_gmt_modified(now));
|
||||
OZ (dml2.add_pk_column("tenant_id", ObSchemaUtils::get_extract_tenant_id(tenant_id, tenant_id)));
|
||||
OZ (dml2.add_pk_column("job", job_info.job_));
|
||||
OZ (dml2.add_time_column("time", now));
|
||||
OZ (dml2.add_column("code", err));
|
||||
OZ (dml2.add_column(
|
||||
"message", ObHexEscapeSqlStr(errmsg.empty() ? ObString("SUCCESS") : errmsg)));
|
||||
OZ (dml2.splice_insert_sql(OB_ALL_TENANT_SCHEDULER_JOB_RUN_DETAIL_TNAME, sql2));
|
||||
|
||||
//If a non-existent JOB CLASS is entered when creating a JOB,
|
||||
//job_run_detail still needs to be recorded.
|
||||
bool need_write_job_run_detail = true;
|
||||
if (DATA_VERSION_4_2_1_0 <= data_version) {
|
||||
ObString logging_level = job_class_info.get_logging_level();
|
||||
if (logging_level.empty()) {
|
||||
LOG_WARN("logging_level may not assigned");
|
||||
} else if (0 == logging_level.case_compare("OFF")) {
|
||||
need_write_job_run_detail = false;
|
||||
} else if (0 == logging_level.case_compare("RUNS")) {
|
||||
need_write_job_run_detail = true;
|
||||
} else if (0 == logging_level.case_compare("FAILED RUNS") && !errmsg.empty()) {
|
||||
need_write_job_run_detail = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (need_write_job_run_detail) {
|
||||
OZ (dml2.add_gmt_create(now));
|
||||
OZ (dml2.add_gmt_modified(now));
|
||||
OZ (dml2.add_pk_column("tenant_id", ObSchemaUtils::get_extract_tenant_id(tenant_id, tenant_id)));
|
||||
OZ (dml2.add_pk_column("job", job_info.job_));
|
||||
OZ (dml2.add_time_column("time", now));
|
||||
OZ (dml2.add_column("code", err));
|
||||
OZ (dml2.add_column(
|
||||
"message", ObHexEscapeSqlStr(errmsg.empty() ? ObString("SUCCESS") : errmsg)));
|
||||
if (DATA_VERSION_4_2_1_0 <= data_version) {
|
||||
OZ (dml2.add_column("job_class", job_info.job_class_));
|
||||
}
|
||||
OZ (dml2.splice_insert_sql(OB_ALL_TENANT_SCHEDULER_JOB_RUN_DETAIL_TNAME, sql2));
|
||||
}
|
||||
|
||||
OZ (trans.start(sql_proxy_, tenant_id, true));
|
||||
|
||||
OZ (trans.write(tenant_id, sql1.ptr(), affected_rows));
|
||||
OZ (trans.write(tenant_id, sql2.ptr(), affected_rows));
|
||||
if (need_write_job_run_detail) {
|
||||
OZ (trans.write(tenant_id, sql2.ptr(), affected_rows));
|
||||
}
|
||||
|
||||
int tmp_ret = OB_SUCCESS;
|
||||
if (trans.is_started()) {
|
||||
trans.end(true);
|
||||
if (OB_SUCCESS != (tmp_ret = trans.end(OB_SUCC(ret)))) {
|
||||
LOG_WARN("failed to commit trans", KR(ret), KR(tmp_ret));
|
||||
ret = OB_SUCC(ret) ? tmp_ret : ret;
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
@ -186,7 +229,7 @@ int ObDBMSSchedTableOperator::check_job_timeout(ObDBMSSchedJobInfo &job_info)
|
||||
if ((!job_info.is_running()) || (job_info.get_max_run_duration() == 0)) {
|
||||
//not running or not set timeout
|
||||
} else if (ObTimeUtility::current_time() > (job_info.get_this_date() + TO_TS(job_info.get_max_run_duration()))) {
|
||||
OZ(update_for_end(job_info.get_tenant_id(), job_info, 0, NULL));
|
||||
OZ(update_for_end(job_info.get_tenant_id(), job_info, 0, "check job timeout"));
|
||||
LOG_WARN("job is timeout, force update for end", K(job_info), K(ObTimeUtility::current_time()));
|
||||
} else {
|
||||
LOG_DEBUG("job is still running, not timeout", K(job_info));
|
||||
@ -201,7 +244,7 @@ int ObDBMSSchedTableOperator::check_auto_drop(ObDBMSSchedJobInfo &job_info)
|
||||
// running job not check
|
||||
} else if (ObTimeUtility::current_time() > (job_info.end_date_) &&
|
||||
(true == job_info.auto_drop_)) {
|
||||
OZ(update_for_end(job_info.get_tenant_id(), job_info, 0, NULL));
|
||||
OZ(update_for_end(job_info.get_tenant_id(), job_info, 0, "check auto drop expired job"));
|
||||
LOG_WARN("auto drop miss out job", K(job_info), K(ObTimeUtility::current_time()));
|
||||
} else {
|
||||
LOG_DEBUG("job no need to drop", K(job_info));
|
||||
@ -315,6 +358,7 @@ do { \
|
||||
EXTRACT_INT_FIELD_MYSQL_SKIP_RET(result, "scheduler_flags", job_info_local.scheduler_flags_, uint64_t);
|
||||
EXTRACT_VARCHAR_FIELD_MYSQL_SKIP_RET(result, "exec_env", job_info_local.exec_env_);
|
||||
EXTRACT_VARCHAR_FIELD_MYSQL_SKIP_RET(result, "job_name", job_info_local.job_name_);
|
||||
EXTRACT_VARCHAR_FIELD_MYSQL_SKIP_RET(result, "job_class", job_info_local.job_class_);
|
||||
EXTRACT_VARCHAR_FIELD_MYSQL_SKIP_RET(result, "program_name", job_info_local.program_name_);
|
||||
EXTRACT_BOOL_FIELD_MYSQL_SKIP_RET(result, "enabled", job_info_local.enabled_);
|
||||
EXTRACT_BOOL_FIELD_MYSQL_SKIP_RET(result, "auto_drop", job_info_local.auto_drop_);
|
||||
@ -401,6 +445,62 @@ int ObDBMSSchedTableOperator::get_dbms_sched_job_infos_in_tenant(
|
||||
return ret;
|
||||
}
|
||||
|
||||
int ObDBMSSchedTableOperator::extract_job_class_info(
|
||||
sqlclient::ObMySQLResult &result, int64_t tenant_id, bool is_oracle_tenant,
|
||||
ObIAllocator &allocator, ObDBMSSchedJobClassInfo &job_class_info)
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
ObDBMSSchedJobClassInfo job_class_info_local;
|
||||
|
||||
job_class_info_local.tenant_id_ = tenant_id;
|
||||
job_class_info_local.is_oracle_tenant_ = is_oracle_tenant;
|
||||
// EXTRACT_INT_FIELD_MYSQL_SKIP_RET(result, "log_history", job_class_info_local.log_history_, uint64_t);
|
||||
EXTRACT_VARCHAR_FIELD_MYSQL_SKIP_RET(result, "job_class_name", job_class_info_local.job_class_name_);
|
||||
EXTRACT_VARCHAR_FIELD_MYSQL_SKIP_RET(result, "resource_consumer_group", job_class_info_local.resource_consumer_group_);
|
||||
EXTRACT_VARCHAR_FIELD_MYSQL_SKIP_RET(result, "service", job_class_info_local.service_);
|
||||
EXTRACT_VARCHAR_FIELD_MYSQL_SKIP_RET(result, "logging_level", job_class_info_local.logging_level_);
|
||||
EXTRACT_VARCHAR_FIELD_MYSQL_SKIP_RET(result, "comments", job_class_info_local.comments_);
|
||||
|
||||
OZ (job_class_info.deep_copy(allocator, job_class_info_local));
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int ObDBMSSchedTableOperator::get_dbms_sched_job_class_info(
|
||||
uint64_t tenant_id, bool is_oracle_tenant, const common::ObString job_class_name,
|
||||
common::ObIAllocator &allocator, ObDBMSSchedJobClassInfo &job_class_info) {
|
||||
int ret = OB_SUCCESS;
|
||||
ObSqlString sql;
|
||||
int64_t affected_rows = 0;
|
||||
|
||||
CK (OB_NOT_NULL(sql_proxy_));
|
||||
CK (OB_LIKELY(tenant_id != OB_INVALID_ID));
|
||||
CK (OB_LIKELY(!job_class_name.empty()));
|
||||
OZ (sql.append_fmt("select * from %s where tenant_id = %lu and job_class_name = \'%.*s\'",
|
||||
OB_ALL_TENANT_SCHEDULER_JOB_CLASS_TNAME, ObSchemaUtils::get_extract_tenant_id(tenant_id, tenant_id), job_class_name.length(), job_class_name.ptr()));
|
||||
if (OB_SUCC(ret)) {
|
||||
SMART_VAR(ObMySQLProxy::MySQLResult, result) {
|
||||
if (OB_FAIL(sql_proxy_->read(result, tenant_id, sql.ptr()))) {
|
||||
LOG_WARN("execute query failed", K(ret), K(sql), K(tenant_id), K(job_class_name));
|
||||
} else if (OB_NOT_NULL(result.get_result())) {
|
||||
if (OB_SUCCESS == (ret = result.get_result()->next())) {
|
||||
OZ (extract_job_class_info(*(result.get_result()), tenant_id, is_oracle_tenant, allocator, job_class_info));
|
||||
if (OB_SUCC(ret) && (result.get_result()->next()) != OB_ITER_END) {
|
||||
LOG_ERROR("got more than one row for dbms sched job class!", K(ret), K(tenant_id), K(job_class_name));
|
||||
ret = OB_ERR_UNEXPECTED;
|
||||
}
|
||||
} else if (OB_ITER_END == ret) {
|
||||
LOG_INFO("job_class_name not exists, may delete alreay!", K(ret), K(tenant_id), K(job_class_name));
|
||||
ret = OB_SUCCESS; // job not exist, do nothing ...
|
||||
} else {
|
||||
LOG_WARN("failed to get next", K(ret), K(tenant_id), K(job_class_name));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
int ObDBMSSchedTableOperator::calc_execute_at(
|
||||
ObDBMSSchedJobInfo &job_info, int64_t &execute_at, int64_t &delay, bool ignore_nextdate)
|
||||
{
|
||||
@ -415,6 +515,10 @@ int ObDBMSSchedTableOperator::calc_execute_at(
|
||||
if (job_info.get_next_date() > now) {
|
||||
execute_at = job_info.get_next_date();
|
||||
delay = job_info.get_next_date() - now;
|
||||
} else if (now - job_info.get_next_date() < TO_TS(job_info.get_max_run_duration())) {
|
||||
LOG_WARN("job maybe missed, retry it", K(now), K(job_info));
|
||||
execute_at = now;
|
||||
delay = 0;
|
||||
} else if (last_sub_next < 5 && last_sub_next >= -5) {
|
||||
execute_at = now;
|
||||
delay = 0;
|
||||
@ -425,7 +529,7 @@ int ObDBMSSchedTableOperator::calc_execute_at(
|
||||
delay = -1;
|
||||
}
|
||||
|
||||
if (delay < 0 && !interval.empty()) {
|
||||
if (delay < 0 && job_info.get_interval_ts() != 0) {
|
||||
ObSqlString sql;
|
||||
common::ObISQLClient *sql_proxy = sql_proxy_;
|
||||
ObOracleSqlProxy oracle_proxy(*(static_cast<ObMySQLProxy *>(sql_proxy_)));
|
||||
@ -451,7 +555,7 @@ int ObDBMSSchedTableOperator::calc_execute_at(
|
||||
if (OB_SUCC(ret)) {
|
||||
execute_at = sysdate + job_info.get_interval_ts();
|
||||
}
|
||||
LOG_INFO("interval date is", K(sysdate), K(execute_at));
|
||||
LOG_INFO("interval date is", K(sysdate), K(execute_at), K(job_info));
|
||||
if (OB_FAIL(ret)) {
|
||||
} else if (job_info.get_next_date() > execute_at) {
|
||||
execute_at = job_info.get_next_date();
|
||||
@ -466,10 +570,75 @@ int ObDBMSSchedTableOperator::calc_execute_at(
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (delay < 0 && job_info.get_interval_ts() == 0) {
|
||||
OX (job_info.next_date_ = 64060560000000000); // 4000-01-01
|
||||
OZ (update_nextdate(job_info.get_tenant_id(), job_info));
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int ObDBMSSchedTableOperator::register_default_job_class(uint64_t tenant_id)
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
ObMySQLTransaction trans;
|
||||
ObSqlString sql;
|
||||
ObDMLSqlSplicer dml;
|
||||
int64_t affected_rows = 0;
|
||||
OZ (dml.add_pk_column("tenant_id",
|
||||
share::schema::ObSchemaUtils::get_extract_tenant_id(tenant_id, tenant_id)));
|
||||
OZ (dml.add_pk_column("job_class_name", ObHexEscapeSqlStr("DEFAULT_JOB_CLASS")));
|
||||
OZ (dml.add_column("log_history", 0));
|
||||
OZ (dml.add_column("logging_level", ObHexEscapeSqlStr("RUNS")));
|
||||
OZ (dml.add_column("comments", "DEFAULT_JOB_CLASS"));
|
||||
OZ (dml.splice_insert_sql(OB_ALL_TENANT_SCHEDULER_JOB_CLASS_TNAME, sql));
|
||||
|
||||
OZ (trans.start(sql_proxy_, tenant_id, true));
|
||||
OZ (trans.write(tenant_id, sql.ptr(), affected_rows));
|
||||
CK (1 == affected_rows);
|
||||
int tmp_ret = OB_SUCCESS;
|
||||
if (trans.is_started()) {
|
||||
if (OB_SUCCESS != (tmp_ret = trans.end(OB_SUCC(ret)))) {
|
||||
LOG_WARN("failed to commit trans", KR(ret), KR(tmp_ret));
|
||||
ret = OB_SUCC(ret) ? tmp_ret : ret;
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
int ObDBMSSchedTableOperator::purge_run_detail_histroy(uint64_t tenant_id)
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
int64_t DAY_INTERVAL_USEC = 24 * 60 * 60 * 1000000LL;
|
||||
const int64_t now = ObTimeUtility::current_time();
|
||||
|
||||
ObMySQLTransaction trans;
|
||||
ObSqlString sql;
|
||||
int64_t affected_rows = 0;
|
||||
|
||||
CK (OB_NOT_NULL(sql_proxy_));
|
||||
CK (OB_LIKELY(tenant_id != OB_INVALID_ID));
|
||||
|
||||
OZ (sql.append_fmt("delete from %s where tenant_id = %ld and time < usec_to_time(%ld - NVL((select log_history from %s where %s.job_class = %s.job_class_name),0) * %ld)",
|
||||
OB_ALL_TENANT_SCHEDULER_JOB_RUN_DETAIL_TNAME,
|
||||
share::schema::ObSchemaUtils::get_extract_tenant_id(tenant_id, tenant_id),
|
||||
now,
|
||||
OB_ALL_TENANT_SCHEDULER_JOB_CLASS_TNAME,
|
||||
OB_ALL_TENANT_SCHEDULER_JOB_RUN_DETAIL_TNAME,
|
||||
OB_ALL_TENANT_SCHEDULER_JOB_CLASS_TNAME,
|
||||
DAY_INTERVAL_USEC
|
||||
));
|
||||
OZ (trans.start(sql_proxy_, tenant_id, true));
|
||||
OZ (trans.write(tenant_id, sql.ptr(), affected_rows));
|
||||
int tmp_ret = OB_SUCCESS;
|
||||
if (trans.is_started()) {
|
||||
if (OB_SUCCESS != (tmp_ret = trans.end(OB_SUCC(ret)))) {
|
||||
LOG_WARN("failed to commit trans", KR(ret), KR(tmp_ret));
|
||||
ret = OB_SUCC(ret) ? tmp_ret : ret;
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
} // end for namespace dbms_scheduler
|
||||
} // end for namespace oceanbase
|
||||
|
@ -39,6 +39,7 @@ class ObMySQLResult;
|
||||
namespace dbms_scheduler
|
||||
{
|
||||
class ObDBMSSchedJobInfo;
|
||||
class ObDBMSSchedJobClassInfo;
|
||||
|
||||
class ObDBMSSchedTableOperator
|
||||
{
|
||||
@ -61,9 +62,16 @@ public:
|
||||
uint64_t tenant_id, bool is_oracle_tenant,
|
||||
common::ObIAllocator &allocator, common::ObIArray<ObDBMSSchedJobInfo> &job_infos);
|
||||
|
||||
int get_dbms_sched_job_class_info(
|
||||
uint64_t tenant_id, bool is_oracle_tenant, const common::ObString job_class_name,
|
||||
common::ObIAllocator &allocator, ObDBMSSchedJobClassInfo &job_class_info);
|
||||
|
||||
int extract_info(
|
||||
common::sqlclient::ObMySQLResult &result, int64_t tenant_id, bool is_oracle_tenant,
|
||||
common::ObIAllocator &allocator, ObDBMSSchedJobInfo &job_info);
|
||||
int extract_job_class_info(
|
||||
sqlclient::ObMySQLResult &result, int64_t tenant_id, bool is_oracle_tenant,
|
||||
ObIAllocator &allocator, ObDBMSSchedJobClassInfo &job_class_info);
|
||||
|
||||
int calc_execute_at(
|
||||
ObDBMSSchedJobInfo &job_info, int64_t &execute_at, int64_t &delay, bool ignore_nextdate = false);
|
||||
@ -74,6 +82,9 @@ public:
|
||||
|
||||
int check_auto_drop(ObDBMSSchedJobInfo &job_info);
|
||||
|
||||
int register_default_job_class(uint64_t tenant_id);
|
||||
int purge_run_detail_histroy(uint64_t tenant_id);
|
||||
|
||||
private:
|
||||
DISALLOW_COPY_AND_ASSIGN(ObDBMSSchedTableOperator);
|
||||
|
||||
|
@ -490,12 +490,16 @@
|
||||
DEFINE_DBMS_SCHEDULER_INTERFACE(DBMS_SCHEDULER_RUN_JOB, ObDBMSScheduler::run_job)
|
||||
DEFINE_DBMS_SCHEDULER_INTERFACE(DBMS_SCHEDULER_STOP_JOB, ObDBMSScheduler::stop_job)
|
||||
DEFINE_DBMS_SCHEDULER_INTERFACE(DBMS_SCHEDULER_GENERATE_JOB_NAME, ObDBMSScheduler::generate_job_name)
|
||||
DEFINE_DBMS_SCHEDULER_INTERFACE(DBMS_SCHEDULER_SET_ATTRIBUTE, ObDBMSScheduler::set_attribute)
|
||||
DEFINE_DBMS_SCHEDULER_INTERFACE(DBMS_SCHEDULER_SET_JOB_ATTRIBUTE, ObDBMSScheduler::set_job_attribute)
|
||||
DEFINE_DBMS_SCHEDULER_INTERFACE(DBMS_SCHEDULER_DISABLE, ObDBMSScheduler::disable)
|
||||
DEFINE_DBMS_SCHEDULER_INTERFACE(DBMS_SCHEDULER_CREATE_PROGRAM, ObDBMSScheduler::create_program)
|
||||
DEFINE_DBMS_SCHEDULER_INTERFACE(DBMS_SCHEDULER_DEFINE_PROGRAM_ARGUMENT, ObDBMSScheduler::define_program_argument)
|
||||
DEFINE_DBMS_SCHEDULER_INTERFACE(DBMS_SCHEDULER_ENABLE, ObDBMSScheduler::enable)
|
||||
DEFINE_DBMS_SCHEDULER_INTERFACE(DBMS_SCHEDULER_DROP_PROGRAM, ObDBMSScheduler::drop_program)
|
||||
DEFINE_DBMS_SCHEDULER_INTERFACE(DBMS_SCHEDULER_CREATE_JOB_CLASS, ObDBMSScheduler::create_job_class)
|
||||
DEFINE_DBMS_SCHEDULER_INTERFACE(DBMS_SCHEDULER_DROP_JOB_CLASS, ObDBMSScheduler::drop_job_class)
|
||||
DEFINE_DBMS_SCHEDULER_INTERFACE(DBMS_SCHEDULER_SET_JOB_CLASS_ATTRIBUTE, ObDBMSScheduler::set_job_class_attribute)
|
||||
DEFINE_DBMS_SCHEDULER_INTERFACE(DBMS_SCHEDULER_PURGE_LOG, ObDBMSScheduler::purge_log)
|
||||
|
||||
#undef DEFINE_DBMS_SCHEDULER_INTERFACE
|
||||
//end of dbms_scheduler
|
||||
|
@ -4129,6 +4129,21 @@ int ObInnerTableSchema::all_virtual_tenant_scheduler_job_run_detail_schema(ObTab
|
||||
false, //is_nullable
|
||||
false); //is_autoincrement
|
||||
}
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
ADD_COLUMN_SCHEMA("job_class", //column_name
|
||||
++column_id, //column_id
|
||||
0, //rowkey_id
|
||||
0, //index_id
|
||||
0, //part_key_pos
|
||||
ObVarcharType, //column_type
|
||||
CS_TYPE_INVALID, //column_collation_type
|
||||
30, //column_length
|
||||
-1, //column_precision
|
||||
-1, //column_scale
|
||||
true, //is_nullable
|
||||
false); //is_autoincrement
|
||||
}
|
||||
table_schema.set_index_using_type(USING_BTREE);
|
||||
table_schema.set_row_store_type(ENCODING_ROW_STORE);
|
||||
table_schema.set_store_format(OB_STORE_FORMAT_DYNAMIC_MYSQL);
|
||||
|
@ -1807,6 +1807,187 @@ int ObInnerTableSchema::all_virtual_flt_config_schema(ObTableSchema &table_schem
|
||||
return ret;
|
||||
}
|
||||
|
||||
int ObInnerTableSchema::all_virtual_tenant_scheduler_job_class_schema(ObTableSchema &table_schema)
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
uint64_t column_id = OB_APP_MIN_COLUMN_ID - 1;
|
||||
|
||||
//generated fields:
|
||||
table_schema.set_tenant_id(OB_SYS_TENANT_ID);
|
||||
table_schema.set_tablegroup_id(OB_INVALID_ID);
|
||||
table_schema.set_database_id(OB_SYS_DATABASE_ID);
|
||||
table_schema.set_table_id(OB_ALL_VIRTUAL_TENANT_SCHEDULER_JOB_CLASS_TID);
|
||||
table_schema.set_rowkey_split_pos(0);
|
||||
table_schema.set_is_use_bloomfilter(false);
|
||||
table_schema.set_progressive_merge_num(0);
|
||||
table_schema.set_rowkey_column_num(2);
|
||||
table_schema.set_load_type(TABLE_LOAD_TYPE_IN_DISK);
|
||||
table_schema.set_table_type(VIRTUAL_TABLE);
|
||||
table_schema.set_index_type(INDEX_TYPE_IS_NOT);
|
||||
table_schema.set_def_type(TABLE_DEF_TYPE_INTERNAL);
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
if (OB_FAIL(table_schema.set_table_name(OB_ALL_VIRTUAL_TENANT_SCHEDULER_JOB_CLASS_TNAME))) {
|
||||
LOG_ERROR("fail to set table_name", K(ret));
|
||||
}
|
||||
}
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
if (OB_FAIL(table_schema.set_compress_func_name(OB_DEFAULT_COMPRESS_FUNC_NAME))) {
|
||||
LOG_ERROR("fail to set compress_func_name", K(ret));
|
||||
}
|
||||
}
|
||||
table_schema.set_part_level(PARTITION_LEVEL_ZERO);
|
||||
table_schema.set_charset_type(ObCharset::get_default_charset());
|
||||
table_schema.set_collation_type(ObCharset::get_default_collation(ObCharset::get_default_charset()));
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
ADD_COLUMN_SCHEMA("tenant_id", //column_name
|
||||
++column_id, //column_id
|
||||
1, //rowkey_id
|
||||
0, //index_id
|
||||
0, //part_key_pos
|
||||
ObIntType, //column_type
|
||||
CS_TYPE_INVALID, //column_collation_type
|
||||
sizeof(int64_t), //column_length
|
||||
-1, //column_precision
|
||||
-1, //column_scale
|
||||
false, //is_nullable
|
||||
false); //is_autoincrement
|
||||
}
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
ADD_COLUMN_SCHEMA("job_class_name", //column_name
|
||||
++column_id, //column_id
|
||||
2, //rowkey_id
|
||||
0, //index_id
|
||||
0, //part_key_pos
|
||||
ObVarcharType, //column_type
|
||||
CS_TYPE_INVALID, //column_collation_type
|
||||
30, //column_length
|
||||
-1, //column_precision
|
||||
-1, //column_scale
|
||||
false, //is_nullable
|
||||
false); //is_autoincrement
|
||||
}
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
ADD_COLUMN_SCHEMA_TS("gmt_create", //column_name
|
||||
++column_id, //column_id
|
||||
0, //rowkey_id
|
||||
0, //index_id
|
||||
0, //part_key_pos
|
||||
ObTimestampType, //column_type
|
||||
CS_TYPE_INVALID, //column_collation_type
|
||||
sizeof(ObPreciseDateTime), //column_length
|
||||
-1, //column_precision
|
||||
-1, //column_scale
|
||||
false, //is_nullable
|
||||
false, //is_autoincrement
|
||||
false); //is_on_update_for_timestamp
|
||||
}
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
ADD_COLUMN_SCHEMA_TS("gmt_modified", //column_name
|
||||
++column_id, //column_id
|
||||
0, //rowkey_id
|
||||
0, //index_id
|
||||
0, //part_key_pos
|
||||
ObTimestampType, //column_type
|
||||
CS_TYPE_INVALID, //column_collation_type
|
||||
sizeof(ObPreciseDateTime), //column_length
|
||||
-1, //column_precision
|
||||
-1, //column_scale
|
||||
false, //is_nullable
|
||||
false, //is_autoincrement
|
||||
false); //is_on_update_for_timestamp
|
||||
}
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
ADD_COLUMN_SCHEMA("resource_consumer_group", //column_name
|
||||
++column_id, //column_id
|
||||
0, //rowkey_id
|
||||
0, //index_id
|
||||
0, //part_key_pos
|
||||
ObVarcharType, //column_type
|
||||
CS_TYPE_INVALID, //column_collation_type
|
||||
30, //column_length
|
||||
-1, //column_precision
|
||||
-1, //column_scale
|
||||
true, //is_nullable
|
||||
false); //is_autoincrement
|
||||
}
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
ADD_COLUMN_SCHEMA("service", //column_name
|
||||
++column_id, //column_id
|
||||
0, //rowkey_id
|
||||
0, //index_id
|
||||
0, //part_key_pos
|
||||
ObVarcharType, //column_type
|
||||
CS_TYPE_INVALID, //column_collation_type
|
||||
64, //column_length
|
||||
-1, //column_precision
|
||||
-1, //column_scale
|
||||
true, //is_nullable
|
||||
false); //is_autoincrement
|
||||
}
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
ADD_COLUMN_SCHEMA("logging_level", //column_name
|
||||
++column_id, //column_id
|
||||
0, //rowkey_id
|
||||
0, //index_id
|
||||
0, //part_key_pos
|
||||
ObVarcharType, //column_type
|
||||
CS_TYPE_INVALID, //column_collation_type
|
||||
11, //column_length
|
||||
-1, //column_precision
|
||||
-1, //column_scale
|
||||
true, //is_nullable
|
||||
false); //is_autoincrement
|
||||
}
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
ADD_COLUMN_SCHEMA("log_history", //column_name
|
||||
++column_id, //column_id
|
||||
0, //rowkey_id
|
||||
0, //index_id
|
||||
0, //part_key_pos
|
||||
ObNumberType, //column_type
|
||||
CS_TYPE_INVALID, //column_collation_type
|
||||
38, //column_length
|
||||
38, //column_precision
|
||||
0, //column_scale
|
||||
true, //is_nullable
|
||||
false); //is_autoincrement
|
||||
}
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
ADD_COLUMN_SCHEMA("comments", //column_name
|
||||
++column_id, //column_id
|
||||
0, //rowkey_id
|
||||
0, //index_id
|
||||
0, //part_key_pos
|
||||
ObVarcharType, //column_type
|
||||
CS_TYPE_INVALID, //column_collation_type
|
||||
240, //column_length
|
||||
-1, //column_precision
|
||||
-1, //column_scale
|
||||
true, //is_nullable
|
||||
false); //is_autoincrement
|
||||
}
|
||||
table_schema.set_index_using_type(USING_BTREE);
|
||||
table_schema.set_row_store_type(ENCODING_ROW_STORE);
|
||||
table_schema.set_store_format(OB_STORE_FORMAT_DYNAMIC_MYSQL);
|
||||
table_schema.set_progressive_merge_round(1);
|
||||
table_schema.set_storage_format_version(3);
|
||||
table_schema.set_tablet_id(0);
|
||||
|
||||
table_schema.set_max_used_column_id(column_id);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
} // end namespace share
|
||||
} // end namespace oceanbase
|
||||
|
@ -338,6 +338,349 @@ int ObInnerTableSchema::all_virtual_flt_config_ora_schema(ObTableSchema &table_s
|
||||
return ret;
|
||||
}
|
||||
|
||||
int ObInnerTableSchema::all_virtual_tenant_scheduler_job_run_detail_real_agent_ora_schema(ObTableSchema &table_schema)
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
uint64_t column_id = OB_APP_MIN_COLUMN_ID - 1;
|
||||
|
||||
//generated fields:
|
||||
table_schema.set_tenant_id(OB_SYS_TENANT_ID);
|
||||
table_schema.set_tablegroup_id(OB_INVALID_ID);
|
||||
table_schema.set_database_id(OB_ORA_SYS_DATABASE_ID);
|
||||
table_schema.set_table_id(OB_ALL_VIRTUAL_TENANT_SCHEDULER_JOB_RUN_DETAIL_REAL_AGENT_ORA_TID);
|
||||
table_schema.set_rowkey_split_pos(0);
|
||||
table_schema.set_is_use_bloomfilter(false);
|
||||
table_schema.set_progressive_merge_num(0);
|
||||
table_schema.set_rowkey_column_num(3);
|
||||
table_schema.set_load_type(TABLE_LOAD_TYPE_IN_DISK);
|
||||
table_schema.set_table_type(VIRTUAL_TABLE);
|
||||
table_schema.set_index_type(INDEX_TYPE_IS_NOT);
|
||||
table_schema.set_def_type(TABLE_DEF_TYPE_INTERNAL);
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
if (OB_FAIL(table_schema.set_table_name(OB_ALL_VIRTUAL_TENANT_SCHEDULER_JOB_RUN_DETAIL_REAL_AGENT_ORA_TNAME))) {
|
||||
LOG_ERROR("fail to set table_name", K(ret));
|
||||
}
|
||||
}
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
if (OB_FAIL(table_schema.set_compress_func_name(OB_DEFAULT_COMPRESS_FUNC_NAME))) {
|
||||
LOG_ERROR("fail to set compress_func_name", K(ret));
|
||||
}
|
||||
}
|
||||
table_schema.set_part_level(PARTITION_LEVEL_ZERO);
|
||||
table_schema.set_charset_type(ObCharset::get_default_charset());
|
||||
table_schema.set_collation_type(ObCollationType::CS_TYPE_UTF8MB4_BIN);
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
ADD_COLUMN_SCHEMA("TENANT_ID", //column_name
|
||||
++column_id, //column_id
|
||||
1, //rowkey_id
|
||||
0, //index_id
|
||||
0, //part_key_pos
|
||||
ObNumberType, //column_type
|
||||
CS_TYPE_INVALID, //column_collation_type
|
||||
38, //column_length
|
||||
38, //column_precision
|
||||
0, //column_scale
|
||||
false, //is_nullable
|
||||
false); //is_autoincrement
|
||||
}
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
ADD_COLUMN_SCHEMA("JOB", //column_name
|
||||
++column_id, //column_id
|
||||
2, //rowkey_id
|
||||
0, //index_id
|
||||
0, //part_key_pos
|
||||
ObNumberType, //column_type
|
||||
CS_TYPE_INVALID, //column_collation_type
|
||||
38, //column_length
|
||||
38, //column_precision
|
||||
0, //column_scale
|
||||
false, //is_nullable
|
||||
false); //is_autoincrement
|
||||
}
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
ADD_COLUMN_SCHEMA("TIME", //column_name
|
||||
++column_id, //column_id
|
||||
3, //rowkey_id
|
||||
0, //index_id
|
||||
0, //part_key_pos
|
||||
ObTimestampLTZType, //column_type
|
||||
CS_TYPE_INVALID, //column_collation_type
|
||||
0, //column_length
|
||||
-1, //column_precision
|
||||
-1, //column_scale
|
||||
false, //is_nullable
|
||||
false); //is_autoincrement
|
||||
}
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
ADD_COLUMN_SCHEMA("CODE", //column_name
|
||||
++column_id, //column_id
|
||||
0, //rowkey_id
|
||||
0, //index_id
|
||||
0, //part_key_pos
|
||||
ObNumberType, //column_type
|
||||
CS_TYPE_INVALID, //column_collation_type
|
||||
38, //column_length
|
||||
38, //column_precision
|
||||
0, //column_scale
|
||||
true, //is_nullable
|
||||
false); //is_autoincrement
|
||||
}
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
ADD_COLUMN_SCHEMA("MESSAGE", //column_name
|
||||
++column_id, //column_id
|
||||
0, //rowkey_id
|
||||
0, //index_id
|
||||
0, //part_key_pos
|
||||
ObVarcharType, //column_type
|
||||
CS_TYPE_UTF8MB4_BIN, //column_collation_type
|
||||
4000, //column_length
|
||||
2, //column_precision
|
||||
-1, //column_scale
|
||||
false, //is_nullable
|
||||
false); //is_autoincrement
|
||||
}
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
ADD_COLUMN_SCHEMA("JOB_CLASS", //column_name
|
||||
++column_id, //column_id
|
||||
0, //rowkey_id
|
||||
0, //index_id
|
||||
0, //part_key_pos
|
||||
ObVarcharType, //column_type
|
||||
CS_TYPE_UTF8MB4_BIN, //column_collation_type
|
||||
30, //column_length
|
||||
2, //column_precision
|
||||
-1, //column_scale
|
||||
true, //is_nullable
|
||||
false); //is_autoincrement
|
||||
}
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
ADD_COLUMN_SCHEMA("GMT_CREATE", //column_name
|
||||
++column_id, //column_id
|
||||
0, //rowkey_id
|
||||
0, //index_id
|
||||
0, //part_key_pos
|
||||
ObTimestampLTZType, //column_type
|
||||
CS_TYPE_INVALID, //column_collation_type
|
||||
0, //column_length
|
||||
-1, //column_precision
|
||||
-1, //column_scale
|
||||
false, //is_nullable
|
||||
false); //is_autoincrement
|
||||
}
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
ADD_COLUMN_SCHEMA("GMT_MODIFIED", //column_name
|
||||
++column_id, //column_id
|
||||
0, //rowkey_id
|
||||
0, //index_id
|
||||
0, //part_key_pos
|
||||
ObTimestampLTZType, //column_type
|
||||
CS_TYPE_INVALID, //column_collation_type
|
||||
0, //column_length
|
||||
-1, //column_precision
|
||||
-1, //column_scale
|
||||
false, //is_nullable
|
||||
false); //is_autoincrement
|
||||
}
|
||||
table_schema.set_index_using_type(USING_BTREE);
|
||||
table_schema.set_row_store_type(ENCODING_ROW_STORE);
|
||||
table_schema.set_store_format(OB_STORE_FORMAT_DYNAMIC_MYSQL);
|
||||
table_schema.set_progressive_merge_round(1);
|
||||
table_schema.set_storage_format_version(3);
|
||||
table_schema.set_tablet_id(0);
|
||||
|
||||
table_schema.set_max_used_column_id(column_id);
|
||||
return ret;
|
||||
}
|
||||
|
||||
int ObInnerTableSchema::all_virtual_tenant_scheduler_job_class_real_agent_ora_schema(ObTableSchema &table_schema)
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
uint64_t column_id = OB_APP_MIN_COLUMN_ID - 1;
|
||||
|
||||
//generated fields:
|
||||
table_schema.set_tenant_id(OB_SYS_TENANT_ID);
|
||||
table_schema.set_tablegroup_id(OB_INVALID_ID);
|
||||
table_schema.set_database_id(OB_ORA_SYS_DATABASE_ID);
|
||||
table_schema.set_table_id(OB_ALL_VIRTUAL_TENANT_SCHEDULER_JOB_CLASS_REAL_AGENT_ORA_TID);
|
||||
table_schema.set_rowkey_split_pos(0);
|
||||
table_schema.set_is_use_bloomfilter(false);
|
||||
table_schema.set_progressive_merge_num(0);
|
||||
table_schema.set_rowkey_column_num(2);
|
||||
table_schema.set_load_type(TABLE_LOAD_TYPE_IN_DISK);
|
||||
table_schema.set_table_type(VIRTUAL_TABLE);
|
||||
table_schema.set_index_type(INDEX_TYPE_IS_NOT);
|
||||
table_schema.set_def_type(TABLE_DEF_TYPE_INTERNAL);
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
if (OB_FAIL(table_schema.set_table_name(OB_ALL_VIRTUAL_TENANT_SCHEDULER_JOB_CLASS_REAL_AGENT_ORA_TNAME))) {
|
||||
LOG_ERROR("fail to set table_name", K(ret));
|
||||
}
|
||||
}
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
if (OB_FAIL(table_schema.set_compress_func_name(OB_DEFAULT_COMPRESS_FUNC_NAME))) {
|
||||
LOG_ERROR("fail to set compress_func_name", K(ret));
|
||||
}
|
||||
}
|
||||
table_schema.set_part_level(PARTITION_LEVEL_ZERO);
|
||||
table_schema.set_charset_type(ObCharset::get_default_charset());
|
||||
table_schema.set_collation_type(ObCollationType::CS_TYPE_UTF8MB4_BIN);
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
ADD_COLUMN_SCHEMA("TENANT_ID", //column_name
|
||||
++column_id, //column_id
|
||||
1, //rowkey_id
|
||||
0, //index_id
|
||||
0, //part_key_pos
|
||||
ObNumberType, //column_type
|
||||
CS_TYPE_INVALID, //column_collation_type
|
||||
38, //column_length
|
||||
38, //column_precision
|
||||
0, //column_scale
|
||||
false, //is_nullable
|
||||
false); //is_autoincrement
|
||||
}
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
ADD_COLUMN_SCHEMA("JOB_CLASS_NAME", //column_name
|
||||
++column_id, //column_id
|
||||
2, //rowkey_id
|
||||
0, //index_id
|
||||
0, //part_key_pos
|
||||
ObVarcharType, //column_type
|
||||
CS_TYPE_UTF8MB4_BIN, //column_collation_type
|
||||
30, //column_length
|
||||
2, //column_precision
|
||||
-1, //column_scale
|
||||
false, //is_nullable
|
||||
false); //is_autoincrement
|
||||
}
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
ADD_COLUMN_SCHEMA("RESOURCE_CONSUMER_GROUP", //column_name
|
||||
++column_id, //column_id
|
||||
0, //rowkey_id
|
||||
0, //index_id
|
||||
0, //part_key_pos
|
||||
ObVarcharType, //column_type
|
||||
CS_TYPE_UTF8MB4_BIN, //column_collation_type
|
||||
30, //column_length
|
||||
2, //column_precision
|
||||
-1, //column_scale
|
||||
true, //is_nullable
|
||||
false); //is_autoincrement
|
||||
}
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
ADD_COLUMN_SCHEMA("SERVICE", //column_name
|
||||
++column_id, //column_id
|
||||
0, //rowkey_id
|
||||
0, //index_id
|
||||
0, //part_key_pos
|
||||
ObVarcharType, //column_type
|
||||
CS_TYPE_UTF8MB4_BIN, //column_collation_type
|
||||
64, //column_length
|
||||
2, //column_precision
|
||||
-1, //column_scale
|
||||
true, //is_nullable
|
||||
false); //is_autoincrement
|
||||
}
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
ADD_COLUMN_SCHEMA("LOGGING_LEVEL", //column_name
|
||||
++column_id, //column_id
|
||||
0, //rowkey_id
|
||||
0, //index_id
|
||||
0, //part_key_pos
|
||||
ObVarcharType, //column_type
|
||||
CS_TYPE_UTF8MB4_BIN, //column_collation_type
|
||||
11, //column_length
|
||||
2, //column_precision
|
||||
-1, //column_scale
|
||||
true, //is_nullable
|
||||
false); //is_autoincrement
|
||||
}
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
ADD_COLUMN_SCHEMA("LOG_HISTORY", //column_name
|
||||
++column_id, //column_id
|
||||
0, //rowkey_id
|
||||
0, //index_id
|
||||
0, //part_key_pos
|
||||
ObNumberType, //column_type
|
||||
CS_TYPE_INVALID, //column_collation_type
|
||||
38, //column_length
|
||||
38, //column_precision
|
||||
0, //column_scale
|
||||
true, //is_nullable
|
||||
false); //is_autoincrement
|
||||
}
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
ADD_COLUMN_SCHEMA("COMMENTS", //column_name
|
||||
++column_id, //column_id
|
||||
0, //rowkey_id
|
||||
0, //index_id
|
||||
0, //part_key_pos
|
||||
ObVarcharType, //column_type
|
||||
CS_TYPE_UTF8MB4_BIN, //column_collation_type
|
||||
240, //column_length
|
||||
2, //column_precision
|
||||
-1, //column_scale
|
||||
true, //is_nullable
|
||||
false); //is_autoincrement
|
||||
}
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
ADD_COLUMN_SCHEMA("GMT_CREATE", //column_name
|
||||
++column_id, //column_id
|
||||
0, //rowkey_id
|
||||
0, //index_id
|
||||
0, //part_key_pos
|
||||
ObTimestampLTZType, //column_type
|
||||
CS_TYPE_INVALID, //column_collation_type
|
||||
0, //column_length
|
||||
-1, //column_precision
|
||||
-1, //column_scale
|
||||
false, //is_nullable
|
||||
false); //is_autoincrement
|
||||
}
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
ADD_COLUMN_SCHEMA("GMT_MODIFIED", //column_name
|
||||
++column_id, //column_id
|
||||
0, //rowkey_id
|
||||
0, //index_id
|
||||
0, //part_key_pos
|
||||
ObTimestampLTZType, //column_type
|
||||
CS_TYPE_INVALID, //column_collation_type
|
||||
0, //column_length
|
||||
-1, //column_precision
|
||||
-1, //column_scale
|
||||
false, //is_nullable
|
||||
false); //is_autoincrement
|
||||
}
|
||||
table_schema.set_index_using_type(USING_BTREE);
|
||||
table_schema.set_row_store_type(ENCODING_ROW_STORE);
|
||||
table_schema.set_store_format(OB_STORE_FORMAT_DYNAMIC_MYSQL);
|
||||
table_schema.set_progressive_merge_round(1);
|
||||
table_schema.set_storage_format_version(3);
|
||||
table_schema.set_tablet_id(0);
|
||||
|
||||
table_schema.set_max_used_column_id(column_id);
|
||||
return ret;
|
||||
}
|
||||
|
||||
int ObInnerTableSchema::all_virtual_ls_info_ora_schema(ObTableSchema &table_schema)
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
|
@ -225,6 +225,106 @@ int ObInnerTableSchema::dba_ob_tenant_event_history_ora_schema(ObTableSchema &ta
|
||||
return ret;
|
||||
}
|
||||
|
||||
int ObInnerTableSchema::dba_scheduler_job_run_details_ora_schema(ObTableSchema &table_schema)
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
uint64_t column_id = OB_APP_MIN_COLUMN_ID - 1;
|
||||
|
||||
//generated fields:
|
||||
table_schema.set_tenant_id(OB_SYS_TENANT_ID);
|
||||
table_schema.set_tablegroup_id(OB_INVALID_ID);
|
||||
table_schema.set_database_id(OB_ORA_SYS_DATABASE_ID);
|
||||
table_schema.set_table_id(OB_DBA_SCHEDULER_JOB_RUN_DETAILS_ORA_TID);
|
||||
table_schema.set_rowkey_split_pos(0);
|
||||
table_schema.set_is_use_bloomfilter(false);
|
||||
table_schema.set_progressive_merge_num(0);
|
||||
table_schema.set_rowkey_column_num(0);
|
||||
table_schema.set_load_type(TABLE_LOAD_TYPE_IN_DISK);
|
||||
table_schema.set_table_type(SYSTEM_VIEW);
|
||||
table_schema.set_index_type(INDEX_TYPE_IS_NOT);
|
||||
table_schema.set_def_type(TABLE_DEF_TYPE_INTERNAL);
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
if (OB_FAIL(table_schema.set_table_name(OB_DBA_SCHEDULER_JOB_RUN_DETAILS_ORA_TNAME))) {
|
||||
LOG_ERROR("fail to set table_name", K(ret));
|
||||
}
|
||||
}
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
if (OB_FAIL(table_schema.set_compress_func_name(OB_DEFAULT_COMPRESS_FUNC_NAME))) {
|
||||
LOG_ERROR("fail to set compress_func_name", K(ret));
|
||||
}
|
||||
}
|
||||
table_schema.set_part_level(PARTITION_LEVEL_ZERO);
|
||||
table_schema.set_charset_type(ObCharset::get_default_charset());
|
||||
table_schema.set_collation_type(ObCharset::get_default_collation(ObCharset::get_default_charset()));
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
if (OB_FAIL(table_schema.set_view_definition(R"__(SELECT * FROM SYS.ALL_VIRTUAL_TENANT_SCHEDULER_JOB_RUN_DETAIL_REAL_AGENT T )__"))) {
|
||||
LOG_ERROR("fail to set view_definition", K(ret));
|
||||
}
|
||||
}
|
||||
table_schema.set_index_using_type(USING_BTREE);
|
||||
table_schema.set_row_store_type(ENCODING_ROW_STORE);
|
||||
table_schema.set_store_format(OB_STORE_FORMAT_DYNAMIC_MYSQL);
|
||||
table_schema.set_progressive_merge_round(1);
|
||||
table_schema.set_storage_format_version(3);
|
||||
table_schema.set_tablet_id(0);
|
||||
|
||||
table_schema.set_max_used_column_id(column_id);
|
||||
return ret;
|
||||
}
|
||||
|
||||
int ObInnerTableSchema::dba_scheduler_job_classes_schema(ObTableSchema &table_schema)
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
uint64_t column_id = OB_APP_MIN_COLUMN_ID - 1;
|
||||
|
||||
//generated fields:
|
||||
table_schema.set_tenant_id(OB_SYS_TENANT_ID);
|
||||
table_schema.set_tablegroup_id(OB_INVALID_ID);
|
||||
table_schema.set_database_id(OB_ORA_SYS_DATABASE_ID);
|
||||
table_schema.set_table_id(OB_DBA_SCHEDULER_JOB_CLASSES_TID);
|
||||
table_schema.set_rowkey_split_pos(0);
|
||||
table_schema.set_is_use_bloomfilter(false);
|
||||
table_schema.set_progressive_merge_num(0);
|
||||
table_schema.set_rowkey_column_num(0);
|
||||
table_schema.set_load_type(TABLE_LOAD_TYPE_IN_DISK);
|
||||
table_schema.set_table_type(SYSTEM_VIEW);
|
||||
table_schema.set_index_type(INDEX_TYPE_IS_NOT);
|
||||
table_schema.set_def_type(TABLE_DEF_TYPE_INTERNAL);
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
if (OB_FAIL(table_schema.set_table_name(OB_DBA_SCHEDULER_JOB_CLASSES_TNAME))) {
|
||||
LOG_ERROR("fail to set table_name", K(ret));
|
||||
}
|
||||
}
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
if (OB_FAIL(table_schema.set_compress_func_name(OB_DEFAULT_COMPRESS_FUNC_NAME))) {
|
||||
LOG_ERROR("fail to set compress_func_name", K(ret));
|
||||
}
|
||||
}
|
||||
table_schema.set_part_level(PARTITION_LEVEL_ZERO);
|
||||
table_schema.set_charset_type(ObCharset::get_default_charset());
|
||||
table_schema.set_collation_type(ObCharset::get_default_collation(ObCharset::get_default_charset()));
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
if (OB_FAIL(table_schema.set_view_definition(R"__(SELECT T.JOB_CLASS_NAME AS JOB_CLASS_NAME, T.RESOURCE_CONSUMER_GROUP AS RESOURCE_CONSUMER_GROUP, T.SERVICE AS SERVICE, T.LOGGING_LEVEL AS LOGGING_LEVEL, T.LOG_HISTORY AS LOG_HISTORY, T.COMMENTS AS COMMENTS FROM SYS.ALL_VIRTUAL_TENANT_SCHEDULER_JOB_CLASS_REAL_AGENT T )__"))) {
|
||||
LOG_ERROR("fail to set view_definition", K(ret));
|
||||
}
|
||||
}
|
||||
table_schema.set_index_using_type(USING_BTREE);
|
||||
table_schema.set_row_store_type(ENCODING_ROW_STORE);
|
||||
table_schema.set_store_format(OB_STORE_FORMAT_DYNAMIC_MYSQL);
|
||||
table_schema.set_progressive_merge_round(1);
|
||||
table_schema.set_storage_format_version(3);
|
||||
table_schema.set_tablet_id(0);
|
||||
|
||||
table_schema.set_max_used_column_id(column_id);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
} // end namespace share
|
||||
} // end namespace oceanbase
|
||||
|
@ -8807,6 +8807,21 @@ int ObInnerTableSchema::all_tenant_scheduler_job_run_detail_schema(ObTableSchema
|
||||
false, //is_nullable
|
||||
false); //is_autoincrement
|
||||
}
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
ADD_COLUMN_SCHEMA("job_class", //column_name
|
||||
++column_id, //column_id
|
||||
0, //rowkey_id
|
||||
0, //index_id
|
||||
0, //part_key_pos
|
||||
ObVarcharType, //column_type
|
||||
CS_TYPE_INVALID, //column_collation_type
|
||||
30, //column_length
|
||||
-1, //column_precision
|
||||
-1, //column_scale
|
||||
true, //is_nullable
|
||||
false); //is_autoincrement
|
||||
}
|
||||
table_schema.set_index_using_type(USING_BTREE);
|
||||
table_schema.set_row_store_type(ENCODING_ROW_STORE);
|
||||
table_schema.set_store_format(OB_STORE_FORMAT_DYNAMIC_MYSQL);
|
||||
|
@ -2549,6 +2549,203 @@ int ObInnerTableSchema::all_tenant_event_history_schema(ObTableSchema &table_sch
|
||||
return ret;
|
||||
}
|
||||
|
||||
int ObInnerTableSchema::all_tenant_scheduler_job_class_schema(ObTableSchema &table_schema)
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
uint64_t column_id = OB_APP_MIN_COLUMN_ID - 1;
|
||||
|
||||
//generated fields:
|
||||
table_schema.set_tenant_id(OB_SYS_TENANT_ID);
|
||||
table_schema.set_tablegroup_id(OB_SYS_TABLEGROUP_ID);
|
||||
table_schema.set_database_id(OB_SYS_DATABASE_ID);
|
||||
table_schema.set_table_id(OB_ALL_TENANT_SCHEDULER_JOB_CLASS_TID);
|
||||
table_schema.set_rowkey_split_pos(0);
|
||||
table_schema.set_is_use_bloomfilter(false);
|
||||
table_schema.set_progressive_merge_num(0);
|
||||
table_schema.set_rowkey_column_num(2);
|
||||
table_schema.set_load_type(TABLE_LOAD_TYPE_IN_DISK);
|
||||
table_schema.set_table_type(SYSTEM_TABLE);
|
||||
table_schema.set_index_type(INDEX_TYPE_IS_NOT);
|
||||
table_schema.set_def_type(TABLE_DEF_TYPE_INTERNAL);
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
if (OB_FAIL(table_schema.set_table_name(OB_ALL_TENANT_SCHEDULER_JOB_CLASS_TNAME))) {
|
||||
LOG_ERROR("fail to set table_name", K(ret));
|
||||
}
|
||||
}
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
if (OB_FAIL(table_schema.set_compress_func_name(OB_DEFAULT_COMPRESS_FUNC_NAME))) {
|
||||
LOG_ERROR("fail to set compress_func_name", K(ret));
|
||||
}
|
||||
}
|
||||
table_schema.set_part_level(PARTITION_LEVEL_ZERO);
|
||||
table_schema.set_charset_type(ObCharset::get_default_charset());
|
||||
table_schema.set_collation_type(ObCharset::get_default_collation(ObCharset::get_default_charset()));
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
ObObj gmt_create_default;
|
||||
ObObj gmt_create_default_null;
|
||||
|
||||
gmt_create_default.set_ext(ObActionFlag::OP_DEFAULT_NOW_FLAG);
|
||||
gmt_create_default_null.set_null();
|
||||
ADD_COLUMN_SCHEMA_TS_T("gmt_create", //column_name
|
||||
++column_id, //column_id
|
||||
0, //rowkey_id
|
||||
0, //index_id
|
||||
0, //part_key_pos
|
||||
ObTimestampType, //column_type
|
||||
CS_TYPE_BINARY,//collation_type
|
||||
0, //column length
|
||||
-1, //column_precision
|
||||
6, //column_scale
|
||||
true,//is nullable
|
||||
false, //is_autoincrement
|
||||
false, //is_on_update_for_timestamp
|
||||
gmt_create_default_null,
|
||||
gmt_create_default)
|
||||
}
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
ObObj gmt_modified_default;
|
||||
ObObj gmt_modified_default_null;
|
||||
|
||||
gmt_modified_default.set_ext(ObActionFlag::OP_DEFAULT_NOW_FLAG);
|
||||
gmt_modified_default_null.set_null();
|
||||
ADD_COLUMN_SCHEMA_TS_T("gmt_modified", //column_name
|
||||
++column_id, //column_id
|
||||
0, //rowkey_id
|
||||
0, //index_id
|
||||
0, //part_key_pos
|
||||
ObTimestampType, //column_type
|
||||
CS_TYPE_BINARY,//collation_type
|
||||
0, //column length
|
||||
-1, //column_precision
|
||||
6, //column_scale
|
||||
true,//is nullable
|
||||
false, //is_autoincrement
|
||||
true, //is_on_update_for_timestamp
|
||||
gmt_modified_default_null,
|
||||
gmt_modified_default)
|
||||
}
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
ADD_COLUMN_SCHEMA("tenant_id", //column_name
|
||||
++column_id, //column_id
|
||||
1, //rowkey_id
|
||||
0, //index_id
|
||||
0, //part_key_pos
|
||||
ObIntType, //column_type
|
||||
CS_TYPE_INVALID, //column_collation_type
|
||||
sizeof(int64_t), //column_length
|
||||
-1, //column_precision
|
||||
-1, //column_scale
|
||||
false, //is_nullable
|
||||
false); //is_autoincrement
|
||||
}
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
ADD_COLUMN_SCHEMA("job_class_name", //column_name
|
||||
++column_id, //column_id
|
||||
2, //rowkey_id
|
||||
0, //index_id
|
||||
0, //part_key_pos
|
||||
ObVarcharType, //column_type
|
||||
CS_TYPE_INVALID, //column_collation_type
|
||||
30, //column_length
|
||||
-1, //column_precision
|
||||
-1, //column_scale
|
||||
false, //is_nullable
|
||||
false); //is_autoincrement
|
||||
}
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
ADD_COLUMN_SCHEMA("resource_consumer_group", //column_name
|
||||
++column_id, //column_id
|
||||
0, //rowkey_id
|
||||
0, //index_id
|
||||
0, //part_key_pos
|
||||
ObVarcharType, //column_type
|
||||
CS_TYPE_INVALID, //column_collation_type
|
||||
30, //column_length
|
||||
-1, //column_precision
|
||||
-1, //column_scale
|
||||
true, //is_nullable
|
||||
false); //is_autoincrement
|
||||
}
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
ADD_COLUMN_SCHEMA("service", //column_name
|
||||
++column_id, //column_id
|
||||
0, //rowkey_id
|
||||
0, //index_id
|
||||
0, //part_key_pos
|
||||
ObVarcharType, //column_type
|
||||
CS_TYPE_INVALID, //column_collation_type
|
||||
64, //column_length
|
||||
-1, //column_precision
|
||||
-1, //column_scale
|
||||
true, //is_nullable
|
||||
false); //is_autoincrement
|
||||
}
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
ADD_COLUMN_SCHEMA("logging_level", //column_name
|
||||
++column_id, //column_id
|
||||
0, //rowkey_id
|
||||
0, //index_id
|
||||
0, //part_key_pos
|
||||
ObVarcharType, //column_type
|
||||
CS_TYPE_INVALID, //column_collation_type
|
||||
11, //column_length
|
||||
-1, //column_precision
|
||||
-1, //column_scale
|
||||
true, //is_nullable
|
||||
false); //is_autoincrement
|
||||
}
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
ADD_COLUMN_SCHEMA("log_history", //column_name
|
||||
++column_id, //column_id
|
||||
0, //rowkey_id
|
||||
0, //index_id
|
||||
0, //part_key_pos
|
||||
ObNumberType, //column_type
|
||||
CS_TYPE_INVALID, //column_collation_type
|
||||
38, //column_length
|
||||
38, //column_precision
|
||||
0, //column_scale
|
||||
true, //is_nullable
|
||||
false); //is_autoincrement
|
||||
}
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
ADD_COLUMN_SCHEMA("comments", //column_name
|
||||
++column_id, //column_id
|
||||
0, //rowkey_id
|
||||
0, //index_id
|
||||
0, //part_key_pos
|
||||
ObVarcharType, //column_type
|
||||
CS_TYPE_INVALID, //column_collation_type
|
||||
240, //column_length
|
||||
-1, //column_precision
|
||||
-1, //column_scale
|
||||
true, //is_nullable
|
||||
false); //is_autoincrement
|
||||
}
|
||||
table_schema.set_index_using_type(USING_BTREE);
|
||||
table_schema.set_row_store_type(ENCODING_ROW_STORE);
|
||||
table_schema.set_store_format(OB_STORE_FORMAT_DYNAMIC_MYSQL);
|
||||
table_schema.set_progressive_merge_round(1);
|
||||
table_schema.set_storage_format_version(3);
|
||||
table_schema.set_tablet_id(OB_ALL_TENANT_SCHEDULER_JOB_CLASS_TID);
|
||||
table_schema.set_aux_lob_meta_tid(OB_ALL_TENANT_SCHEDULER_JOB_CLASS_AUX_LOB_META_TID);
|
||||
table_schema.set_aux_lob_piece_tid(OB_ALL_TENANT_SCHEDULER_JOB_CLASS_AUX_LOB_PIECE_TID);
|
||||
|
||||
table_schema.set_max_used_column_id(column_id);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
} // end namespace share
|
||||
} // end namespace oceanbase
|
||||
|
@ -1510,6 +1510,141 @@ int ObInnerTableSchema::all_tenant_event_history_aux_lob_meta_schema(ObTableSche
|
||||
return ret;
|
||||
}
|
||||
|
||||
int ObInnerTableSchema::all_tenant_scheduler_job_class_aux_lob_meta_schema(ObTableSchema &table_schema)
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
uint64_t column_id = OB_APP_MIN_COLUMN_ID - 1;
|
||||
|
||||
//generated fields:
|
||||
table_schema.set_tenant_id(OB_SYS_TENANT_ID);
|
||||
table_schema.set_tablegroup_id(OB_SYS_TABLEGROUP_ID);
|
||||
table_schema.set_database_id(OB_SYS_DATABASE_ID);
|
||||
table_schema.set_table_id(OB_ALL_TENANT_SCHEDULER_JOB_CLASS_AUX_LOB_META_TID);
|
||||
table_schema.set_rowkey_split_pos(0);
|
||||
table_schema.set_is_use_bloomfilter(false);
|
||||
table_schema.set_progressive_merge_num(0);
|
||||
table_schema.set_rowkey_column_num(2);
|
||||
table_schema.set_load_type(TABLE_LOAD_TYPE_IN_DISK);
|
||||
table_schema.set_table_type(AUX_LOB_META);
|
||||
table_schema.set_index_type(INDEX_TYPE_IS_NOT);
|
||||
table_schema.set_def_type(TABLE_DEF_TYPE_INTERNAL);
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
if (OB_FAIL(table_schema.set_table_name(OB_ALL_TENANT_SCHEDULER_JOB_CLASS_AUX_LOB_META_TNAME))) {
|
||||
LOG_ERROR("fail to set table_name", K(ret));
|
||||
}
|
||||
}
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
if (OB_FAIL(table_schema.set_compress_func_name(OB_DEFAULT_COMPRESS_FUNC_NAME))) {
|
||||
LOG_ERROR("fail to set compress_func_name", K(ret));
|
||||
}
|
||||
}
|
||||
table_schema.set_part_level(PARTITION_LEVEL_ZERO);
|
||||
table_schema.set_charset_type(ObCharset::get_default_charset());
|
||||
table_schema.set_collation_type(ObCharset::get_default_collation(ObCharset::get_default_charset()));
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
ADD_COLUMN_SCHEMA("lob_id", //column_name
|
||||
++column_id, //column_id
|
||||
1, //rowkey_id
|
||||
0, //index_id
|
||||
0, //part_key_pos
|
||||
ObVarcharType, //column_type
|
||||
CS_TYPE_BINARY, //column_collation_type
|
||||
16, //column_length
|
||||
-1, //column_precision
|
||||
-1, //column_scale
|
||||
false, //is_nullable
|
||||
false); //is_autoincrement
|
||||
}
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
ADD_COLUMN_SCHEMA("seq_id", //column_name
|
||||
++column_id, //column_id
|
||||
2, //rowkey_id
|
||||
0, //index_id
|
||||
0, //part_key_pos
|
||||
ObVarcharType, //column_type
|
||||
CS_TYPE_BINARY, //column_collation_type
|
||||
8192, //column_length
|
||||
-1, //column_precision
|
||||
-1, //column_scale
|
||||
false, //is_nullable
|
||||
false); //is_autoincrement
|
||||
}
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
ADD_COLUMN_SCHEMA("binary_len", //column_name
|
||||
++column_id, //column_id
|
||||
0, //rowkey_id
|
||||
0, //index_id
|
||||
0, //part_key_pos
|
||||
ObUInt32Type, //column_type
|
||||
CS_TYPE_INVALID, //column_collation_type
|
||||
sizeof(uint32_t), //column_length
|
||||
-1, //column_precision
|
||||
-1, //column_scale
|
||||
false, //is_nullable
|
||||
false); //is_autoincrement
|
||||
}
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
ADD_COLUMN_SCHEMA("char_len", //column_name
|
||||
++column_id, //column_id
|
||||
0, //rowkey_id
|
||||
0, //index_id
|
||||
0, //part_key_pos
|
||||
ObUInt32Type, //column_type
|
||||
CS_TYPE_INVALID, //column_collation_type
|
||||
sizeof(uint32_t), //column_length
|
||||
-1, //column_precision
|
||||
-1, //column_scale
|
||||
false, //is_nullable
|
||||
false); //is_autoincrement
|
||||
}
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
ADD_COLUMN_SCHEMA("piece_id", //column_name
|
||||
++column_id, //column_id
|
||||
0, //rowkey_id
|
||||
0, //index_id
|
||||
0, //part_key_pos
|
||||
ObUInt64Type, //column_type
|
||||
CS_TYPE_INVALID, //column_collation_type
|
||||
sizeof(uint64_t), //column_length
|
||||
-1, //column_precision
|
||||
-1, //column_scale
|
||||
false, //is_nullable
|
||||
false); //is_autoincrement
|
||||
}
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
ADD_COLUMN_SCHEMA("lob_data", //column_name
|
||||
++column_id, //column_id
|
||||
0, //rowkey_id
|
||||
0, //index_id
|
||||
0, //part_key_pos
|
||||
ObVarcharType, //column_type
|
||||
CS_TYPE_BINARY, //column_collation_type
|
||||
262144, //column_length
|
||||
-1, //column_precision
|
||||
-1, //column_scale
|
||||
false, //is_nullable
|
||||
false); //is_autoincrement
|
||||
}
|
||||
table_schema.set_index_using_type(USING_BTREE);
|
||||
table_schema.set_row_store_type(ENCODING_ROW_STORE);
|
||||
table_schema.set_store_format(OB_STORE_FORMAT_DYNAMIC_MYSQL);
|
||||
table_schema.set_progressive_merge_round(1);
|
||||
table_schema.set_storage_format_version(3);
|
||||
table_schema.set_tablet_id(OB_ALL_TENANT_SCHEDULER_JOB_CLASS_AUX_LOB_META_TID);
|
||||
table_schema.set_data_table_id(OB_ALL_TENANT_SCHEDULER_JOB_CLASS_TID);
|
||||
|
||||
table_schema.set_max_used_column_id(column_id);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
} // end namespace share
|
||||
} // end namespace oceanbase
|
||||
|
@ -1015,6 +1015,96 @@ int ObInnerTableSchema::all_tenant_event_history_aux_lob_piece_schema(ObTableSch
|
||||
return ret;
|
||||
}
|
||||
|
||||
int ObInnerTableSchema::all_tenant_scheduler_job_class_aux_lob_piece_schema(ObTableSchema &table_schema)
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
uint64_t column_id = OB_APP_MIN_COLUMN_ID - 1;
|
||||
|
||||
//generated fields:
|
||||
table_schema.set_tenant_id(OB_SYS_TENANT_ID);
|
||||
table_schema.set_tablegroup_id(OB_SYS_TABLEGROUP_ID);
|
||||
table_schema.set_database_id(OB_SYS_DATABASE_ID);
|
||||
table_schema.set_table_id(OB_ALL_TENANT_SCHEDULER_JOB_CLASS_AUX_LOB_PIECE_TID);
|
||||
table_schema.set_rowkey_split_pos(0);
|
||||
table_schema.set_is_use_bloomfilter(false);
|
||||
table_schema.set_progressive_merge_num(0);
|
||||
table_schema.set_rowkey_column_num(1);
|
||||
table_schema.set_load_type(TABLE_LOAD_TYPE_IN_DISK);
|
||||
table_schema.set_table_type(AUX_LOB_PIECE);
|
||||
table_schema.set_index_type(INDEX_TYPE_IS_NOT);
|
||||
table_schema.set_def_type(TABLE_DEF_TYPE_INTERNAL);
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
if (OB_FAIL(table_schema.set_table_name(OB_ALL_TENANT_SCHEDULER_JOB_CLASS_AUX_LOB_PIECE_TNAME))) {
|
||||
LOG_ERROR("fail to set table_name", K(ret));
|
||||
}
|
||||
}
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
if (OB_FAIL(table_schema.set_compress_func_name(OB_DEFAULT_COMPRESS_FUNC_NAME))) {
|
||||
LOG_ERROR("fail to set compress_func_name", K(ret));
|
||||
}
|
||||
}
|
||||
table_schema.set_part_level(PARTITION_LEVEL_ZERO);
|
||||
table_schema.set_charset_type(ObCharset::get_default_charset());
|
||||
table_schema.set_collation_type(ObCharset::get_default_collation(ObCharset::get_default_charset()));
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
ADD_COLUMN_SCHEMA("piece_id", //column_name
|
||||
++column_id, //column_id
|
||||
1, //rowkey_id
|
||||
0, //index_id
|
||||
0, //part_key_pos
|
||||
ObUInt64Type, //column_type
|
||||
CS_TYPE_INVALID, //column_collation_type
|
||||
sizeof(uint64_t), //column_length
|
||||
-1, //column_precision
|
||||
-1, //column_scale
|
||||
false, //is_nullable
|
||||
false); //is_autoincrement
|
||||
}
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
ADD_COLUMN_SCHEMA("data_len", //column_name
|
||||
++column_id, //column_id
|
||||
0, //rowkey_id
|
||||
0, //index_id
|
||||
0, //part_key_pos
|
||||
ObUInt32Type, //column_type
|
||||
CS_TYPE_INVALID, //column_collation_type
|
||||
sizeof(uint32_t), //column_length
|
||||
-1, //column_precision
|
||||
-1, //column_scale
|
||||
false, //is_nullable
|
||||
false); //is_autoincrement
|
||||
}
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
ADD_COLUMN_SCHEMA("lob_data", //column_name
|
||||
++column_id, //column_id
|
||||
0, //rowkey_id
|
||||
0, //index_id
|
||||
0, //part_key_pos
|
||||
ObVarcharType, //column_type
|
||||
CS_TYPE_BINARY, //column_collation_type
|
||||
32, //column_length
|
||||
-1, //column_precision
|
||||
-1, //column_scale
|
||||
false, //is_nullable
|
||||
false); //is_autoincrement
|
||||
}
|
||||
table_schema.set_index_using_type(USING_BTREE);
|
||||
table_schema.set_row_store_type(ENCODING_ROW_STORE);
|
||||
table_schema.set_store_format(OB_STORE_FORMAT_DYNAMIC_MYSQL);
|
||||
table_schema.set_progressive_merge_round(1);
|
||||
table_schema.set_storage_format_version(3);
|
||||
table_schema.set_tablet_id(OB_ALL_TENANT_SCHEDULER_JOB_CLASS_AUX_LOB_PIECE_TID);
|
||||
table_schema.set_data_table_id(OB_ALL_TENANT_SCHEDULER_JOB_CLASS_TID);
|
||||
|
||||
table_schema.set_max_used_column_id(column_id);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
} // end namespace share
|
||||
} // end namespace oceanbase
|
||||
|
@ -537,6 +537,7 @@ public:
|
||||
static int all_dbms_lock_allocated_schema(share::schema::ObTableSchema &table_schema);
|
||||
static int wr_control_schema(share::schema::ObTableSchema &table_schema);
|
||||
static int all_tenant_event_history_schema(share::schema::ObTableSchema &table_schema);
|
||||
static int all_tenant_scheduler_job_class_schema(share::schema::ObTableSchema &table_schema);
|
||||
static int tenant_virtual_all_table_schema(share::schema::ObTableSchema &table_schema);
|
||||
static int tenant_virtual_table_column_schema(share::schema::ObTableSchema &table_schema);
|
||||
static int tenant_virtual_table_index_schema(share::schema::ObTableSchema &table_schema);
|
||||
@ -925,6 +926,7 @@ public:
|
||||
static int all_virtual_balance_task_helper_schema(share::schema::ObTableSchema &table_schema);
|
||||
static int all_virtual_balance_group_ls_stat_schema(share::schema::ObTableSchema &table_schema);
|
||||
static int all_virtual_flt_config_schema(share::schema::ObTableSchema &table_schema);
|
||||
static int all_virtual_tenant_scheduler_job_class_schema(share::schema::ObTableSchema &table_schema);
|
||||
static int all_virtual_sql_audit_ora_schema(share::schema::ObTableSchema &table_schema);
|
||||
static int all_virtual_plan_stat_ora_schema(share::schema::ObTableSchema &table_schema);
|
||||
static int all_virtual_plan_cache_plan_explain_ora_schema(share::schema::ObTableSchema &table_schema);
|
||||
@ -1164,6 +1166,8 @@ public:
|
||||
static int all_virtual_tenant_event_history_ora_schema(share::schema::ObTableSchema &table_schema);
|
||||
static int all_virtual_ls_real_agent_ora_schema(share::schema::ObTableSchema &table_schema);
|
||||
static int all_virtual_flt_config_ora_schema(share::schema::ObTableSchema &table_schema);
|
||||
static int all_virtual_tenant_scheduler_job_run_detail_real_agent_ora_schema(share::schema::ObTableSchema &table_schema);
|
||||
static int all_virtual_tenant_scheduler_job_class_real_agent_ora_schema(share::schema::ObTableSchema &table_schema);
|
||||
static int all_virtual_ls_info_ora_schema(share::schema::ObTableSchema &table_schema);
|
||||
static int gv_ob_plan_cache_stat_schema(share::schema::ObTableSchema &table_schema);
|
||||
static int gv_ob_plan_cache_plan_stat_schema(share::schema::ObTableSchema &table_schema);
|
||||
@ -1758,6 +1762,8 @@ public:
|
||||
static int dba_wr_control_ora_schema(share::schema::ObTableSchema &table_schema);
|
||||
static int dba_ob_ls_history_ora_schema(share::schema::ObTableSchema &table_schema);
|
||||
static int dba_ob_tenant_event_history_ora_schema(share::schema::ObTableSchema &table_schema);
|
||||
static int dba_scheduler_job_run_details_ora_schema(share::schema::ObTableSchema &table_schema);
|
||||
static int dba_scheduler_job_classes_schema(share::schema::ObTableSchema &table_schema);
|
||||
static int gv_ob_sql_audit_ora_schema(share::schema::ObTableSchema &table_schema);
|
||||
static int v_ob_sql_audit_ora_schema(share::schema::ObTableSchema &table_schema);
|
||||
static int gv_instance_schema(share::schema::ObTableSchema &table_schema);
|
||||
@ -2176,6 +2182,7 @@ public:
|
||||
static int all_dbms_lock_allocated_aux_lob_meta_schema(share::schema::ObTableSchema &table_schema);
|
||||
static int wr_control_aux_lob_meta_schema(share::schema::ObTableSchema &table_schema);
|
||||
static int all_tenant_event_history_aux_lob_meta_schema(share::schema::ObTableSchema &table_schema);
|
||||
static int all_tenant_scheduler_job_class_aux_lob_meta_schema(share::schema::ObTableSchema &table_schema);
|
||||
static int all_table_aux_lob_piece_schema(share::schema::ObTableSchema &table_schema);
|
||||
static int all_column_aux_lob_piece_schema(share::schema::ObTableSchema &table_schema);
|
||||
static int all_ddl_operation_aux_lob_piece_schema(share::schema::ObTableSchema &table_schema);
|
||||
@ -2427,6 +2434,7 @@ public:
|
||||
static int all_dbms_lock_allocated_aux_lob_piece_schema(share::schema::ObTableSchema &table_schema);
|
||||
static int wr_control_aux_lob_piece_schema(share::schema::ObTableSchema &table_schema);
|
||||
static int all_tenant_event_history_aux_lob_piece_schema(share::schema::ObTableSchema &table_schema);
|
||||
static int all_tenant_scheduler_job_class_aux_lob_piece_schema(share::schema::ObTableSchema &table_schema);
|
||||
static int all_virtual_ash_all_virtual_ash_i1_schema(share::schema::ObTableSchema &table_schema);
|
||||
static int all_virtual_sql_plan_monitor_all_virtual_sql_plan_monitor_i1_schema(share::schema::ObTableSchema &table_schema);
|
||||
static int all_virtual_sql_audit_all_virtual_sql_audit_i1_schema(share::schema::ObTableSchema &table_schema);
|
||||
@ -2880,6 +2888,7 @@ const schema_create_func sys_table_schema_creators [] = {
|
||||
ObInnerTableSchema::all_dbms_lock_allocated_schema,
|
||||
ObInnerTableSchema::wr_control_schema,
|
||||
ObInnerTableSchema::all_tenant_event_history_schema,
|
||||
ObInnerTableSchema::all_tenant_scheduler_job_class_schema,
|
||||
NULL,};
|
||||
|
||||
const schema_create_func virtual_table_schema_creators [] = {
|
||||
@ -3271,6 +3280,7 @@ const schema_create_func virtual_table_schema_creators [] = {
|
||||
ObInnerTableSchema::all_virtual_balance_task_helper_schema,
|
||||
ObInnerTableSchema::all_virtual_balance_group_ls_stat_schema,
|
||||
ObInnerTableSchema::all_virtual_flt_config_schema,
|
||||
ObInnerTableSchema::all_virtual_tenant_scheduler_job_class_schema,
|
||||
ObInnerTableSchema::all_virtual_ash_all_virtual_ash_i1_schema,
|
||||
ObInnerTableSchema::all_virtual_sql_plan_monitor_all_virtual_sql_plan_monitor_i1_schema,
|
||||
ObInnerTableSchema::all_virtual_sql_audit_all_virtual_sql_audit_i1_schema,
|
||||
@ -3520,6 +3530,8 @@ const schema_create_func virtual_table_schema_creators [] = {
|
||||
ObInnerTableSchema::all_virtual_tenant_event_history_ora_schema,
|
||||
ObInnerTableSchema::all_virtual_ls_real_agent_ora_schema,
|
||||
ObInnerTableSchema::all_virtual_flt_config_ora_schema,
|
||||
ObInnerTableSchema::all_virtual_tenant_scheduler_job_run_detail_real_agent_ora_schema,
|
||||
ObInnerTableSchema::all_virtual_tenant_scheduler_job_class_real_agent_ora_schema,
|
||||
ObInnerTableSchema::all_virtual_ls_info_ora_schema,
|
||||
ObInnerTableSchema::all_virtual_table_real_agent_ora_idx_data_table_id_real_agent_schema,
|
||||
ObInnerTableSchema::all_virtual_table_real_agent_ora_idx_db_tb_name_real_agent_schema,
|
||||
@ -4198,6 +4210,8 @@ const schema_create_func sys_view_schema_creators [] = {
|
||||
ObInnerTableSchema::dba_wr_control_ora_schema,
|
||||
ObInnerTableSchema::dba_ob_ls_history_ora_schema,
|
||||
ObInnerTableSchema::dba_ob_tenant_event_history_ora_schema,
|
||||
ObInnerTableSchema::dba_scheduler_job_run_details_ora_schema,
|
||||
ObInnerTableSchema::dba_scheduler_job_classes_schema,
|
||||
ObInnerTableSchema::gv_ob_sql_audit_ora_schema,
|
||||
ObInnerTableSchema::v_ob_sql_audit_ora_schema,
|
||||
ObInnerTableSchema::gv_instance_schema,
|
||||
@ -4707,6 +4721,7 @@ const uint64_t tenant_space_tables [] = {
|
||||
OB_ALL_DBMS_LOCK_ALLOCATED_TID,
|
||||
OB_WR_CONTROL_TID,
|
||||
OB_ALL_TENANT_EVENT_HISTORY_TID,
|
||||
OB_ALL_TENANT_SCHEDULER_JOB_CLASS_TID,
|
||||
OB_TENANT_VIRTUAL_ALL_TABLE_TID,
|
||||
OB_TENANT_VIRTUAL_TABLE_COLUMN_TID,
|
||||
OB_TENANT_VIRTUAL_TABLE_INDEX_TID,
|
||||
@ -5143,6 +5158,8 @@ const uint64_t tenant_space_tables [] = {
|
||||
OB_ALL_VIRTUAL_TENANT_EVENT_HISTORY_ORA_TID,
|
||||
OB_ALL_VIRTUAL_LS_REAL_AGENT_ORA_TID,
|
||||
OB_ALL_VIRTUAL_FLT_CONFIG_ORA_TID,
|
||||
OB_ALL_VIRTUAL_TENANT_SCHEDULER_JOB_RUN_DETAIL_REAL_AGENT_ORA_TID,
|
||||
OB_ALL_VIRTUAL_TENANT_SCHEDULER_JOB_CLASS_REAL_AGENT_ORA_TID,
|
||||
OB_ALL_VIRTUAL_LS_INFO_ORA_TID,
|
||||
OB_GV_OB_PLAN_CACHE_STAT_TID,
|
||||
OB_GV_OB_PLAN_CACHE_PLAN_STAT_TID,
|
||||
@ -5641,6 +5658,8 @@ const uint64_t tenant_space_tables [] = {
|
||||
OB_DBA_WR_CONTROL_ORA_TID,
|
||||
OB_DBA_OB_LS_HISTORY_ORA_TID,
|
||||
OB_DBA_OB_TENANT_EVENT_HISTORY_ORA_TID,
|
||||
OB_DBA_SCHEDULER_JOB_RUN_DETAILS_ORA_TID,
|
||||
OB_DBA_SCHEDULER_JOB_CLASSES_TID,
|
||||
OB_GV_OB_SQL_AUDIT_ORA_TID,
|
||||
OB_V_OB_SQL_AUDIT_ORA_TID,
|
||||
OB_GV_INSTANCE_TID,
|
||||
@ -6200,6 +6219,7 @@ const uint64_t tenant_space_tables [] = {
|
||||
OB_ALL_DBMS_LOCK_ALLOCATED_AUX_LOB_META_TID,
|
||||
OB_WR_CONTROL_AUX_LOB_META_TID,
|
||||
OB_ALL_TENANT_EVENT_HISTORY_AUX_LOB_META_TID,
|
||||
OB_ALL_TENANT_SCHEDULER_JOB_CLASS_AUX_LOB_META_TID,
|
||||
OB_ALL_TABLE_AUX_LOB_PIECE_TID,
|
||||
OB_ALL_COLUMN_AUX_LOB_PIECE_TID,
|
||||
OB_ALL_DDL_OPERATION_AUX_LOB_PIECE_TID,
|
||||
@ -6429,7 +6449,8 @@ const uint64_t tenant_space_tables [] = {
|
||||
OB_ALL_BALANCE_TASK_HELPER_AUX_LOB_PIECE_TID,
|
||||
OB_ALL_DBMS_LOCK_ALLOCATED_AUX_LOB_PIECE_TID,
|
||||
OB_WR_CONTROL_AUX_LOB_PIECE_TID,
|
||||
OB_ALL_TENANT_EVENT_HISTORY_AUX_LOB_PIECE_TID, };
|
||||
OB_ALL_TENANT_EVENT_HISTORY_AUX_LOB_PIECE_TID,
|
||||
OB_ALL_TENANT_SCHEDULER_JOB_CLASS_AUX_LOB_PIECE_TID, };
|
||||
|
||||
const uint64_t all_ora_mapping_virtual_table_org_tables [] = {
|
||||
OB_ALL_VIRTUAL_SQL_AUDIT_TID,
|
||||
@ -6940,6 +6961,7 @@ const char* const tenant_space_table_names [] = {
|
||||
OB_ALL_DBMS_LOCK_ALLOCATED_TNAME,
|
||||
OB_WR_CONTROL_TNAME,
|
||||
OB_ALL_TENANT_EVENT_HISTORY_TNAME,
|
||||
OB_ALL_TENANT_SCHEDULER_JOB_CLASS_TNAME,
|
||||
OB_TENANT_VIRTUAL_ALL_TABLE_TNAME,
|
||||
OB_TENANT_VIRTUAL_TABLE_COLUMN_TNAME,
|
||||
OB_TENANT_VIRTUAL_TABLE_INDEX_TNAME,
|
||||
@ -7376,6 +7398,8 @@ const char* const tenant_space_table_names [] = {
|
||||
OB_ALL_VIRTUAL_TENANT_EVENT_HISTORY_ORA_TNAME,
|
||||
OB_ALL_VIRTUAL_LS_REAL_AGENT_ORA_TNAME,
|
||||
OB_ALL_VIRTUAL_FLT_CONFIG_ORA_TNAME,
|
||||
OB_ALL_VIRTUAL_TENANT_SCHEDULER_JOB_RUN_DETAIL_REAL_AGENT_ORA_TNAME,
|
||||
OB_ALL_VIRTUAL_TENANT_SCHEDULER_JOB_CLASS_REAL_AGENT_ORA_TNAME,
|
||||
OB_ALL_VIRTUAL_LS_INFO_ORA_TNAME,
|
||||
OB_GV_OB_PLAN_CACHE_STAT_TNAME,
|
||||
OB_GV_OB_PLAN_CACHE_PLAN_STAT_TNAME,
|
||||
@ -7874,6 +7898,8 @@ const char* const tenant_space_table_names [] = {
|
||||
OB_DBA_WR_CONTROL_ORA_TNAME,
|
||||
OB_DBA_OB_LS_HISTORY_ORA_TNAME,
|
||||
OB_DBA_OB_TENANT_EVENT_HISTORY_ORA_TNAME,
|
||||
OB_DBA_SCHEDULER_JOB_RUN_DETAILS_ORA_TNAME,
|
||||
OB_DBA_SCHEDULER_JOB_CLASSES_TNAME,
|
||||
OB_GV_OB_SQL_AUDIT_ORA_TNAME,
|
||||
OB_V_OB_SQL_AUDIT_ORA_TNAME,
|
||||
OB_GV_INSTANCE_TNAME,
|
||||
@ -8433,6 +8459,7 @@ const char* const tenant_space_table_names [] = {
|
||||
OB_ALL_DBMS_LOCK_ALLOCATED_AUX_LOB_META_TNAME,
|
||||
OB_WR_CONTROL_AUX_LOB_META_TNAME,
|
||||
OB_ALL_TENANT_EVENT_HISTORY_AUX_LOB_META_TNAME,
|
||||
OB_ALL_TENANT_SCHEDULER_JOB_CLASS_AUX_LOB_META_TNAME,
|
||||
OB_ALL_TABLE_AUX_LOB_PIECE_TNAME,
|
||||
OB_ALL_COLUMN_AUX_LOB_PIECE_TNAME,
|
||||
OB_ALL_DDL_OPERATION_AUX_LOB_PIECE_TNAME,
|
||||
@ -8662,7 +8689,8 @@ const char* const tenant_space_table_names [] = {
|
||||
OB_ALL_BALANCE_TASK_HELPER_AUX_LOB_PIECE_TNAME,
|
||||
OB_ALL_DBMS_LOCK_ALLOCATED_AUX_LOB_PIECE_TNAME,
|
||||
OB_WR_CONTROL_AUX_LOB_PIECE_TNAME,
|
||||
OB_ALL_TENANT_EVENT_HISTORY_AUX_LOB_PIECE_TNAME, };
|
||||
OB_ALL_TENANT_EVENT_HISTORY_AUX_LOB_PIECE_TNAME,
|
||||
OB_ALL_TENANT_SCHEDULER_JOB_CLASS_AUX_LOB_PIECE_TNAME, };
|
||||
|
||||
const uint64_t only_rs_vtables [] = {
|
||||
OB_ALL_VIRTUAL_CORE_META_TABLE_TID,
|
||||
@ -11138,6 +11166,14 @@ LOBMapping const lob_aux_table_mappings [] = {
|
||||
ObInnerTableSchema::all_tenant_event_history_aux_lob_piece_schema
|
||||
},
|
||||
|
||||
{
|
||||
OB_ALL_TENANT_SCHEDULER_JOB_CLASS_TID,
|
||||
OB_ALL_TENANT_SCHEDULER_JOB_CLASS_AUX_LOB_META_TID,
|
||||
OB_ALL_TENANT_SCHEDULER_JOB_CLASS_AUX_LOB_PIECE_TID,
|
||||
ObInnerTableSchema::all_tenant_scheduler_job_class_aux_lob_meta_schema,
|
||||
ObInnerTableSchema::all_tenant_scheduler_job_class_aux_lob_piece_schema
|
||||
},
|
||||
|
||||
};
|
||||
|
||||
static inline bool get_sys_table_lob_aux_table_id(const uint64_t tid, uint64_t& meta_tid, uint64_t& piece_tid)
|
||||
@ -11175,12 +11211,12 @@ static inline int get_sys_table_lob_aux_schema(const uint64_t tid,
|
||||
}
|
||||
|
||||
const int64_t OB_CORE_TABLE_COUNT = 4;
|
||||
const int64_t OB_SYS_TABLE_COUNT = 248;
|
||||
const int64_t OB_VIRTUAL_TABLE_COUNT = 719;
|
||||
const int64_t OB_SYS_VIEW_COUNT = 760;
|
||||
const int64_t OB_SYS_TENANT_TABLE_COUNT = 1732;
|
||||
const int64_t OB_SYS_TABLE_COUNT = 249;
|
||||
const int64_t OB_VIRTUAL_TABLE_COUNT = 722;
|
||||
const int64_t OB_SYS_VIEW_COUNT = 762;
|
||||
const int64_t OB_SYS_TENANT_TABLE_COUNT = 1738;
|
||||
const int64_t OB_CORE_SCHEMA_VERSION = 1;
|
||||
const int64_t OB_BOOTSTRAP_SCHEMA_VERSION = 1735;
|
||||
const int64_t OB_BOOTSTRAP_SCHEMA_VERSION = 1741;
|
||||
|
||||
} // end namespace share
|
||||
} // end namespace oceanbase
|
||||
|
@ -21,7 +21,7 @@ inner_lob_map_t inner_lob_map;
|
||||
bool lob_mapping_init()
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
if (OB_FAIL(inner_lob_map.create(251, ObModIds::OB_INNER_LOB_HASH_SET))) {
|
||||
if (OB_FAIL(inner_lob_map.create(252, ObModIds::OB_INNER_LOB_HASH_SET))) {
|
||||
SERVER_LOG(WARN, "fail to create inner lob map", K(ret));
|
||||
} else {
|
||||
for (int64_t i = 0; OB_SUCC(ret) && i < ARRAYSIZEOF(lob_aux_table_mappings); ++i) {
|
||||
|
@ -994,6 +994,13 @@ bool vt_mapping_init()
|
||||
tmp_vt_mapping.is_real_vt_ = true;
|
||||
}
|
||||
|
||||
{
|
||||
int64_t idx = OB_ALL_VIRTUAL_TENANT_SCHEDULER_JOB_CLASS_REAL_AGENT_ORA_TID - start_idx;
|
||||
VTMapping &tmp_vt_mapping = vt_mappings[idx];
|
||||
tmp_vt_mapping.mapping_tid_ = OB_ALL_TENANT_SCHEDULER_JOB_CLASS_TID;
|
||||
tmp_vt_mapping.is_real_vt_ = true;
|
||||
}
|
||||
|
||||
{
|
||||
int64_t idx = OB_ALL_VIRTUAL_TENANT_SCHEDULER_JOB_REAL_AGENT_ORA_TID - start_idx;
|
||||
VTMapping &tmp_vt_mapping = vt_mappings[idx];
|
||||
@ -1001,6 +1008,13 @@ bool vt_mapping_init()
|
||||
tmp_vt_mapping.is_real_vt_ = true;
|
||||
}
|
||||
|
||||
{
|
||||
int64_t idx = OB_ALL_VIRTUAL_TENANT_SCHEDULER_JOB_RUN_DETAIL_REAL_AGENT_ORA_TID - start_idx;
|
||||
VTMapping &tmp_vt_mapping = vt_mappings[idx];
|
||||
tmp_vt_mapping.mapping_tid_ = OB_ALL_TENANT_SCHEDULER_JOB_RUN_DETAIL_TID;
|
||||
tmp_vt_mapping.is_real_vt_ = true;
|
||||
}
|
||||
|
||||
{
|
||||
int64_t idx = OB_ALL_VIRTUAL_TENANT_SCHEDULER_PROGRAM_REAL_AGENT_ORA_TID - start_idx;
|
||||
VTMapping &tmp_vt_mapping = vt_mappings[idx];
|
||||
|
@ -279,6 +279,7 @@ const uint64_t OB_ALL_BALANCE_TASK_HELPER_TID = 459; // "__all_balance_task_help
|
||||
const uint64_t OB_ALL_DBMS_LOCK_ALLOCATED_TID = 471; // "__all_dbms_lock_allocated"
|
||||
const uint64_t OB_WR_CONTROL_TID = 472; // "__wr_control"
|
||||
const uint64_t OB_ALL_TENANT_EVENT_HISTORY_TID = 473; // "__all_tenant_event_history"
|
||||
const uint64_t OB_ALL_TENANT_SCHEDULER_JOB_CLASS_TID = 474; // "__all_tenant_scheduler_job_class"
|
||||
const uint64_t OB_TENANT_VIRTUAL_ALL_TABLE_TID = 10001; // "__tenant_virtual_all_table"
|
||||
const uint64_t OB_TENANT_VIRTUAL_TABLE_COLUMN_TID = 10002; // "__tenant_virtual_table_column"
|
||||
const uint64_t OB_TENANT_VIRTUAL_TABLE_INDEX_TID = 10003; // "__tenant_virtual_table_index"
|
||||
@ -667,6 +668,7 @@ const uint64_t OB_ALL_VIRTUAL_TENANT_EVENT_HISTORY_TID = 12415; // "__all_virtua
|
||||
const uint64_t OB_ALL_VIRTUAL_BALANCE_TASK_HELPER_TID = 12416; // "__all_virtual_balance_task_helper"
|
||||
const uint64_t OB_ALL_VIRTUAL_BALANCE_GROUP_LS_STAT_TID = 12417; // "__all_virtual_balance_group_ls_stat"
|
||||
const uint64_t OB_ALL_VIRTUAL_FLT_CONFIG_TID = 12420; // "__all_virtual_flt_config"
|
||||
const uint64_t OB_ALL_VIRTUAL_TENANT_SCHEDULER_JOB_CLASS_TID = 12421; // "__all_virtual_tenant_scheduler_job_class"
|
||||
const uint64_t OB_ALL_VIRTUAL_SQL_AUDIT_ORA_TID = 15009; // "ALL_VIRTUAL_SQL_AUDIT_ORA"
|
||||
const uint64_t OB_ALL_VIRTUAL_PLAN_STAT_ORA_TID = 15010; // "ALL_VIRTUAL_PLAN_STAT_ORA"
|
||||
const uint64_t OB_ALL_VIRTUAL_PLAN_CACHE_PLAN_EXPLAIN_ORA_TID = 15012; // "ALL_VIRTUAL_PLAN_CACHE_PLAN_EXPLAIN_ORA"
|
||||
@ -906,6 +908,8 @@ const uint64_t OB_ALL_VIRTUAL_WR_CONTROL_ORA_TID = 15398; // "ALL_VIRTUAL_WR_CON
|
||||
const uint64_t OB_ALL_VIRTUAL_TENANT_EVENT_HISTORY_ORA_TID = 15399; // "ALL_VIRTUAL_TENANT_EVENT_HISTORY_ORA"
|
||||
const uint64_t OB_ALL_VIRTUAL_LS_REAL_AGENT_ORA_TID = 15402; // "ALL_VIRTUAL_LS_REAL_AGENT_ORA"
|
||||
const uint64_t OB_ALL_VIRTUAL_FLT_CONFIG_ORA_TID = 15403; // "ALL_VIRTUAL_FLT_CONFIG_ORA"
|
||||
const uint64_t OB_ALL_VIRTUAL_TENANT_SCHEDULER_JOB_RUN_DETAIL_REAL_AGENT_ORA_TID = 15404; // "ALL_VIRTUAL_TENANT_SCHEDULER_JOB_RUN_DETAIL_REAL_AGENT_ORA"
|
||||
const uint64_t OB_ALL_VIRTUAL_TENANT_SCHEDULER_JOB_CLASS_REAL_AGENT_ORA_TID = 15406; // "ALL_VIRTUAL_TENANT_SCHEDULER_JOB_CLASS_REAL_AGENT_ORA"
|
||||
const uint64_t OB_ALL_VIRTUAL_LS_INFO_ORA_TID = 15414; // "ALL_VIRTUAL_LS_INFO_ORA"
|
||||
const uint64_t OB_GV_OB_PLAN_CACHE_STAT_TID = 20001; // "GV$OB_PLAN_CACHE_STAT"
|
||||
const uint64_t OB_GV_OB_PLAN_CACHE_PLAN_STAT_TID = 20002; // "GV$OB_PLAN_CACHE_PLAN_STAT"
|
||||
@ -1500,6 +1504,8 @@ const uint64_t OB_DBMS_LOCK_ALLOCATED_ORA_TID = 25256; // "DBMS_LOCK_ALLOCATED_O
|
||||
const uint64_t OB_DBA_WR_CONTROL_ORA_TID = 25257; // "DBA_WR_CONTROL_ORA"
|
||||
const uint64_t OB_DBA_OB_LS_HISTORY_ORA_TID = 25258; // "DBA_OB_LS_HISTORY_ORA"
|
||||
const uint64_t OB_DBA_OB_TENANT_EVENT_HISTORY_ORA_TID = 25259; // "DBA_OB_TENANT_EVENT_HISTORY_ORA"
|
||||
const uint64_t OB_DBA_SCHEDULER_JOB_RUN_DETAILS_ORA_TID = 25260; // "DBA_SCHEDULER_JOB_RUN_DETAILS_ORA"
|
||||
const uint64_t OB_DBA_SCHEDULER_JOB_CLASSES_TID = 25261; // "DBA_SCHEDULER_JOB_CLASSES"
|
||||
const uint64_t OB_GV_OB_SQL_AUDIT_ORA_TID = 28002; // "GV$OB_SQL_AUDIT_ORA"
|
||||
const uint64_t OB_V_OB_SQL_AUDIT_ORA_TID = 28003; // "V$OB_SQL_AUDIT_ORA"
|
||||
const uint64_t OB_GV_INSTANCE_TID = 28004; // "GV$INSTANCE"
|
||||
@ -1918,6 +1924,7 @@ const uint64_t OB_ALL_BALANCE_TASK_HELPER_AUX_LOB_META_TID = 50459; // "__all_ba
|
||||
const uint64_t OB_ALL_DBMS_LOCK_ALLOCATED_AUX_LOB_META_TID = 50471; // "__all_dbms_lock_allocated_aux_lob_meta"
|
||||
const uint64_t OB_WR_CONTROL_AUX_LOB_META_TID = 50472; // "__wr_control_aux_lob_meta"
|
||||
const uint64_t OB_ALL_TENANT_EVENT_HISTORY_AUX_LOB_META_TID = 50473; // "__all_tenant_event_history_aux_lob_meta"
|
||||
const uint64_t OB_ALL_TENANT_SCHEDULER_JOB_CLASS_AUX_LOB_META_TID = 50474; // "__all_tenant_scheduler_job_class_aux_lob_meta"
|
||||
const uint64_t OB_ALL_TABLE_AUX_LOB_PIECE_TID = 60003; // "__all_table_aux_lob_piece"
|
||||
const uint64_t OB_ALL_COLUMN_AUX_LOB_PIECE_TID = 60004; // "__all_column_aux_lob_piece"
|
||||
const uint64_t OB_ALL_DDL_OPERATION_AUX_LOB_PIECE_TID = 60005; // "__all_ddl_operation_aux_lob_piece"
|
||||
@ -2169,6 +2176,7 @@ const uint64_t OB_ALL_BALANCE_TASK_HELPER_AUX_LOB_PIECE_TID = 60459; // "__all_b
|
||||
const uint64_t OB_ALL_DBMS_LOCK_ALLOCATED_AUX_LOB_PIECE_TID = 60471; // "__all_dbms_lock_allocated_aux_lob_piece"
|
||||
const uint64_t OB_WR_CONTROL_AUX_LOB_PIECE_TID = 60472; // "__wr_control_aux_lob_piece"
|
||||
const uint64_t OB_ALL_TENANT_EVENT_HISTORY_AUX_LOB_PIECE_TID = 60473; // "__all_tenant_event_history_aux_lob_piece"
|
||||
const uint64_t OB_ALL_TENANT_SCHEDULER_JOB_CLASS_AUX_LOB_PIECE_TID = 60474; // "__all_tenant_scheduler_job_class_aux_lob_piece"
|
||||
const uint64_t OB_ALL_VIRTUAL_PLAN_CACHE_STAT_ALL_VIRTUAL_PLAN_CACHE_STAT_I1_TID = 14999; // "__all_virtual_plan_cache_stat"
|
||||
const uint64_t OB_ALL_VIRTUAL_SESSION_EVENT_ALL_VIRTUAL_SESSION_EVENT_I1_TID = 14998; // "__all_virtual_session_event"
|
||||
const uint64_t OB_ALL_VIRTUAL_SESSION_WAIT_ALL_VIRTUAL_SESSION_WAIT_I1_TID = 14997; // "__all_virtual_session_wait"
|
||||
@ -2609,6 +2617,7 @@ const char *const OB_ALL_BALANCE_TASK_HELPER_TNAME = "__all_balance_task_helper"
|
||||
const char *const OB_ALL_DBMS_LOCK_ALLOCATED_TNAME = "__all_dbms_lock_allocated";
|
||||
const char *const OB_WR_CONTROL_TNAME = "__wr_control";
|
||||
const char *const OB_ALL_TENANT_EVENT_HISTORY_TNAME = "__all_tenant_event_history";
|
||||
const char *const OB_ALL_TENANT_SCHEDULER_JOB_CLASS_TNAME = "__all_tenant_scheduler_job_class";
|
||||
const char *const OB_TENANT_VIRTUAL_ALL_TABLE_TNAME = "__tenant_virtual_all_table";
|
||||
const char *const OB_TENANT_VIRTUAL_TABLE_COLUMN_TNAME = "__tenant_virtual_table_column";
|
||||
const char *const OB_TENANT_VIRTUAL_TABLE_INDEX_TNAME = "__tenant_virtual_table_index";
|
||||
@ -2997,6 +3006,7 @@ const char *const OB_ALL_VIRTUAL_TENANT_EVENT_HISTORY_TNAME = "__all_virtual_ten
|
||||
const char *const OB_ALL_VIRTUAL_BALANCE_TASK_HELPER_TNAME = "__all_virtual_balance_task_helper";
|
||||
const char *const OB_ALL_VIRTUAL_BALANCE_GROUP_LS_STAT_TNAME = "__all_virtual_balance_group_ls_stat";
|
||||
const char *const OB_ALL_VIRTUAL_FLT_CONFIG_TNAME = "__all_virtual_flt_config";
|
||||
const char *const OB_ALL_VIRTUAL_TENANT_SCHEDULER_JOB_CLASS_TNAME = "__all_virtual_tenant_scheduler_job_class";
|
||||
const char *const OB_ALL_VIRTUAL_SQL_AUDIT_ORA_TNAME = "ALL_VIRTUAL_SQL_AUDIT";
|
||||
const char *const OB_ALL_VIRTUAL_PLAN_STAT_ORA_TNAME = "ALL_VIRTUAL_PLAN_STAT";
|
||||
const char *const OB_ALL_VIRTUAL_PLAN_CACHE_PLAN_EXPLAIN_ORA_TNAME = "ALL_VIRTUAL_PLAN_CACHE_PLAN_EXPLAIN";
|
||||
@ -3236,6 +3246,8 @@ const char *const OB_ALL_VIRTUAL_WR_CONTROL_ORA_TNAME = "ALL_VIRTUAL_WR_CONTROL"
|
||||
const char *const OB_ALL_VIRTUAL_TENANT_EVENT_HISTORY_ORA_TNAME = "ALL_VIRTUAL_TENANT_EVENT_HISTORY";
|
||||
const char *const OB_ALL_VIRTUAL_LS_REAL_AGENT_ORA_TNAME = "ALL_VIRTUAL_LS_REAL_AGENT";
|
||||
const char *const OB_ALL_VIRTUAL_FLT_CONFIG_ORA_TNAME = "ALL_VIRTUAL_FLT_CONFIG";
|
||||
const char *const OB_ALL_VIRTUAL_TENANT_SCHEDULER_JOB_RUN_DETAIL_REAL_AGENT_ORA_TNAME = "ALL_VIRTUAL_TENANT_SCHEDULER_JOB_RUN_DETAIL_REAL_AGENT";
|
||||
const char *const OB_ALL_VIRTUAL_TENANT_SCHEDULER_JOB_CLASS_REAL_AGENT_ORA_TNAME = "ALL_VIRTUAL_TENANT_SCHEDULER_JOB_CLASS_REAL_AGENT";
|
||||
const char *const OB_ALL_VIRTUAL_LS_INFO_ORA_TNAME = "ALL_VIRTUAL_LS_INFO";
|
||||
const char *const OB_GV_OB_PLAN_CACHE_STAT_TNAME = "GV$OB_PLAN_CACHE_STAT";
|
||||
const char *const OB_GV_OB_PLAN_CACHE_PLAN_STAT_TNAME = "GV$OB_PLAN_CACHE_PLAN_STAT";
|
||||
@ -3830,6 +3842,8 @@ const char *const OB_DBMS_LOCK_ALLOCATED_ORA_TNAME = "DBMS_LOCK_ALLOCATED";
|
||||
const char *const OB_DBA_WR_CONTROL_ORA_TNAME = "DBA_WR_CONTROL";
|
||||
const char *const OB_DBA_OB_LS_HISTORY_ORA_TNAME = "DBA_OB_LS_HISTORY";
|
||||
const char *const OB_DBA_OB_TENANT_EVENT_HISTORY_ORA_TNAME = "DBA_OB_TENANT_EVENT_HISTORY";
|
||||
const char *const OB_DBA_SCHEDULER_JOB_RUN_DETAILS_ORA_TNAME = "DBA_SCHEDULER_JOB_RUN_DETAILS";
|
||||
const char *const OB_DBA_SCHEDULER_JOB_CLASSES_TNAME = "DBA_SCHEDULER_JOB_CLASSES";
|
||||
const char *const OB_GV_OB_SQL_AUDIT_ORA_TNAME = "GV$OB_SQL_AUDIT";
|
||||
const char *const OB_V_OB_SQL_AUDIT_ORA_TNAME = "V$OB_SQL_AUDIT";
|
||||
const char *const OB_GV_INSTANCE_TNAME = "GV$INSTANCE";
|
||||
@ -4248,6 +4262,7 @@ const char *const OB_ALL_BALANCE_TASK_HELPER_AUX_LOB_META_TNAME = "__all_balance
|
||||
const char *const OB_ALL_DBMS_LOCK_ALLOCATED_AUX_LOB_META_TNAME = "__all_dbms_lock_allocated_aux_lob_meta";
|
||||
const char *const OB_WR_CONTROL_AUX_LOB_META_TNAME = "__wr_control_aux_lob_meta";
|
||||
const char *const OB_ALL_TENANT_EVENT_HISTORY_AUX_LOB_META_TNAME = "__all_tenant_event_history_aux_lob_meta";
|
||||
const char *const OB_ALL_TENANT_SCHEDULER_JOB_CLASS_AUX_LOB_META_TNAME = "__all_tenant_scheduler_job_class_aux_lob_meta";
|
||||
const char *const OB_ALL_TABLE_AUX_LOB_PIECE_TNAME = "__all_table_aux_lob_piece";
|
||||
const char *const OB_ALL_COLUMN_AUX_LOB_PIECE_TNAME = "__all_column_aux_lob_piece";
|
||||
const char *const OB_ALL_DDL_OPERATION_AUX_LOB_PIECE_TNAME = "__all_ddl_operation_aux_lob_piece";
|
||||
@ -4499,6 +4514,7 @@ const char *const OB_ALL_BALANCE_TASK_HELPER_AUX_LOB_PIECE_TNAME = "__all_balanc
|
||||
const char *const OB_ALL_DBMS_LOCK_ALLOCATED_AUX_LOB_PIECE_TNAME = "__all_dbms_lock_allocated_aux_lob_piece";
|
||||
const char *const OB_WR_CONTROL_AUX_LOB_PIECE_TNAME = "__wr_control_aux_lob_piece";
|
||||
const char *const OB_ALL_TENANT_EVENT_HISTORY_AUX_LOB_PIECE_TNAME = "__all_tenant_event_history_aux_lob_piece";
|
||||
const char *const OB_ALL_TENANT_SCHEDULER_JOB_CLASS_AUX_LOB_PIECE_TNAME = "__all_tenant_scheduler_job_class_aux_lob_piece";
|
||||
const char *const OB_ALL_VIRTUAL_PLAN_CACHE_STAT_ALL_VIRTUAL_PLAN_CACHE_STAT_I1_TNAME = "__idx_11003_all_virtual_plan_cache_stat_i1";
|
||||
const char *const OB_ALL_VIRTUAL_SESSION_EVENT_ALL_VIRTUAL_SESSION_EVENT_I1_TNAME = "__idx_11013_all_virtual_session_event_i1";
|
||||
const char *const OB_ALL_VIRTUAL_SESSION_WAIT_ALL_VIRTUAL_SESSION_WAIT_I1_TNAME = "__idx_11014_all_virtual_session_wait_i1";
|
||||
|
@ -4364,6 +4364,7 @@ def_table_schema(
|
||||
normal_columns = [
|
||||
('code', 'int', 'true', '0'),
|
||||
('message', 'varchar:4000'),
|
||||
('job_class', 'varchar:30', 'true'),
|
||||
],
|
||||
)
|
||||
|
||||
@ -5902,7 +5903,26 @@ def_table_schema(
|
||||
],
|
||||
)
|
||||
|
||||
# 474 : __all_tenant_scheduler_job_classes
|
||||
def_table_schema(
|
||||
table_name = '__all_tenant_scheduler_job_class',
|
||||
owner = 'huangrenhuang.hrh',
|
||||
table_id = '474',
|
||||
table_type = 'SYSTEM_TABLE',
|
||||
gm_columns = ['gmt_create', 'gmt_modified'],
|
||||
rowkey_columns = [
|
||||
('tenant_id', 'int'),
|
||||
('job_class_name', 'varchar:30', 'false'),
|
||||
],
|
||||
in_tenant_space = True,
|
||||
is_cluster_private = False,
|
||||
normal_columns = [
|
||||
('resource_consumer_group', 'varchar:30', 'true'),
|
||||
('service', 'varchar:64', 'true'),
|
||||
('logging_level', 'varchar:11', 'true'),
|
||||
('log_history', 'number:38:0', 'true'),
|
||||
('comments', 'varchar:240', 'true'),
|
||||
],
|
||||
)
|
||||
# 475 : __all_recover_table_job
|
||||
# 476 : __all_recover_table_job_history
|
||||
# 477 : __all_import_table_job
|
||||
@ -12492,8 +12512,6 @@ def_table_schema(**gen_iterate_private_virtual_table_def(
|
||||
# 12418: __all_virtual_cgroup_info
|
||||
# 12419: __all_virtual_cgroup_config
|
||||
|
||||
# 12420: __all_virtual_flt_config
|
||||
|
||||
def_table_schema(
|
||||
owner = 'guoyun.lgy',
|
||||
table_name = '__all_virtual_flt_config',
|
||||
@ -12514,7 +12532,11 @@ def_table_schema(
|
||||
('record_policy', 'varchar:32')
|
||||
]
|
||||
)
|
||||
# 12421: __all_virtual_tenant_scheduler_job_class
|
||||
|
||||
def_table_schema(**gen_iterate_virtual_table_def(
|
||||
table_id = '12421',
|
||||
table_name = '__all_virtual_tenant_scheduler_job_class',
|
||||
keywords = all_def_keywords['__all_tenant_scheduler_job_class']))
|
||||
|
||||
# 12422: __all_virtual_recover_table_job
|
||||
# 12423: __all_virtual_recover_table_job_history
|
||||
@ -12911,11 +12933,11 @@ def_table_schema(**gen_oracle_mapping_real_virtual_table_def('15402', all_def_ke
|
||||
# 15403: __all_virtual_flt_config
|
||||
def_table_schema(**no_direct_access(gen_oracle_mapping_virtual_table_def('15403', all_def_keywords['__all_virtual_flt_config'])))
|
||||
|
||||
# 15404: __all_virtual_tenant_scheduler_job_run_detail
|
||||
def_table_schema(**gen_oracle_mapping_real_virtual_table_def('15404', all_def_keywords['__all_tenant_scheduler_job_run_detail']))
|
||||
|
||||
# 15405: __all_virtual_session_info
|
||||
|
||||
# 15406: __all_virtual_tenant_scheduler_job_class
|
||||
def_table_schema(**gen_oracle_mapping_real_virtual_table_def('15406', all_def_keywords['__all_tenant_scheduler_job_class']))
|
||||
|
||||
# 15407: __all_virtual_recover_table_job
|
||||
# 15408: __all_virtual_recover_table_job_history
|
||||
@ -46865,8 +46887,41 @@ def_table_schema(
|
||||
""".replace("\n", " ")
|
||||
)
|
||||
|
||||
# 25260: DBA_SCHEDULER_JOB_RUN_DETAILS
|
||||
# 25261: DBA_SCHEDULER_JOB_CLASSES
|
||||
def_table_schema(
|
||||
owner = 'fyy280124',
|
||||
table_name = 'DBA_SCHEDULER_JOB_RUN_DETAILS',
|
||||
name_postfix = '_ORA',
|
||||
database_id = 'OB_ORA_SYS_DATABASE_ID',
|
||||
table_id = '25260',
|
||||
table_type = 'SYSTEM_VIEW',
|
||||
rowkey_columns = [],
|
||||
normal_columns = [],
|
||||
gm_columns = [],
|
||||
in_tenant_space = True,
|
||||
view_definition = """SELECT * FROM SYS.ALL_VIRTUAL_TENANT_SCHEDULER_JOB_RUN_DETAIL_REAL_AGENT T
|
||||
""".replace("\n", " ")
|
||||
)
|
||||
|
||||
def_table_schema(
|
||||
owner = 'huangrenhuang.hrh',
|
||||
table_name = 'DBA_SCHEDULER_JOB_CLASSES',
|
||||
database_id = 'OB_ORA_SYS_DATABASE_ID',
|
||||
table_id = '25261',
|
||||
table_type = 'SYSTEM_VIEW',
|
||||
rowkey_columns = [],
|
||||
normal_columns = [],
|
||||
gm_columns = [],
|
||||
in_tenant_space = True,
|
||||
view_definition = """SELECT
|
||||
T.JOB_CLASS_NAME AS JOB_CLASS_NAME,
|
||||
T.RESOURCE_CONSUMER_GROUP AS RESOURCE_CONSUMER_GROUP,
|
||||
T.SERVICE AS SERVICE,
|
||||
T.LOGGING_LEVEL AS LOGGING_LEVEL,
|
||||
T.LOG_HISTORY AS LOG_HISTORY,
|
||||
T.COMMENTS AS COMMENTS
|
||||
FROM SYS.ALL_VIRTUAL_TENANT_SCHEDULER_JOB_CLASS_REAL_AGENT T
|
||||
""".replace("\n", " ")
|
||||
)
|
||||
|
||||
# 25262: DBA_OB_RECOVER_TABLE_JOBS
|
||||
# 25263: DBA_OB_RECOVER_TABLE_JOB_HISTORY
|
||||
|
@ -1630,6 +1630,7 @@ case OB_ALL_VIRTUAL_TENANT_PROFILE_HISTORY_TID:
|
||||
case OB_ALL_VIRTUAL_TENANT_ROLE_GRANTEE_MAP_TID:
|
||||
case OB_ALL_VIRTUAL_TENANT_ROLE_GRANTEE_MAP_HISTORY_TID:
|
||||
case OB_ALL_VIRTUAL_TENANT_SCHEDULER_JOB_TID:
|
||||
case OB_ALL_VIRTUAL_TENANT_SCHEDULER_JOB_CLASS_TID:
|
||||
case OB_ALL_VIRTUAL_TENANT_SCHEDULER_JOB_RUN_DETAIL_TID:
|
||||
case OB_ALL_VIRTUAL_TENANT_SCHEDULER_PROGRAM_TID:
|
||||
case OB_ALL_VIRTUAL_TENANT_SCHEDULER_PROGRAM_ARGUMENT_TID:
|
||||
@ -3618,6 +3619,21 @@ case OB_ALL_VIRTUAL_USER_HISTORY_TID:
|
||||
break;
|
||||
}
|
||||
|
||||
case OB_ALL_VIRTUAL_TENANT_SCHEDULER_JOB_CLASS_TID: {
|
||||
ObIterateVirtualTable *iter = NULL;
|
||||
if (OB_FAIL(NEW_VIRTUAL_TABLE(ObIterateVirtualTable, iter))) {
|
||||
SERVER_LOG(WARN, "create virtual table iterator failed", K(ret));
|
||||
} else if (OB_FAIL(iter->init(OB_ALL_TENANT_SCHEDULER_JOB_CLASS_TID, index_schema, params))) {
|
||||
SERVER_LOG(WARN, "virtual table iter init failed", K(ret));
|
||||
iter->~ObIterateVirtualTable();
|
||||
allocator.free(iter);
|
||||
iter = NULL;
|
||||
} else {
|
||||
vt_iter = iter;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case OB_ALL_VIRTUAL_TENANT_SCHEDULER_JOB_RUN_DETAIL_TID: {
|
||||
ObIterateVirtualTable *iter = NULL;
|
||||
if (OB_FAIL(NEW_VIRTUAL_TABLE(ObIterateVirtualTable, iter))) {
|
||||
@ -3752,7 +3768,9 @@ case OB_ALL_VIRTUAL_USER_HISTORY_TID:
|
||||
}
|
||||
break;
|
||||
}
|
||||
END_CREATE_VT_ITER_SWITCH_LAMBDA
|
||||
|
||||
BEGIN_CREATE_VT_ITER_SWITCH_LAMBDA
|
||||
case OB_ALL_VIRTUAL_TRANSFER_TASK_TID: {
|
||||
ObIterateVirtualTable *iter = NULL;
|
||||
if (OB_FAIL(NEW_VIRTUAL_TABLE(ObIterateVirtualTable, iter))) {
|
||||
@ -3767,9 +3785,7 @@ case OB_ALL_VIRTUAL_USER_HISTORY_TID:
|
||||
}
|
||||
break;
|
||||
}
|
||||
END_CREATE_VT_ITER_SWITCH_LAMBDA
|
||||
|
||||
BEGIN_CREATE_VT_ITER_SWITCH_LAMBDA
|
||||
case OB_ALL_VIRTUAL_TRANSFER_TASK_HISTORY_TID: {
|
||||
ObIterateVirtualTable *iter = NULL;
|
||||
if (OB_FAIL(NEW_VIRTUAL_TABLE(ObIterateVirtualTable, iter))) {
|
||||
|
@ -251,6 +251,7 @@ select 0xffffffffff & table_id, table_name, table_type, database_id, part_num fr
|
||||
471 __all_dbms_lock_allocated 0 201001 1
|
||||
472 __wr_control 0 201001 1
|
||||
473 __all_tenant_event_history 0 201001 1
|
||||
474 __all_tenant_scheduler_job_class 0 201001 1
|
||||
10001 __tenant_virtual_all_table 2 201001 1
|
||||
10002 __tenant_virtual_table_column 2 201001 1
|
||||
10003 __tenant_virtual_table_index 2 201001 1
|
||||
@ -639,6 +640,7 @@ select 0xffffffffff & table_id, table_name, table_type, database_id, part_num fr
|
||||
12416 __all_virtual_balance_task_helper 2 201001 1
|
||||
12417 __all_virtual_balance_group_ls_stat 2 201001 1
|
||||
12420 __all_virtual_flt_config 2 201001 1
|
||||
12421 __all_virtual_tenant_scheduler_job_class 2 201001 1
|
||||
20001 GV$OB_PLAN_CACHE_STAT 1 201001 1
|
||||
20002 GV$OB_PLAN_CACHE_PLAN_STAT 1 201001 1
|
||||
20003 SCHEMATA 1 201002 1
|
||||
|
Loading…
x
Reference in New Issue
Block a user