Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Metz
oceanbase
提交
8d61732e
O
oceanbase
项目概览
Metz
/
oceanbase
与 Fork 源项目一致
Fork自
oceanbase / oceanbase
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
oceanbase
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
8d61732e
编写于
7月 23, 2021
作者:
L
ly0
提交者:
wangzelin.wzl
7月 23, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
patch some bug fix:part 1
上级
49b53c45
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
21 addition
and
11 deletion
+21
-11
deps/oblib/src/lib/oblog/ob_log.cpp
deps/oblib/src/lib/oblog/ob_log.cpp
+0
-1
deps/oblib/src/rpc/frame/ob_req_queue_thread.cpp
deps/oblib/src/rpc/frame/ob_req_queue_thread.cpp
+1
-1
deps/oblib/src/rpc/obrpc/ob_rpc_session_handler.cpp
deps/oblib/src/rpc/obrpc/ob_rpc_session_handler.cpp
+1
-1
src/observer/omt/ob_multi_tenant.cpp
src/observer/omt/ob_multi_tenant.cpp
+4
-8
src/observer/omt/ob_multi_tenant.h
src/observer/omt/ob_multi_tenant.h
+7
-0
src/observer/omt/ob_tenant.cpp
src/observer/omt/ob_tenant.cpp
+6
-0
src/observer/omt/ob_worker_pool.cpp
src/observer/omt/ob_worker_pool.cpp
+2
-0
未找到文件。
deps/oblib/src/lib/oblog/ob_log.cpp
浏览文件 @
8d61732e
...
...
@@ -864,7 +864,6 @@ void ObLogger::log_data(const char* mod_name, int32_t level, LogLocation locatio
last_msg_time
=
e_ts
-
b_ts
;
}
}
this_routine
::
check
();
}
void
ObLogger
::
rotate_log
(
...
...
deps/oblib/src/rpc/frame/ob_req_queue_thread.cpp
浏览文件 @
8d61732e
...
...
@@ -163,7 +163,7 @@ void ObReqQueue::loop()
"wait finish, remain %ld task"
,
"qsize"
,
queue_
.
size
());
}
else
if
(
0
=
=
queue_
.
size
())
{
}
else
if
(
0
!
=
queue_
.
size
())
{
LOG_INFO
(
"exiting queue thread and wait remain finish"
);
// Process remains if we should wait until all task has been
// processed before exiting this thread. Previous return code
...
...
deps/oblib/src/rpc/obrpc/ob_rpc_session_handler.cpp
浏览文件 @
8d61732e
...
...
@@ -90,7 +90,7 @@ int ObRpcSessionHandler::prepare_for_next_request(int64_t sessid)
wait_object
.
thid_
=
get_itid
();
wait_object
.
req_
=
NULL
;
if
(
wait_object
.
thid_
<
0
||
wait_object
.
thid_
>=
MAX_COND_COUNT
)
{
if
(
wait_object
.
thid_
<
0
)
{
ret
=
OB_ERR_UNEXPECTED
;
LOG_WARN
(
"Thread id no valid"
,
K
(
ret
),
"thread id"
,
wait_object
.
thid_
);
}
else
{
...
...
src/observer/omt/ob_multi_tenant.cpp
浏览文件 @
8d61732e
...
...
@@ -155,10 +155,8 @@ int ObMultiTenant::init(ObAddr myaddr, double node_quota, int64_t times_of_worke
myaddr_
=
myaddr
;
node_quota_
=
node_quota
;
const
int64_t
total_reserved_quota
=
static_cast
<
int64_t
>
(
GCONF
.
system_cpu_quota
+
GCONF
.
election_cpu_quota
+
GCONF
.
user_location_cpu_quota
()
+
GCONF
.
sys_location_cpu_quota
()
+
GCONF
.
root_location_cpu_quota
()
+
GCONF
.
core_location_cpu_quota
()
+
EXT_LOG_TENANT_CPU
+
OB_MONITOR_CPU
+
OB_SVR_BLACKLIST_CPU
);
const
int64_t
total_reserved_quota
=
static_cast
<
int64_t
>
(
VIRTUAL_TENANTS_CPU_RESERVED_QUOTA
);
int64_t
init_workers_cnt
=
(
static_cast
<
int64_t
>
(
node_quota
)
+
static_cast
<
int64_t
>
(
GCONF
.
server_cpu_quota_min
))
*
DEFAULT_TIMES_OF_WORKERS
+
...
...
@@ -732,10 +730,8 @@ int ObMultiTenant::get_tenant_cpu(const uint64_t tenant_id, double& min_cpu, dou
void
ObMultiTenant
::
set_workers_per_cpu
(
int64_t
v
)
{
times_of_workers_
=
v
;
const
int64_t
total_reserved_quota
=
static_cast
<
int64_t
>
(
GCONF
.
system_cpu_quota
+
GCONF
.
election_cpu_quota
+
GCONF
.
user_location_cpu_quota
()
+
GCONF
.
sys_location_cpu_quota
()
+
GCONF
.
root_location_cpu_quota
()
+
GCONF
.
core_location_cpu_quota
()
+
EXT_LOG_TENANT_CPU
+
OB_MONITOR_CPU
+
OB_SVR_BLACKLIST_CPU
);
const
int64_t
total_reserved_quota
=
static_cast
<
int64_t
>
(
VIRTUAL_TENANTS_CPU_RESERVED_QUOTA
);
auto
max_workers_cnt
=
static_cast
<
int64_t
>
(
node_quota_
)
*
times_of_workers_
+
total_reserved_quota
*
static_cast
<
int64_t
>
(
quota2token_
)
+
static_cast
<
int64_t
>
(
node_quota_
)
*
16
;
...
...
src/observer/omt/ob_multi_tenant.h
浏览文件 @
8d61732e
...
...
@@ -31,6 +31,13 @@ class ObRequest;
}
namespace
omt
{
#define VIRTUAL_TENANTS_CPU_RESERVED_QUOTA \
(GCONF.system_cpu_quota \
+ GCONF.election_cpu_quota \
+ GCONF.user_location_cpu_quota() + GCONF.sys_location_cpu_quota() \
+ GCONF.root_location_cpu_quota() + GCONF.core_location_cpu_quota() \
+ EXT_LOG_TENANT_CPU + OB_MONITOR_CPU \
+ OB_SVR_BLACKLIST_CPU + OB_DATA_CPU + OB_DTL_CPU + OB_RS_CPU + OB_DIAG_CPU)
struct
ObCtxMemConfig
{
ObCtxMemConfig
()
:
ctx_id_
(
0
),
idle_size_
(
0
)
...
...
src/observer/omt/ob_tenant.cpp
浏览文件 @
8d61732e
...
...
@@ -403,6 +403,9 @@ int ObTenant::init()
LOG_ERROR
(
"tenant base init failed"
,
K_
(
id
),
K
(
ret
));
}
}
if
(
OB_SUCCESS
!=
ret
&&
nullptr
!=
multi_level_queue_
)
{
common
::
ob_delete
(
multi_level_queue_
);
}
return
ret
;
}
...
...
@@ -525,6 +528,9 @@ void ObTenant::destroy()
LOG_WARN
(
"remove tenant cgroup failed"
,
K
(
tmp_ret
),
K_
(
id
));
}
ObTenantBase
::
destory
();
if
(
nullptr
!=
multi_level_queue_
)
{
common
::
ob_delete
(
multi_level_queue_
);
}
}
void
ObTenant
::
set_unit_max_cpu
(
double
cpu
)
...
...
src/observer/omt/ob_worker_pool.cpp
浏览文件 @
8d61732e
...
...
@@ -89,6 +89,8 @@ ObThWorker* ObWorkerPool::alloc()
worker
=
nullptr
;
LOG_ERROR
(
"create worker fail"
,
K
(
ret
));
}
}
else
{
LOG_ERROR
(
"worker cnt larger than max cnt"
,
K
(
worker_cnt_
),
K
(
max_cnt_
));
}
}
return
worker
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录