[FEAT MERGE] enhance_ddl_quality
Co-authored-by: renju96 <fcbrenju@163.com>
This commit is contained in:
4
deps/oblib/src/lib/ob_define.h
vendored
4
deps/oblib/src/lib/ob_define.h
vendored
@ -851,7 +851,11 @@ const char *const OB_DIAG_TENANT_NAME = "diag";
|
||||
//for sync ddl (ClusterID_TenantID_SchemaVersion)
|
||||
const char *const OB_DDL_ID_VAR_NAME = "__oceanbase_ddl_id";
|
||||
const int64_t OB_MAX_DDL_ID_STR_LENGTH = 64;
|
||||
#ifdef ERRSIM
|
||||
const int64_t OB_MAX_DDL_SINGLE_REPLICA_BUILD_TIMEOUT = 30L * 60L * 1000L * 1000L; // 30 minutes
|
||||
#else
|
||||
const int64_t OB_MAX_DDL_SINGLE_REPLICA_BUILD_TIMEOUT = 7L * 24L * 60L * 60L * 1000L * 1000L; // 7days
|
||||
#endif
|
||||
|
||||
const int64_t OB_MAX_PARTITION_SHARDING_LENGTH = 10;
|
||||
|
||||
|
||||
19
deps/oblib/src/lib/profile/ob_trace_id.h
vendored
19
deps/oblib/src/lib/profile/ob_trace_id.h
vendored
@ -52,6 +52,7 @@ struct ObCurTraceId
|
||||
id_.is_user_request_ = 0;
|
||||
id_.is_ipv6_ = ip_port.using_ipv6();
|
||||
id_.reserved_ = 0;
|
||||
id_.sub_task_ = 0;
|
||||
id_.port_ = static_cast<uint16_t>(ip_port.get_port());
|
||||
if (ip_port.using_ipv6()) {
|
||||
id_.ipv6_[0] = ip_port.get_ipv6_low();
|
||||
@ -157,6 +158,11 @@ struct ObCurTraceId
|
||||
return ret;
|
||||
}
|
||||
|
||||
inline void set_sub_id(const int32_t sub_id)
|
||||
{
|
||||
id_.sub_task_ = sub_id & ((1 << 12) - 1);
|
||||
}
|
||||
|
||||
inline int64_t hash() const
|
||||
{
|
||||
int64_t hash_value = 0;
|
||||
@ -181,8 +187,9 @@ struct ObCurTraceId
|
||||
uint32_t ip_: 32;
|
||||
uint16_t port_: 16;
|
||||
uint8_t is_user_request_: 1;
|
||||
uint8_t is_ipv6_:1;
|
||||
uint16_t reserved_: 14;
|
||||
uint8_t is_ipv6_: 1;
|
||||
uint16_t reserved_: 2;
|
||||
uint16_t sub_task_: 12;
|
||||
uint64_t seq_: 64;
|
||||
uint64_t ipv6_[2];
|
||||
} id_;
|
||||
@ -214,6 +221,14 @@ struct ObCurTraceId
|
||||
}
|
||||
}
|
||||
|
||||
inline static void set_sub_id(const int32_t sub_id)
|
||||
{
|
||||
TraceId *trace_id = get_trace_id();
|
||||
if (NULL != trace_id) {
|
||||
trace_id->set_sub_id(sub_id);
|
||||
}
|
||||
}
|
||||
|
||||
inline static void reset()
|
||||
{
|
||||
TraceId *trace_id = get_trace_id();
|
||||
|
||||
Reference in New Issue
Block a user