placeholder for lock table
This commit is contained in:
parent
55174bc1fa
commit
04c19b54ec
@ -415,6 +415,10 @@ int ObAllVirtualObjLock::process_curr_tenant(ObNewRow *&row)
|
||||
cur_row_.cells_[i].set_int(lock_op.lock_id_.obj_id_);
|
||||
break;
|
||||
}
|
||||
case OWNER_TYPE: {
|
||||
// TODO: set the column with real data
|
||||
break;
|
||||
}
|
||||
default:
|
||||
ret = OB_ERR_UNEXPECTED;
|
||||
SERVER_LOG(WARN, "invalid col_id", K(ret), K(col_id));
|
||||
|
@ -69,7 +69,8 @@ private:
|
||||
EXTRA_INFO,
|
||||
TIME_AFTER_CREATE,
|
||||
OBJ_TYPE,
|
||||
OBJ_ID
|
||||
OBJ_ID,
|
||||
OWNER_TYPE,
|
||||
};
|
||||
private:
|
||||
common::ObAddr addr_;
|
||||
|
@ -10464,6 +10464,21 @@ int ObInnerTableSchema::all_virtual_obj_lock_schema(ObTableSchema &table_schema)
|
||||
false, //is_nullable
|
||||
false); //is_autoincrement
|
||||
}
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
ADD_COLUMN_SCHEMA("owner_type", //column_name
|
||||
++column_id, //column_id
|
||||
0, //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)) {
|
||||
table_schema.get_part_option().set_part_num(1);
|
||||
table_schema.set_part_level(PARTITION_LEVEL_ONE);
|
||||
|
@ -1093,6 +1093,21 @@ int ObInnerTableSchema::all_virtual_obj_lock_ora_schema(ObTableSchema &table_sch
|
||||
false, //is_nullable
|
||||
false); //is_autoincrement
|
||||
}
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
ADD_COLUMN_SCHEMA("OWNER_TYPE", //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
|
||||
false, //is_nullable
|
||||
false); //is_autoincrement
|
||||
}
|
||||
if (OB_SUCC(ret)) {
|
||||
table_schema.get_part_option().set_part_num(1);
|
||||
table_schema.set_part_level(PARTITION_LEVEL_ONE);
|
||||
|
@ -7296,6 +7296,7 @@ def_table_schema(
|
||||
)
|
||||
|
||||
# 520 : __all_spm_evo_result
|
||||
# 521 : __all_detect_lock_info_v2
|
||||
|
||||
# 余留位置(此行之前占位)
|
||||
# 本区域占位建议:采用真实表名进行占位
|
||||
@ -12407,6 +12408,7 @@ def_table_schema(
|
||||
('time_after_create', 'int'),
|
||||
('obj_type', 'varchar:MAX_LOCK_OBJ_TYPE_BUF_LENGTH'),
|
||||
('obj_id', 'int'),
|
||||
('owner_type', 'int'),
|
||||
],
|
||||
partition_columns = ['svr_ip', 'svr_port'],
|
||||
vtable_route_policy = 'distributed',
|
||||
|
@ -32,7 +32,8 @@ OB_SERIALIZE_MEMBER(ObLockParam,
|
||||
expired_time_,
|
||||
schema_version_,
|
||||
is_for_replace_,
|
||||
lock_priority_);
|
||||
lock_priority_,
|
||||
is_two_phase_lock_);
|
||||
|
||||
OB_SERIALIZE_MEMBER(ObLockRequest,
|
||||
type_,
|
||||
@ -205,6 +206,7 @@ void ObLockParam::reset()
|
||||
schema_version_ = -1;
|
||||
is_for_replace_ = false;
|
||||
lock_priority_ = ObTableLockPriority::NORMAL;
|
||||
is_two_phase_lock_ = false;
|
||||
}
|
||||
|
||||
int ObLockParam::set(
|
||||
@ -242,6 +244,7 @@ bool ObLockParam::is_valid() const
|
||||
return (lock_id_.is_valid() &&
|
||||
is_lock_mode_valid(lock_mode_) &&
|
||||
is_op_type_valid(op_type_) &&
|
||||
!(ObTableLockPriority::NORMAL != lock_priority_ && !is_two_phase_lock_) &&
|
||||
(schema_version_ >= 0 ||
|
||||
(ObLockOBJType::OBJ_TYPE_COMMON_OBJ == lock_id_.obj_type_
|
||||
|| ObLockOBJType::OBJ_TYPE_TENANT == lock_id_.obj_type_
|
||||
|
@ -75,7 +75,8 @@ public:
|
||||
expired_time_(0),
|
||||
schema_version_(-1),
|
||||
is_for_replace_(false),
|
||||
lock_priority_(ObTableLockPriority::NORMAL)
|
||||
lock_priority_(ObTableLockPriority::NORMAL),
|
||||
is_two_phase_lock_(false)
|
||||
{}
|
||||
virtual ~ObLockParam() { reset(); }
|
||||
void reset();
|
||||
@ -108,6 +109,7 @@ public:
|
||||
int64_t schema_version_;
|
||||
bool is_for_replace_;
|
||||
ObTableLockPriority lock_priority_;
|
||||
bool is_two_phase_lock_;
|
||||
};
|
||||
|
||||
struct ObLockRequest
|
||||
|
@ -2905,6 +2905,7 @@ extra_info varchar(256) NO NULL
|
||||
time_after_create bigint(20) NO NULL
|
||||
obj_type varchar(16) NO NULL
|
||||
obj_id bigint(20) NO NULL
|
||||
owner_type bigint(20) NO NULL
|
||||
select /*+QUERY_TIMEOUT(60000000)*/ IF(count(*) >= 0, 1, 0) from oceanbase.__all_virtual_obj_lock;
|
||||
IF(count(*) >= 0, 1, 0)
|
||||
1
|
||||
|
@ -6513,6 +6513,7 @@ extra_info varchar(256) NO NULL
|
||||
time_after_create bigint(20) NO NULL
|
||||
obj_type varchar(16) NO NULL
|
||||
obj_id bigint(20) NO NULL
|
||||
owner_type bigint(20) NO NULL
|
||||
select /*+QUERY_TIMEOUT(60000000)*/ IF(count(*) >= 0, 1, 0) from oceanbase.__all_virtual_obj_lock;
|
||||
IF(count(*) >= 0, 1, 0)
|
||||
1
|
||||
|
Loading…
x
Reference in New Issue
Block a user