Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
apache
Incubator Pegasus
提交
6ba8e29c
Incubator Pegasus
项目概览
apache
/
Incubator Pegasus
通知
9
Star
5
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Incubator Pegasus
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
6ba8e29c
编写于
4月 26, 2018
作者:
W
WeijieSun
提交者:
QinZuoyan
4月 26, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
client & server: fix as storage rpc code definition are modified in rdsn (#28)
上级
1217a9a9
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
23 addition
and
74 deletion
+23
-74
rdsn
rdsn
+1
-1
src/include/rrdb/rrdb.client.h
src/include/rrdb/rrdb.client.h
+3
-1
src/include/rrdb/rrdb.code.definition.h
src/include/rrdb/rrdb.code.definition.h
+12
-17
src/server/config-server.ini
src/server/config-server.ini
+0
-18
src/server/config.ini
src/server/config.ini
+0
-27
src/server/main.cpp
src/server/main.cpp
+0
-4
src/server/pegasus_counter_updater.cpp
src/server/pegasus_counter_updater.cpp
+6
-6
src/shell/commands.h
src/shell/commands.h
+1
-0
未找到文件。
rdsn
@
655e8b7a
比较
4da42959
...
655e8b7a
Subproject commit
4da42959926c43d971e6ea93f30f59b5ba02e6bb
Subproject commit
655e8b7a2b78644190ddfbe3d5961fba51177165
src/include/rrdb/rrdb.client.h
浏览文件 @
6ba8e29c
#pragma once
#include "rrdb.code.definition.h"
#include "rrdb.types.h"
#include <iostream>
namespace
dsn
{
...
...
@@ -9,6 +10,7 @@ class rrdb_client : public virtual ::dsn::clientlet
public:
rrdb_client
()
{}
explicit
rrdb_client
(
::
dsn
::
rpc_address
server
)
{
_server
=
server
;
}
virtual
~
rrdb_client
()
{}
// ---------- call RPC_RRDB_RRDB_PUT ------------
...
...
@@ -465,4 +467,4 @@ private:
::
dsn
::
rpc_address
_server
;
};
}
}
\ No newline at end of file
}
src/include/rrdb/rrdb.code.definition.h
浏览文件 @
6ba8e29c
#pragma once
#include <dsn/service_api_cpp.h>
#include "rrdb.types.h"
#include <dsn/dist/replication/replication.codes.h>
namespace
dsn
{
namespace
apps
{
// define your own thread pool using DEFINE_THREAD_POOL_CODE(xxx)
// define RPC task code for service 'rrdb'
DEFINE_TASK_CODE_RPC
(
RPC_RRDB_RRDB_PUT
,
TASK_PRIORITY_COMMON
,
::
dsn
::
THREAD_POOL_DEFAULT
)
DEFINE_TASK_CODE_RPC
(
RPC_RRDB_RRDB_MULTI_PUT
,
TASK_PRIORITY_COMMON
,
::
dsn
::
THREAD_POOL_DEFAULT
)
DEFINE_TASK_CODE_RPC
(
RPC_RRDB_RRDB_REMOVE
,
TASK_PRIORITY_COMMON
,
::
dsn
::
THREAD_POOL_DEFAULT
)
DEFINE_TASK_CODE_RPC
(
RPC_RRDB_RRDB_MULTI_REMOVE
,
TASK_PRIORITY_COMMON
,
::
dsn
::
THREAD_POOL_DEFAULT
)
DEFINE_TASK_CODE_RPC
(
RPC_RRDB_RRDB_GET
,
TASK_PRIORITY_COMMON
,
::
dsn
::
THREAD_POOL_DEFAULT
)
DEFINE_TASK_CODE_RPC
(
RPC_RRDB_RRDB_MULTI_GET
,
TASK_PRIORITY_COMMON
,
::
dsn
::
THREAD_POOL_DEFAULT
)
DEFINE_TASK_CODE_RPC
(
RPC_RRDB_RRDB_SORTKEY_COUNT
,
TASK_PRIORITY_COMMON
,
::
dsn
::
THREAD_POOL_DEFAULT
)
DEFINE_TASK_CODE_RPC
(
RPC_RRDB_RRDB_TTL
,
TASK_PRIORITY_COMMON
,
::
dsn
::
THREAD_POOL_DEFAULT
)
DEFINE_TASK_CODE_RPC
(
RPC_RRDB_RRDB_GET_SCANNER
,
TASK_PRIORITY_COMMON
,
::
dsn
::
THREAD_POOL_DEFAULT
)
DEFINE_TASK_CODE_RPC
(
RPC_RRDB_RRDB_SCAN
,
TASK_PRIORITY_COMMON
,
::
dsn
::
THREAD_POOL_DEFAULT
)
DEFINE_TASK_CODE_RPC
(
RPC_RRDB_RRDB_CLEAR_SCANNER
,
TASK_PRIORITY_COMMON
,
::
dsn
::
THREAD_POOL_DEFAULT
)
// test timer task code
DEFINE_TASK_CODE
(
LPC_RRDB_TEST_TIMER
,
TASK_PRIORITY_COMMON
,
::
dsn
::
THREAD_POOL_DEFAULT
)
DEFINE_STORAGE_WRITE_RPC_CODE
(
RPC_RRDB_RRDB_PUT
,
true
)
DEFINE_STORAGE_WRITE_RPC_CODE
(
RPC_RRDB_RRDB_MULTI_PUT
,
false
)
DEFINE_STORAGE_WRITE_RPC_CODE
(
RPC_RRDB_RRDB_REMOVE
,
true
)
DEFINE_STORAGE_WRITE_RPC_CODE
(
RPC_RRDB_RRDB_MULTI_REMOVE
,
false
)
DEFINE_STORAGE_READ_RPC_CODE
(
RPC_RRDB_RRDB_GET
)
DEFINE_STORAGE_READ_RPC_CODE
(
RPC_RRDB_RRDB_MULTI_GET
)
DEFINE_STORAGE_READ_RPC_CODE
(
RPC_RRDB_RRDB_SORTKEY_COUNT
)
DEFINE_STORAGE_READ_RPC_CODE
(
RPC_RRDB_RRDB_TTL
)
DEFINE_STORAGE_READ_RPC_CODE
(
RPC_RRDB_RRDB_GET_SCANNER
)
DEFINE_STORAGE_READ_RPC_CODE
(
RPC_RRDB_RRDB_SCAN
)
DEFINE_STORAGE_READ_RPC_CODE
(
RPC_RRDB_RRDB_CLEAR_SCANNER
)
}
}
src/server/config-server.ini
浏览文件 @
6ba8e29c
...
...
@@ -324,24 +324,6 @@ is_profile = true
;profiler::qps = false
;profiler::cancelled = false
[task.RPC_L2_CLIENT_READ]
is_profile
=
true
profiler::
inqueue
=
false
;profiler::queue = false
;profiler::exec = false
;profiler::qps = false
;profiler::cancelled = false
;profiler::latency.server = false
[task.RPC_L2_CLIENT_WRITE]
is_profile
=
true
profiler::
inqueue
=
false
;profiler::queue = false
;profiler::exec = false
;profiler::qps = false
;profiler::cancelled = false
;profiler::latency.server = false
[task.LPC_AIO_BATCH_WRITE]
is_profile
=
true
profiler::
inqueue
=
false
...
...
src/server/config.ini
浏览文件 @
6ba8e29c
...
...
@@ -449,21 +449,7 @@
[task.LPC_REPLICATION_COLD_BACKUP]
;is_profile = true
[task.RPC_L2_CLIENT_WRITE]
is_profile
=
true
[task.RPC_L2_CLIENT_WRITE_ACK]
is_profiler
=
true
[task.RPC_L2_CLIENT_READ]
is_profile
=
true
[task.RPC_L2_CLIENT_READ_ACK]
is_profiler
=
true
[task.RPC_RRDB_RRDB_PUT]
rpc_request_is_write_operation
=
true
rpc_request_is_write_allow_batch
=
true
rpc_request_throttling_mode
=
TM_DELAY
rpc_request_delays_milliseconds
=
1000, 1000, 1000, 1000, 1000, 10000
is_profile
=
true
...
...
@@ -472,8 +458,6 @@
is_profile
=
true
[task.RPC_RRDB_RRDB_MULTI_PUT]
rpc_request_is_write_operation
=
true
rpc_request_is_write_allow_batch
=
false
rpc_request_throttling_mode
=
TM_DELAY
rpc_request_delays_milliseconds
=
1000, 1000, 1000, 1000, 1000, 10000
is_profile
=
true
...
...
@@ -482,8 +466,6 @@
is_profile
=
true
[task.RPC_RRDB_RRDB_REMOVE]
rpc_request_is_write_operation
=
true
rpc_request_is_write_allow_batch
=
true
rpc_request_throttling_mode
=
TM_DELAY
rpc_request_delays_milliseconds
=
1000, 1000, 1000, 1000, 1000, 10000
is_profile
=
true
...
...
@@ -492,8 +474,6 @@
is_profile
=
true
[task.RPC_RRDB_RRDB_MULTI_REMOVE]
rpc_request_is_write_operation
=
true
rpc_request_is_write_allow_batch
=
false
rpc_request_throttling_mode
=
TM_DELAY
rpc_request_delays_milliseconds
=
1000, 1000, 1000, 1000, 1000, 10000
is_profile
=
true
...
...
@@ -502,7 +482,6 @@
is_profile
=
true
[task.RPC_RRDB_RRDB_GET]
rpc_request_is_write_operation
=
false
rpc_request_throttling_mode
=
TM_DELAY
rpc_request_delays_milliseconds
=
1000, 1000, 1000, 1000, 1000, 10000
is_profile
=
true
...
...
@@ -511,7 +490,6 @@
is_profile
=
true
[task.RPC_RRDB_RRDB_MULTI_GET]
rpc_request_is_write_operation
=
false
rpc_request_throttling_mode
=
TM_DELAY
rpc_request_delays_milliseconds
=
1000, 1000, 1000, 1000, 1000, 10000
is_profile
=
true
...
...
@@ -520,7 +498,6 @@
is_profile
=
true
[task.RPC_RRDB_RRDB_SORTKEY_COUNT]
rpc_request_is_write_operation
=
false
rpc_request_throttling_mode
=
TM_DELAY
rpc_request_delays_milliseconds
=
1000, 1000, 1000, 1000, 1000, 10000
is_profile
=
true
...
...
@@ -529,7 +506,6 @@
is_profile
=
true
[task.RPC_RRDB_RRDB_TTL]
rpc_request_is_write_operation
=
false
rpc_request_throttling_mode
=
TM_DELAY
rpc_request_delays_milliseconds
=
1000, 1000, 1000, 1000, 1000, 10000
is_profile
=
true
...
...
@@ -538,7 +514,6 @@
is_profile
=
true
[task.RPC_RRDB_RRDB_GET_SCANNER]
rpc_request_is_write_operation
=
false
rpc_request_throttling_mode
=
TM_DELAY
rpc_request_delays_milliseconds
=
1000, 1000, 1000, 1000, 1000, 10000
is_profile
=
true
...
...
@@ -547,7 +522,6 @@
is_profile
=
true
[task.RPC_RRDB_RRDB_SCAN]
rpc_request_is_write_operation
=
false
rpc_request_throttling_mode
=
TM_DELAY
rpc_request_delays_milliseconds
=
1000, 1000, 1000, 1000, 1000, 10000
is_profile
=
true
...
...
@@ -556,7 +530,6 @@
is_profile
=
true
[task.RPC_RRDB_RRDB_CLEAR_SCANNER]
rpc_request_is_write_operation
=
false
rpc_request_throttling_mode
=
TM_DELAY
rpc_request_delays_milliseconds
=
1000, 1000, 1000, 1000, 1000, 10000
is_profile
=
true
...
...
src/server/main.cpp
浏览文件 @
6ba8e29c
...
...
@@ -35,10 +35,6 @@ using namespace dsn::replication;
void
dsn_app_registration_pegasus
()
{
dsn
::
task_code
rpc_read
(
"RPC_L2_CLIENT_READ"
,
TASK_TYPE_RPC_REQUEST
,
TASK_PRIORITY_COMMON
,
THREAD_POOL_LOCAL_APP
);
dsn
::
task_code
rpc_write
(
"RPC_L2_CLIENT_WRITE"
,
TASK_TYPE_RPC_REQUEST
,
TASK_PRIORITY_LOW
,
THREAD_POOL_REPLICATION
);
dsn_meta_sever_register_providers
();
service_app
::
register_factory
<::
pegasus
::
server
::
pegasus_replication_service_app
>
(
"replica"
);
...
...
src/server/pegasus_counter_updater.cpp
浏览文件 @
6ba8e29c
...
...
@@ -25,12 +25,12 @@ namespace server {
// clang-format off
static
const
char
*
s_brief_stat_mapper
[]
=
{
"
write_qps"
,
"zion*profiler*RPC_L2_CLIENT_WRITE
.qps"
,
"
PUT_P
99(ns)"
,
"zion*profiler*RPC_RRDB_RRDB_PUT.latency.server"
,
"
MULTI_PUT_P
99(ns)"
,
"zion*profiler*RPC_RRDB_RRDB_MULTI_PUT.latency.server"
,
"
read_qps"
,
"zion*profiler*RPC_L2_CLIENT_READ
.qps"
,
"
GET_P
99(ns)"
,
"zion*profiler*RPC_RRDB_RRDB_GET.latency.server"
,
"
MULTI_GET_P
99(ns)"
,
"zion*profiler*RPC_RRDB_RRDB_MULTI_GET.latency.server"
,
"
put_qps"
,
"zion*profiler*RPC_RRDB_RRDB_PUT
.qps"
,
"
put_p
99(ns)"
,
"zion*profiler*RPC_RRDB_RRDB_PUT.latency.server"
,
"
multi_put_p
99(ns)"
,
"zion*profiler*RPC_RRDB_RRDB_MULTI_PUT.latency.server"
,
"
get_qps"
,
"zion*profiler*RPC_RRDB_RRDB_GET
.qps"
,
"
get_p
99(ns)"
,
"zion*profiler*RPC_RRDB_RRDB_GET.latency.server"
,
"
multi_get_p
99(ns)"
,
"zion*profiler*RPC_RRDB_RRDB_MULTI_GET.latency.server"
,
"serving_replica_count"
,
"replica*eon.replica_stub*replica(Count)"
,
"opening_replica_count"
,
"replica*eon.replica_stub*opening.replica(Count)"
,
"closing_replica_count"
,
"replica*eon.replica_stub*closing.replica(Count)"
,
...
...
src/shell/commands.h
浏览文件 @
6ba8e29c
...
...
@@ -20,6 +20,7 @@
#include <dsn/dist/replication/replication_ddl_client.h>
#include <dsn/dist/replication/mutation_log_tool.h>
#include <rrdb/rrdb.code.definition.h>
#include <rrdb/rrdb.types.h>
#include <dsn/tool/cli/cli.client.h>
#include <boost/lexical_cast.hpp>
#include <boost/algorithm/string.hpp>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录