Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
2db5df4c
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看板
提交
2db5df4c
编写于
12月 20, 2020
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
TD-2498
上级
950dd612
变更
8
显示空白变更内容
内联
并排
Showing
8 changed file
with
34 addition
and
19 deletion
+34
-19
src/common/inc/tglobal.h
src/common/inc/tglobal.h
+2
-1
src/common/src/tglobal.c
src/common/src/tglobal.c
+13
-2
src/dnode/src/dnodeVRead.c
src/dnode/src/dnodeVRead.c
+2
-1
src/vnode/src/vnodeRead.c
src/vnode/src/vnodeRead.c
+9
-5
src/vnode/src/vnodeWrite.c
src/vnode/src/vnodeWrite.c
+1
-1
tests/script/sh/deploy.sh
tests/script/sh/deploy.sh
+1
-0
tests/script/unique/arbitrator/sync_replica3_alterTable_add.sim
...script/unique/arbitrator/sync_replica3_alterTable_add.sim
+3
-9
tests/script/unique/arbitrator/sync_replica_alterTable_background_add.sim
...que/arbitrator/sync_replica_alterTable_background_add.sim
+3
-0
未找到文件。
src/common/inc/tglobal.h
浏览文件 @
2db5df4c
...
@@ -101,7 +101,8 @@ extern int32_t tsAlternativeRole;
...
@@ -101,7 +101,8 @@ extern int32_t tsAlternativeRole;
extern
int32_t
tsBalanceInterval
;
extern
int32_t
tsBalanceInterval
;
extern
int32_t
tsOfflineThreshold
;
extern
int32_t
tsOfflineThreshold
;
extern
int32_t
tsMnodeEqualVnodeNum
;
extern
int32_t
tsMnodeEqualVnodeNum
;
extern
int32_t
tsFlowCtrl
;
extern
int32_t
tsEnableFlowCtrl
;
extern
int32_t
tsEnableSlaveQuery
;
// restful
// restful
extern
int32_t
tsEnableHttpModule
;
extern
int32_t
tsEnableHttpModule
;
...
...
src/common/src/tglobal.c
浏览文件 @
2db5df4c
...
@@ -138,7 +138,8 @@ int32_t tsAlternativeRole = 0;
...
@@ -138,7 +138,8 @@ int32_t tsAlternativeRole = 0;
int32_t
tsBalanceInterval
=
300
;
// seconds
int32_t
tsBalanceInterval
=
300
;
// seconds
int32_t
tsOfflineThreshold
=
86400
*
100
;
// seconds 10days
int32_t
tsOfflineThreshold
=
86400
*
100
;
// seconds 10days
int32_t
tsMnodeEqualVnodeNum
=
4
;
int32_t
tsMnodeEqualVnodeNum
=
4
;
int32_t
tsFlowCtrl
=
1
;
int32_t
tsEnableFlowCtrl
=
1
;
int32_t
tsEnableSlaveQuery
=
1
;
// restful
// restful
int32_t
tsEnableHttpModule
=
1
;
int32_t
tsEnableHttpModule
=
1
;
...
@@ -1004,7 +1005,17 @@ static void doInitGlobalConfig(void) {
...
@@ -1004,7 +1005,17 @@ static void doInitGlobalConfig(void) {
// module configs
// module configs
cfg
.
option
=
"flowctrl"
;
cfg
.
option
=
"flowctrl"
;
cfg
.
ptr
=
&
tsFlowCtrl
;
cfg
.
ptr
=
&
tsEnableFlowCtrl
;
cfg
.
valType
=
TAOS_CFG_VTYPE_INT32
;
cfg
.
cfgType
=
TSDB_CFG_CTYPE_B_CONFIG
|
TSDB_CFG_CTYPE_B_SHOW
;
cfg
.
minValue
=
0
;
cfg
.
maxValue
=
1
;
cfg
.
ptrLength
=
0
;
cfg
.
unitType
=
TAOS_CFG_UTYPE_NONE
;
taosInitConfigOption
(
cfg
);
cfg
.
option
=
"slaveQuery"
;
cfg
.
ptr
=
&
tsEnableSlaveQuery
;
cfg
.
valType
=
TAOS_CFG_VTYPE_INT32
;
cfg
.
valType
=
TAOS_CFG_VTYPE_INT32
;
cfg
.
cfgType
=
TSDB_CFG_CTYPE_B_CONFIG
|
TSDB_CFG_CTYPE_B_SHOW
;
cfg
.
cfgType
=
TSDB_CFG_CTYPE_B_CONFIG
|
TSDB_CFG_CTYPE_B_SHOW
;
cfg
.
minValue
=
0
;
cfg
.
minValue
=
0
;
...
...
src/dnode/src/dnodeVRead.c
浏览文件 @
2db5df4c
...
@@ -54,6 +54,7 @@ void dnodeCleanupVRead() {
...
@@ -54,6 +54,7 @@ void dnodeCleanupVRead() {
void
dnodeDispatchToVReadQueue
(
SRpcMsg
*
pMsg
)
{
void
dnodeDispatchToVReadQueue
(
SRpcMsg
*
pMsg
)
{
int32_t
queuedMsgNum
=
0
;
int32_t
queuedMsgNum
=
0
;
int32_t
leftLen
=
pMsg
->
contLen
;
int32_t
leftLen
=
pMsg
->
contLen
;
int32_t
code
=
TSDB_CODE_VND_INVALID_VGROUP_ID
;
char
*
pCont
=
pMsg
->
pCont
;
char
*
pCont
=
pMsg
->
pCont
;
while
(
leftLen
>
0
)
{
while
(
leftLen
>
0
)
{
...
@@ -74,7 +75,7 @@ void dnodeDispatchToVReadQueue(SRpcMsg *pMsg) {
...
@@ -74,7 +75,7 @@ void dnodeDispatchToVReadQueue(SRpcMsg *pMsg) {
}
}
if
(
queuedMsgNum
==
0
)
{
if
(
queuedMsgNum
==
0
)
{
SRpcMsg
rpcRsp
=
{.
handle
=
pMsg
->
handle
,
.
code
=
TSDB_CODE_VND_INVALID_VGROUP_ID
};
SRpcMsg
rpcRsp
=
{.
handle
=
pMsg
->
handle
,
.
code
=
code
};
rpcSendResponse
(
&
rpcRsp
);
rpcSendResponse
(
&
rpcRsp
);
}
}
...
...
src/vnode/src/vnodeRead.c
浏览文件 @
2db5df4c
...
@@ -65,13 +65,17 @@ static int32_t vnodeCheckRead(SVnodeObj *pVnode) {
...
@@ -65,13 +65,17 @@ static int32_t vnodeCheckRead(SVnodeObj *pVnode) {
return
TSDB_CODE_APP_NOT_READY
;
return
TSDB_CODE_APP_NOT_READY
;
}
}
if
(
pVnode
->
role
!=
TAOS_SYNC_ROLE_SLAVE
&&
pVnode
->
role
!=
TAOS_SYNC_ROLE_MASTER
)
{
if
(
pVnode
->
role
==
TAOS_SYNC_ROLE_MASTER
)
{
vDebug
(
"vgId:%d, replica:%d role:%s, refCount:%d pVnode:%p"
,
pVnode
->
vgId
,
pVnode
->
syncCfg
.
replica
,
return
TSDB_CODE_SUCCESS
;
syncRole
[
pVnode
->
role
],
pVnode
->
refCount
,
pVnode
);
return
TSDB_CODE_APP_NOT_READY
;
}
}
if
(
tsEnableSlaveQuery
&&
pVnode
->
role
==
TAOS_SYNC_ROLE_SLAVE
)
{
return
TSDB_CODE_SUCCESS
;
return
TSDB_CODE_SUCCESS
;
}
vDebug
(
"vgId:%d, replica:%d role:%s, refCount:%d pVnode:%p, cant provide query service"
,
pVnode
->
vgId
,
pVnode
->
syncCfg
.
replica
,
syncRole
[
pVnode
->
role
],
pVnode
->
refCount
,
pVnode
);
return
TSDB_CODE_APP_NOT_READY
;
}
}
void
vnodeFreeFromRQueue
(
void
*
vparam
,
SVReadMsg
*
pRead
)
{
void
vnodeFreeFromRQueue
(
void
*
vparam
,
SVReadMsg
*
pRead
)
{
...
...
src/vnode/src/vnodeWrite.c
浏览文件 @
2db5df4c
...
@@ -297,7 +297,7 @@ static int32_t vnodePerformFlowCtrl(SVWriteMsg *pWrite) {
...
@@ -297,7 +297,7 @@ static int32_t vnodePerformFlowCtrl(SVWriteMsg *pWrite) {
if
(
pWrite
->
qtype
!=
TAOS_QTYPE_RPC
)
return
0
;
if
(
pWrite
->
qtype
!=
TAOS_QTYPE_RPC
)
return
0
;
if
(
pVnode
->
queuedWMsg
<
MAX_QUEUED_MSG_NUM
&&
pVnode
->
flowctrlLevel
<=
0
)
return
0
;
if
(
pVnode
->
queuedWMsg
<
MAX_QUEUED_MSG_NUM
&&
pVnode
->
flowctrlLevel
<=
0
)
return
0
;
if
(
tsFlowCtrl
==
0
)
{
if
(
ts
Enable
FlowCtrl
==
0
)
{
int32_t
ms
=
pow
(
2
,
pVnode
->
flowctrlLevel
+
2
);
int32_t
ms
=
pow
(
2
,
pVnode
->
flowctrlLevel
+
2
);
if
(
ms
>
100
)
ms
=
100
;
if
(
ms
>
100
)
ms
=
100
;
vTrace
(
"vgId:%d, msg:%p, app:%p, perform flowctrl for %d ms"
,
pVnode
->
vgId
,
pWrite
,
pWrite
->
rpcMsg
.
ahandle
,
ms
);
vTrace
(
"vgId:%d, msg:%p, app:%p, perform flowctrl for %d ms"
,
pVnode
->
vgId
,
pWrite
,
pWrite
->
rpcMsg
.
ahandle
,
ms
);
...
...
tests/script/sh/deploy.sh
浏览文件 @
2db5df4c
...
@@ -132,6 +132,7 @@ echo "cqdebugFlag 143" >> $TAOS_CFG
...
@@ -132,6 +132,7 @@ echo "cqdebugFlag 143" >> $TAOS_CFG
echo
"monitor 0"
>>
$TAOS_CFG
echo
"monitor 0"
>>
$TAOS_CFG
echo
"monitorInterval 1"
>>
$TAOS_CFG
echo
"monitorInterval 1"
>>
$TAOS_CFG
echo
"http 0"
>>
$TAOS_CFG
echo
"http 0"
>>
$TAOS_CFG
echo
"slaveQuery 0"
>>
$TAOS_CFG
echo
"numOfThreadsPerCore 2.0"
>>
$TAOS_CFG
echo
"numOfThreadsPerCore 2.0"
>>
$TAOS_CFG
echo
"defaultPass taosdata"
>>
$TAOS_CFG
echo
"defaultPass taosdata"
>>
$TAOS_CFG
echo
"numOfLogLines 20000000"
>>
$TAOS_CFG
echo
"numOfLogLines 20000000"
>>
$TAOS_CFG
...
...
tests/script/unique/arbitrator/sync_replica3_alterTable_add.sim
浏览文件 @
2db5df4c
...
@@ -140,11 +140,9 @@ if $rows != 1 then
...
@@ -140,11 +140,9 @@ if $rows != 1 then
goto wait_dnode4_vgroup_offline
goto wait_dnode4_vgroup_offline
endi
endi
print show vgroups:
print show vgroups:
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 $data5_1 $data6_1 $data7_1 $data8_1 $data9_1
print $data00 $data01 $data02 $data03 $data04 $data05 $data06 $data07 $data08 $data09
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 $data5_2 $data6_2 $data7_2 $data8_2 $data9_2
$dnode4Vtatus = $data05
print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $data7_3 $data8_3 $data9_3
$dnode3Vtatus = $data07
$dnode4Vtatus = $data5_2
$dnode3Vtatus = $data7_2
if $dnode4Vtatus != offline then
if $dnode4Vtatus != offline then
sleep 2000
sleep 2000
...
@@ -198,7 +196,3 @@ if $data00 != $totalRows then
...
@@ -198,7 +196,3 @@ if $data00 != $totalRows then
sleep 2000
sleep 2000
goto wait_table_altered
goto wait_table_altered
endi
endi
tests/script/unique/arbitrator/sync_replica_alterTable_background_add.sim
浏览文件 @
2db5df4c
...
@@ -14,6 +14,9 @@ sql alter table $stb add column f1 float
...
@@ -14,6 +14,9 @@ sql alter table $stb add column f1 float
$tblNum = $totalTableNum
$tblNum = $totalTableNum
$alterTblNum = 10
$alterTblNum = 10
sql reset query cache
sleep 100
$i = 1
$i = 1
while $i < $alterTblNum
while $i < $alterTblNum
$tb = tb . $i
$tb = tb . $i
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录