Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
18c8b217
T
TDengine
项目概览
慢慢CG
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
18c8b217
编写于
4月 27, 2020
作者:
S
slguan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[TD-184]
上级
e8f33da2
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
48 addition
and
30 deletion
+48
-30
src/client/src/tscServer.c
src/client/src/tscServer.c
+6
-6
src/plugins/http/src/httpSystem.c
src/plugins/http/src/httpSystem.c
+1
-1
src/vnode/src/vnodeMain.c
src/vnode/src/vnodeMain.c
+2
-2
tests/script/unique/db/replica_add12.sim
tests/script/unique/db/replica_add12.sim
+39
-21
未找到文件。
src/client/src/tscServer.c
浏览文件 @
18c8b217
...
@@ -294,11 +294,6 @@ void tscProcessMsgFromServer(SRpcMsg *rpcMsg) {
...
@@ -294,11 +294,6 @@ void tscProcessMsgFromServer(SRpcMsg *rpcMsg) {
}
}
}
}
}
}
if
(
pRes
->
code
==
TSDB_CODE_SUCCESS
)
{
tscTrace
(
"%p reset retry counter to be 0 due to success rsp, old:%d"
,
pSql
,
pSql
->
retry
);
pSql
->
retry
=
0
;
}
pRes
->
rspLen
=
0
;
pRes
->
rspLen
=
0
;
...
@@ -308,6 +303,11 @@ void tscProcessMsgFromServer(SRpcMsg *rpcMsg) {
...
@@ -308,6 +303,11 @@ void tscProcessMsgFromServer(SRpcMsg *rpcMsg) {
tscTrace
(
"%p query is cancelled, code:%d"
,
pSql
,
tstrerror
(
pRes
->
code
));
tscTrace
(
"%p query is cancelled, code:%d"
,
pSql
,
tstrerror
(
pRes
->
code
));
}
}
if
(
pRes
->
code
==
TSDB_CODE_SUCCESS
)
{
tscTrace
(
"%p reset retry counter to be 0 due to success rsp, old:%d"
,
pSql
,
pSql
->
retry
);
pSql
->
retry
=
0
;
}
if
(
pRes
->
code
!=
TSDB_CODE_QUERY_CANCELLED
)
{
if
(
pRes
->
code
!=
TSDB_CODE_QUERY_CANCELLED
)
{
assert
(
rpcMsg
->
msgType
==
pCmd
->
msgType
+
1
);
assert
(
rpcMsg
->
msgType
==
pCmd
->
msgType
+
1
);
pRes
->
code
=
rpcMsg
->
code
;
pRes
->
code
=
rpcMsg
->
code
;
...
@@ -569,7 +569,7 @@ int tscBuildSubmitMsg(SSqlObj *pSql, SSqlInfo *pInfo) {
...
@@ -569,7 +569,7 @@ int tscBuildSubmitMsg(SSqlObj *pSql, SSqlInfo *pInfo) {
pSql
->
cmd
.
msgType
=
TSDB_MSG_TYPE_SUBMIT
;
pSql
->
cmd
.
msgType
=
TSDB_MSG_TYPE_SUBMIT
;
tscSetDnodeIpList
(
pSql
,
pTableMeta
);
tscSetDnodeIpList
(
pSql
,
pTableMeta
);
tscTrace
(
"%p build submit msg, vgId:%d numOfVgroup:%d
"
,
pSql
,
vgId
,
htonl
(
pMsgDesc
->
numOfVnodes
)
);
tscTrace
(
"%p build submit msg, vgId:%d numOfVgroup:%d
numberOfIP:%d"
,
pSql
,
vgId
,
htonl
(
pMsgDesc
->
numOfVnodes
),
pSql
->
ipList
.
numOfIps
);
return
TSDB_CODE_SUCCESS
;
return
TSDB_CODE_SUCCESS
;
}
}
...
...
src/plugins/http/src/httpSystem.c
浏览文件 @
18c8b217
...
@@ -117,7 +117,7 @@ void httpCleanUpSystem() {
...
@@ -117,7 +117,7 @@ void httpCleanUpSystem() {
httpPrint
(
"http service cleanup"
);
httpPrint
(
"http service cleanup"
);
httpStopSystem
();
httpStopSystem
();
#if
1
#if
0
if (httpServer == NULL) {
if (httpServer == NULL) {
return;
return;
}
}
...
...
src/vnode/src/vnodeMain.c
浏览文件 @
18c8b217
...
@@ -667,7 +667,7 @@ static int32_t vnodeSaveVersion(SVnodeObj *pVnode) {
...
@@ -667,7 +667,7 @@ static int32_t vnodeSaveVersion(SVnodeObj *pVnode) {
fclose
(
fp
);
fclose
(
fp
);
free
(
content
);
free
(
content
);
dPrint
(
"pVnode:%p vgId:%d, save vnode version
successed"
,
pVnode
,
pVnode
->
vgId
);
dPrint
(
"pVnode:%p vgId:%d, save vnode version
:%"
PRId64
" successed"
,
pVnode
,
pVnode
->
vgId
,
pVnode
->
version
);
return
0
;
return
0
;
}
}
...
@@ -675,7 +675,7 @@ static int32_t vnodeSaveVersion(SVnodeObj *pVnode) {
...
@@ -675,7 +675,7 @@ static int32_t vnodeSaveVersion(SVnodeObj *pVnode) {
static
bool
vnodeReadVersion
(
SVnodeObj
*
pVnode
)
{
static
bool
vnodeReadVersion
(
SVnodeObj
*
pVnode
)
{
char
versionFile
[
TSDB_FILENAME_LEN
+
30
]
=
{
0
};
char
versionFile
[
TSDB_FILENAME_LEN
+
30
]
=
{
0
};
sprintf
(
versionFile
,
"%s/vnode%d/version.json"
,
tsVnodeDir
,
pVnode
->
vgId
);
sprintf
(
versionFile
,
"%s/vnode%d/version.json"
,
tsVnodeDir
,
pVnode
->
vgId
);
FILE
*
fp
=
fopen
(
versionFile
,
"
w
"
);
FILE
*
fp
=
fopen
(
versionFile
,
"
r
"
);
if
(
!
fp
)
{
if
(
!
fp
)
{
dError
(
"pVnode:%p vgId:%d, failed to open vnode version file for write, error:%s"
,
pVnode
,
pVnode
->
vgId
,
strerror
(
errno
));
dError
(
"pVnode:%p vgId:%d, failed to open vnode version file for write, error:%s"
,
pVnode
,
pVnode
->
vgId
,
strerror
(
errno
));
return
false
;
return
false
;
...
...
tests/script/unique/db/replica_add12.sim
浏览文件 @
18c8b217
...
@@ -145,7 +145,9 @@ if $rows != 2 then
...
@@ -145,7 +145,9 @@ if $rows != 2 then
return -1
return -1
endi
endi
sql reset query cache
sleep 2000
sleep 2000
print ========= step5
print ========= step5
system sh/exec_up.sh -n dnode2 -s stop -x SIGINT
system sh/exec_up.sh -n dnode2 -s stop -x SIGINT
sleep 5000
sleep 5000
...
@@ -155,7 +157,7 @@ if $rows != 2 then
...
@@ -155,7 +157,7 @@ if $rows != 2 then
return -1
return -1
endi
endi
sql select * from d2.t2
sql select * from d2.t2
if $rows != 2 then
if $rows != 2 then
return -1
return -1
endi
endi
...
@@ -172,11 +174,12 @@ endi
...
@@ -172,11 +174,12 @@ endi
print ===== insert data
print ===== insert data
sql insert into d1.t1 values(now, 3)
sql insert into d1.t1 values(now, 3)
sql insert into d2.t2 values(now, 3)
# no master
sql_error insert into d2.t2 values(now, 3)
sql insert into d3.t3 values(now, 3)
sql insert into d3.t3 values(now, 3)
sql insert into d4.t4 values(now, 3)
# no master
sql_error insert into d4.t4 values(now, 3)
sql select * from d1.t1
sql select * from d1.t1
if $rows != 3 then
if $rows != 3 then
...
@@ -184,7 +187,7 @@ if $rows != 3 then
...
@@ -184,7 +187,7 @@ if $rows != 3 then
endi
endi
sql select * from d2.t2
sql select * from d2.t2
if $rows !=
3
then
if $rows !=
2
then
return -1
return -1
endi
endi
...
@@ -194,32 +197,49 @@ if $rows != 3 then
...
@@ -194,32 +197,49 @@ if $rows != 3 then
endi
endi
sql select * from d4.t4
sql select * from d4.t4
if $rows !=
3
then
if $rows !=
2
then
return -1
return -1
endi
endi
print ========= step6
print ========= step6
system sh/exec_up.sh -n dnode2 -s start
system sh/exec_up.sh -n dnode2 -s start
sleep 10000
sleep 5000
system sh/exec_up.sh -n dnode3 -s stop -x SIGINT
sleep 10000
sql insert into d1.t1 values(now, 4)
sql insert into d2.t2 values(now, 4)
sql insert into d3.t3 values(now, 4)
sql insert into d4.t4 values(now, 4)
sql insert into d2.t2 values(now, 3)
sql insert into d4.t4 values(now, 3)
sql select * from d1.t1
sql select * from d1.t1
if $rows !=
4
then
if $rows !=
3
then
return -1
return -1
endi
endi
sql select * from d2.t2
sql select * from d2.t2
if $rows !=
4
then
if $rows !=
3
then
return -1
return -1
endi
endi
sql select * from d3.t3
sql select * from d3.t3
if $rows != 3 then
return -1
endi
sql select * from d4.t4
if $rows != 3 then
return -1
endi
print ========= step61
system sh/exec_up.sh -n dnode3 -s stop -x SIGINT
sleep 5000
# no master
sql_error insert into d1.t1 values(now, 4)
sql insert into d2.t2 values(now, 4)
# no master
sql_error insert into d3.t3 values(now, 4)
sql insert into d4.t4 values(now, 4)
sql select * from d2.t2
if $rows != 4 then
if $rows != 4 then
return -1
return -1
endi
endi
...
@@ -231,9 +251,7 @@ endi
...
@@ -231,9 +251,7 @@ endi
print ========= step7
print ========= step7
system sh/exec_up.sh -n dnode3 -s start
system sh/exec_up.sh -n dnode3 -s start
sleep 10000
sleep 5000
system sh/exec_up.sh -n dnode2 -s stop -x SIGINT
sleep 10000
sql insert into d1.t1 values(now, 5)
sql insert into d1.t1 values(now, 5)
sql insert into d2.t2 values(now, 5)
sql insert into d2.t2 values(now, 5)
...
@@ -241,7 +259,7 @@ sql insert into d3.t3 values(now, 5)
...
@@ -241,7 +259,7 @@ sql insert into d3.t3 values(now, 5)
sql insert into d4.t4 values(now, 5)
sql insert into d4.t4 values(now, 5)
sql select * from d1.t1
sql select * from d1.t1
if $rows !=
5
then
if $rows !=
4
then
return -1
return -1
endi
endi
...
@@ -251,7 +269,7 @@ if $rows != 5 then
...
@@ -251,7 +269,7 @@ if $rows != 5 then
endi
endi
sql select * from d3.t3
sql select * from d3.t3
if $rows !=
5
then
if $rows !=
4
then
return -1
return -1
endi
endi
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录