Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
大炮V587
oceanbase
提交
65e0d259
O
oceanbase
项目概览
大炮V587
/
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,发现更多精彩内容 >>
提交
65e0d259
编写于
2月 07, 2023
作者:
S
simonjoylet
提交者:
ob-robot
2月 07, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fixed invalid PalfEnvKey when handle message on arbserver
上级
a00463ed
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
28 addition
and
12 deletion
+28
-12
deps/oblib/src/rpc/obrpc/ob_rpc_proxy.cpp
deps/oblib/src/rpc/obrpc/ob_rpc_proxy.cpp
+9
-1
deps/oblib/src/rpc/obrpc/ob_rpc_proxy.h
deps/oblib/src/rpc/obrpc/ob_rpc_proxy.h
+5
-0
mittest/logservice/test_ob_simple_arb_server_mutil_replica.cpp
...st/logservice/test_ob_simple_arb_server_mutil_replica.cpp
+5
-2
src/logservice/palf/log_rpc.cpp
src/logservice/palf/log_rpc.cpp
+2
-1
src/logservice/palf/log_rpc.h
src/logservice/palf/log_rpc.h
+1
-0
src/logservice/palf/palf_env.cpp
src/logservice/palf/palf_env.cpp
+3
-1
src/logservice/palf/palf_env_impl.cpp
src/logservice/palf/palf_env_impl.cpp
+2
-1
src/logservice/palf/palf_env_impl.h
src/logservice/palf/palf_env_impl.h
+1
-0
src/storage/ddl/ob_tablet_ddl_kv.cpp
src/storage/ddl/ob_tablet_ddl_kv.cpp
+0
-6
未找到文件。
deps/oblib/src/rpc/obrpc/ob_rpc_proxy.cpp
浏览文件 @
65e0d259
...
...
@@ -47,6 +47,13 @@ Handle::Handle()
int
ObRpcProxy
::
init
(
const
ObReqTransport
*
transport
,
const
oceanbase
::
common
::
ObAddr
&
dst
)
{
return
init
(
transport
,
ObRpcNetHandler
::
CLUSTER_ID
,
dst
);
}
int
ObRpcProxy
::
init
(
const
ObReqTransport
*
transport
,
const
int64_t
src_cluster_id
,
const
oceanbase
::
common
::
ObAddr
&
dst
)
{
int
ret
=
OB_SUCCESS
;
...
...
@@ -58,6 +65,7 @@ int ObRpcProxy::init(const ObReqTransport *transport,
LOG_WARN
(
"invalid argument"
,
K
(
ret
),
KP
(
transport
));
}
else
{
transport_
=
transport
;
src_cluster_id_
=
src_cluster_id
;
dst_
=
dst
;
init_
=
true
;
}
...
...
@@ -250,7 +258,7 @@ int ObRpcProxy::init_pkt(
pkt
->
set_timestamp
(
ObTimeUtility
::
current_time
());
pkt
->
set_dst_cluster_id
(
dst_cluster_id_
);
// For request, src_cluster_id must be the cluster_id of this cluster, directly hard-coded
pkt
->
set_src_cluster_id
(
ObRpcNetHandler
::
CLUSTER_ID
);
pkt
->
set_src_cluster_id
(
src_cluster_id_
);
pkt
->
set_unis_version
(
opts
.
unis_version_
);
pkt
->
set_group_id
((
0
!=
get_group_id
())
?
get_group_id
()
:
this_worker
().
get_group_id
());
if
(
need_increment_request_level
(
pcode
))
{
...
...
deps/oblib/src/rpc/obrpc/ob_rpc_proxy.h
浏览文件 @
65e0d259
...
...
@@ -117,12 +117,16 @@ public:
tenant_id_
(
common
::
OB_SYS_TENANT_ID
),
group_id_
(
0
),
priv_tenant_id_
(
common
::
OB_INVALID_TENANT_ID
),
max_process_handler_time_
(
0
),
compressor_type_
(
common
::
INVALID_COMPRESSOR
),
src_cluster_id_
(
common
::
OB_INVALID_CLUSTER_ID
),
dst_cluster_id_
(
common
::
OB_INVALID_CLUSTER_ID
),
init_
(
false
),
active_
(
true
),
is_trace_time_
(
false
),
do_ratelimit_
(
false
),
is_bg_flow_
(
0
),
rcode_
()
{}
virtual
~
ObRpcProxy
()
=
default
;
int
init
(
const
rpc
::
frame
::
ObReqTransport
*
transport
,
const
common
::
ObAddr
&
dst
=
common
::
ObAddr
());
int
init
(
const
rpc
::
frame
::
ObReqTransport
*
transport
,
const
int64_t
src_cluster_id
,
const
common
::
ObAddr
&
dst
=
common
::
ObAddr
());
void
destroy
()
{
init_
=
false
;
}
bool
is_inited
()
const
{
return
init_
;
}
void
set_timeout
(
int64_t
timeout
)
{
timeout_
=
timeout
;
}
...
...
@@ -253,6 +257,7 @@ protected:
uint64_t
priv_tenant_id_
;
uint32_t
max_process_handler_time_
;
common
::
ObCompressorType
compressor_type_
;
int64_t
src_cluster_id_
;
int64_t
dst_cluster_id_
;
bool
init_
;
bool
active_
;
...
...
mittest/logservice/test_ob_simple_arb_server_mutil_replica.cpp
浏览文件 @
65e0d259
...
...
@@ -11,9 +11,11 @@
#include <gtest/gtest.h>
#include <signal.h>
#define private public
#define protected public
#include "env/ob_simple_log_cluster_env.h"
#undef private
#include "rootserver/ob_rs_async_rpc_proxy.h"
#undef private
#undef protected
const
std
::
string
TEST_NAME
=
"mutil_arb_server"
;
...
...
@@ -289,7 +291,8 @@ TEST_F(TestObSimpleMutilArbServer, test_gc)
for
(
auto
cluster_id
:
gc_cluster_ids
)
{
ObArbGCNotifyArg
arg
;
ObArbGCNotifyResult
result
;
ObRpcNetHandler
::
CLUSTER_ID
=
cluster_id
;
//ObRpcNetHandler::CLUSTER_ID = cluster_id;
rpc_proxy
.
src_cluster_id_
=
cluster_id
;
array
.
set_max_tenant_id
(
max_tenant_id
);
EXPECT_EQ
(
OB_SUCCESS
,
arg
.
init
(
epoch
,
array
));
EXPECT_EQ
(
OB_SUCCESS
,
rpc_proxy
.
to
(
dst_addr
).
arb_gc_notify
(
arg
,
result
));
...
...
src/logservice/palf/log_rpc.cpp
浏览文件 @
65e0d259
...
...
@@ -35,13 +35,14 @@ LogRpc::~LogRpc()
}
int
LogRpc
::
init
(
const
ObAddr
&
self
,
const
int64_t
cluster_id
,
const
int64_t
tenant_id
,
rpc
::
frame
::
ObReqTransport
*
transport
)
{
int
ret
=
OB_SUCCESS
;
if
(
IS_INIT
)
{
ret
=
OB_INIT_TWICE
;
}
else
if
(
OB_FAIL
(
rpc_proxy_
.
init
(
transport
)))
{
}
else
if
(
OB_FAIL
(
rpc_proxy_
.
init
(
transport
,
cluster_id
)))
{
PALF_LOG
(
ERROR
,
"LogRpcProxyV2 init failed"
,
K
(
ret
));
}
else
{
self_
=
self
;
...
...
src/logservice/palf/log_rpc.h
浏览文件 @
65e0d259
...
...
@@ -70,6 +70,7 @@ public:
LogRpc
();
~
LogRpc
();
int
init
(
const
common
::
ObAddr
&
self
,
const
int64_t
cluster_id
,
const
int64_t
tenant_id
,
rpc
::
frame
::
ObReqTransport
*
transport
);
void
destroy
();
...
...
src/logservice/palf/palf_env.cpp
浏览文件 @
65e0d259
...
...
@@ -16,6 +16,7 @@
#include "palf_env_impl.h"
#include "palf_handle_impl.h"
#include "rpc/frame/ob_req_transport.h"
#include "rpc/obrpc/ob_rpc_net_handler.h"
#include "share/allocator/ob_tenant_mutil_allocator.h"
#include "palf_handle.h"
#include "palf_options.h"
...
...
@@ -52,7 +53,8 @@ int PalfEnv::create_palf_env(
ret
=
OB_ALLOCATE_MEMORY_FAILED
;
}
else
if
(
OB_FAIL
(
FileDirectoryUtils
::
delete_tmp_file_or_directory_at
(
base_dir
)))
{
CLOG_LOG
(
WARN
,
"delete_tmp_file_or_directory_at failed"
,
K
(
ret
),
K
(
base_dir
));
}
else
if
(
OB_FAIL
(
palf_env
->
palf_env_impl_
.
init
(
options
,
base_dir
,
self
,
MTL_ID
(),
transport
,
}
else
if
(
OB_FAIL
(
palf_env
->
palf_env_impl_
.
init
(
options
,
base_dir
,
self
,
obrpc
::
ObRpcNetHandler
::
CLUSTER_ID
,
MTL_ID
(),
transport
,
log_alloc_mgr
,
log_block_pool
)))
{
PALF_LOG
(
WARN
,
"PalfEnvImpl init failed"
,
K
(
ret
),
K
(
base_dir
));
}
else
if
(
OB_FAIL
(
palf_env
->
start_
()))
{
...
...
src/logservice/palf/palf_env_impl.cpp
浏览文件 @
65e0d259
...
...
@@ -162,6 +162,7 @@ PalfEnvImpl::~PalfEnvImpl()
int
PalfEnvImpl
::
init
(
const
PalfOptions
&
options
,
const
char
*
base_dir
,
const
ObAddr
&
self
,
const
int64_t
cluster_id
,
const
int64_t
tenant_id
,
rpc
::
frame
::
ObReqTransport
*
transport
,
common
::
ObILogAllocator
*
log_alloc_mgr
,
...
...
@@ -185,7 +186,7 @@ int PalfEnvImpl::init(
KP
(
log_alloc_mgr
),
KP
(
log_block_pool
));
}
else
if
(
OB_FAIL
(
fetch_log_engine_
.
init
(
this
,
log_alloc_mgr
)))
{
PALF_LOG
(
ERROR
,
"FetchLogEngine init failed"
,
K
(
ret
));
}
else
if
(
OB_FAIL
(
log_rpc_
.
init
(
self
,
tenant_id
,
transport
)))
{
}
else
if
(
OB_FAIL
(
log_rpc_
.
init
(
self
,
cluster_id
,
tenant_id
,
transport
)))
{
PALF_LOG
(
ERROR
,
"LogRpc init failed"
,
K
(
ret
));
}
else
if
(
OB_FAIL
(
cb_thread_pool_
.
init
(
io_cb_num
,
this
)))
{
PALF_LOG
(
ERROR
,
"LogIOTaskThreadPool init failed"
,
K
(
ret
));
...
...
src/logservice/palf/palf_env_impl.h
浏览文件 @
65e0d259
...
...
@@ -176,6 +176,7 @@ public:
int
init
(
const
PalfOptions
&
options
,
const
char
*
base_dir
,
const
common
::
ObAddr
&
self
,
const
int64_t
cluster_id
,
const
int64_t
tenant_id
,
rpc
::
frame
::
ObReqTransport
*
transport
,
common
::
ObILogAllocator
*
alloc_mgr
,
...
...
src/storage/ddl/ob_tablet_ddl_kv.cpp
浏览文件 @
65e0d259
...
...
@@ -158,12 +158,6 @@ void ObBlockMetaTree::destroy()
macro_blocks_
.
reset
();
block_tree_
.
destroy
();
data_desc_
.
reset
();
for
(
int64_t
i
=
0
;
i
<
sorted_rowkeys_
.
count
();
++
i
)
{
const
ObDataMacroBlockMeta
*
cur_meta
=
sorted_rowkeys_
.
at
(
i
).
block_meta_
;
if
(
OB_NOT_NULL
(
cur_meta
))
{
cur_meta
->~
ObDataMacroBlockMeta
();
}
}
sorted_rowkeys_
.
reset
();
tree_allocator_
.
reset
();
arena_
.
reset
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录