Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
40617f5d
T
TDengine
项目概览
taosdata
/
TDengine
12 个月 前同步成功
通知
1181
Star
22014
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
40617f5d
编写于
11月 25, 2019
作者:
H
haojun Liao
提交者:
GitHub
11月 25, 2019
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #769 from taosdata/feature/slguan
Solve the bug of incomplete vnode deletion and vpeer synchronization
上级
ac2ea8b4
b96fdff8
变更
7
显示空白变更内容
内联
并排
Showing
7 changed file
with
24 addition
and
7 deletion
+24
-7
src/os/linux/inc/os.h
src/os/linux/inc/os.h
+1
-0
src/os/linux/src/tlinux.c
src/os/linux/src/tlinux.c
+10
-0
src/system/detail/src/dnodeMgmt.c
src/system/detail/src/dnodeMgmt.c
+3
-2
src/system/detail/src/mgmtDnodeInt.c
src/system/detail/src/mgmtDnodeInt.c
+1
-1
src/system/detail/src/vnodeMeter.c
src/system/detail/src/vnodeMeter.c
+3
-1
src/system/detail/src/vnodeShell.c
src/system/detail/src/vnodeShell.c
+3
-1
src/system/detail/src/vnodeStore.c
src/system/detail/src/vnodeStore.c
+3
-2
未找到文件。
src/os/linux/inc/os.h
浏览文件 @
40617f5d
...
...
@@ -224,6 +224,7 @@ int64_t str2int64(char *str);
void
taosSetCoreDump
();
void
taosBlockSIGPIPE
();
#define BUILDIN_CLZL(val) __builtin_clzl(val)
#define BUILDIN_CLZ(val) __builtin_clz(val)
...
...
src/os/linux/src/tlinux.c
浏览文件 @
40617f5d
...
...
@@ -341,3 +341,13 @@ bool taosSkipSocketCheck() {
return
false
;
}
void
taosBlockSIGPIPE
()
{
sigset_t
signal_mask
;
sigemptyset
(
&
signal_mask
);
sigaddset
(
&
signal_mask
,
SIGPIPE
);
int
rc
=
pthread_sigmask
(
SIG_BLOCK
,
&
signal_mask
,
NULL
);
if
(
rc
!=
0
)
{
pError
(
"failed to block SIGPIPE"
);
}
}
src/system/detail/src/dnodeMgmt.c
浏览文件 @
40617f5d
...
...
@@ -350,8 +350,9 @@ int vnodeProcessVPeerCfg(char *msg, int msgLen, SMgmtObj *pMgmtObj) {
pCfg
->
rowsInFileBlock
=
htonl
(
pCfg
->
rowsInFileBlock
);
if
(
pCfg
->
replications
>
0
)
{
dPrint
(
"vid:%d, vpeer cfg received, replica:%d session:%d, vnodeList replica:%d session:%d"
,
vnode
,
pCfg
->
replications
,
pCfg
->
maxSessions
,
vnodeList
[
vnode
].
cfg
.
replications
,
vnodeList
[
vnode
].
cfg
.
maxSessions
);
dPrint
(
"vid:%d, vpeer cfg received, replica:%d session:%d, vnodeList replica:%d session:%d, acct:%s db:%s"
,
vnode
,
pCfg
->
replications
,
pCfg
->
maxSessions
,
vnodeList
[
vnode
].
cfg
.
replications
,
vnodeList
[
vnode
].
cfg
.
maxSessions
,
pCfg
->
acct
,
pCfg
->
db
);
for
(
i
=
0
;
i
<
pCfg
->
replications
;
++
i
)
{
pMsg
->
vpeerDesc
[
i
].
vnode
=
htonl
(
pMsg
->
vpeerDesc
[
i
].
vnode
);
pMsg
->
vpeerDesc
[
i
].
ip
=
htonl
(
pMsg
->
vpeerDesc
[
i
].
ip
);
...
...
src/system/detail/src/mgmtDnodeInt.c
浏览文件 @
40617f5d
...
...
@@ -142,7 +142,7 @@ int mgmtProcessVPeersRsp(char *msg, int msgLen, SDnodeObj *pObj) {
SDbObj
*
pDb
=
mgmtGetDb
(
pRsp
->
more
);
if
(
!
pDb
)
{
mError
(
"dnode:%s, db
not find, code:%d"
,
taosIpStr
(
pObj
->
privateIp
)
,
pRsp
->
code
);
mError
(
"dnode:%s, db
:%s not find, code:%d"
,
taosIpStr
(
pObj
->
privateIp
),
pRsp
->
more
,
pRsp
->
code
);
return
0
;
}
...
...
src/system/detail/src/vnodeMeter.c
浏览文件 @
40617f5d
...
...
@@ -24,6 +24,7 @@
#include "vnodeMgmt.h"
#include "vnodeShell.h"
#include "vnodeUtil.h"
#include "tstatus.h"
#pragma GCC diagnostic ignored "-Wpointer-sign"
...
...
@@ -717,7 +718,8 @@ void vnodeUpdateMeter(void *param, void *tmrId) {
SVnodeObj
*
pVnode
=
&
vnodeList
[
pNew
->
vnode
];
if
(
pVnode
->
meterList
==
NULL
)
{
dTrace
(
"vid:%d sid:%d id:%s, vnode is deleted, abort update schema"
,
pNew
->
vnode
,
pNew
->
sid
,
pNew
->
meterId
);
dTrace
(
"vid:%d sid:%d id:%s, vnode is deleted, status:%s, abort update schema"
,
pNew
->
vnode
,
pNew
->
sid
,
pNew
->
meterId
,
taosGetVnodeStatusStr
(
vnodeList
[
pNew
->
vnode
].
vnodeStatus
));
free
(
pNew
->
schema
);
free
(
pNew
);
return
;
...
...
src/system/detail/src/vnodeShell.c
浏览文件 @
40617f5d
...
...
@@ -184,13 +184,15 @@ int vnodeOpenShellVnode(int vnode) {
static
void
vnodeDelayedFreeResource
(
void
*
param
,
void
*
tmrId
)
{
int32_t
vnode
=
*
(
int32_t
*
)
param
;
dTrace
(
"vid:%d, start to free resources"
,
vnode
);
dTrace
(
"vid:%d, start to free resources
for 500ms arrived
"
,
vnode
);
taosCloseRpcChann
(
pShellServer
,
vnode
);
// close connection
tfree
(
shellList
[
vnode
]);
//free SShellObj
tfree
(
param
);
memset
(
vnodeList
+
vnode
,
0
,
sizeof
(
SVnodeObj
));
dTrace
(
"vid:%d, status set to %s"
,
vnode
,
taosGetVnodeStatusStr
(
vnodeList
[
vnode
].
vnodeStatus
));
vnodeCalcOpenVnodes
();
}
...
...
src/system/detail/src/vnodeStore.c
浏览文件 @
40617f5d
...
...
@@ -250,7 +250,7 @@ static void vnodeRemoveDataFiles(int vnode) {
sprintf
(
vnodeDir
,
"%s/vnode%d"
,
tsDirectory
,
vnode
);
rmdir
(
vnodeDir
);
dPrint
(
"vid:%d, vnode is removed
!"
,
vnode
);
dPrint
(
"vid:%d, vnode is removed
, status:%s"
,
vnode
,
taosGetVnodeStatusStr
(
vnodeList
[
vnode
].
vnodeStatus
)
);
}
int
vnodeRemoveVnode
(
int
vnode
)
{
...
...
@@ -261,7 +261,7 @@ int vnodeRemoveVnode(int vnode) {
if
(
pVnode
->
vnodeStatus
==
TSDB_VN_STATUS_CREATING
||
pVnode
->
vnodeStatus
==
TSDB_VN_STATUS_OFFLINE
||
pVnode
->
vnodeStatus
==
TSDB_VN_STATUS_DELETING
)
{
d
Error
(
"vid:%d, status:%s, cannot enter close/delete operation"
,
vnode
,
taosGetVnodeStatusStr
(
pVnode
->
vnodeStatus
));
d
Trace
(
"vid:%d, status:%s, cannot enter close/delete operation"
,
vnode
,
taosGetVnodeStatusStr
(
pVnode
->
vnodeStatus
));
return
TSDB_CODE_ACTION_IN_PROGRESS
;
}
else
{
int32_t
ret
=
vnodeCloseVnode
(
vnode
);
...
...
@@ -269,6 +269,7 @@ int vnodeRemoveVnode(int vnode) {
return
ret
;
}
dTrace
(
"vid:%d, status:%s, do delete operation"
,
vnode
,
taosGetVnodeStatusStr
(
pVnode
->
vnodeStatus
));
vnodeRemoveDataFiles
(
vnode
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录