Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Rattenking
TDengine
提交
1ebaa4e2
T
TDengine
项目概览
Rattenking
/
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
1ebaa4e2
编写于
5月 09, 2020
作者:
guanshengliang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix bug while alter dnode
上级
b69e67bd
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
49 addition
and
38 deletion
+49
-38
src/client/src/tscSQLParser.c
src/client/src/tscSQLParser.c
+3
-2
src/client/src/tscServer.c
src/client/src/tscServer.c
+8
-15
src/common/src/tglobal.c
src/common/src/tglobal.c
+17
-4
src/dnode/src/dnodeShell.c
src/dnode/src/dnodeShell.c
+0
-1
src/inc/taosmsg.h
src/inc/taosmsg.h
+0
-4
src/mnode/src/mgmtDnode.c
src/mnode/src/mgmtDnode.c
+1
-1
src/mnode/src/mgmtMain.c
src/mnode/src/mgmtMain.c
+1
-1
src/mnode/src/mgmtSdb.c
src/mnode/src/mgmtSdb.c
+11
-3
tests/script/jenkins/basic.txt
tests/script/jenkins/basic.txt
+7
-7
tests/script/sh/deploy.sh
tests/script/sh/deploy.sh
+1
-0
未找到文件。
src/client/src/tscSQLParser.c
浏览文件 @
1ebaa4e2
...
@@ -370,10 +370,11 @@ int32_t tscToSQLCmd(SSqlObj* pSql, struct SSqlInfo* pInfo) {
...
@@ -370,10 +370,11 @@ int32_t tscToSQLCmd(SSqlObj* pSql, struct SSqlInfo* pInfo) {
return
invalidSqlErrMsg
(
tscGetErrorMsgPayload
(
pCmd
),
msg2
);
return
invalidSqlErrMsg
(
tscGetErrorMsgPayload
(
pCmd
),
msg2
);
}
}
char
*
pMsg
=
pCmd
->
payload
+
tsRpcHeadSize
;
char
*
pMsg
=
pCmd
->
payload
;
pMsg
+=
sizeof
(
SMgmtHead
);
SCMCfgDnodeMsg
*
pCfg
=
(
SCMCfgDnodeMsg
*
)
pMsg
;
SCMCfgDnodeMsg
*
pCfg
=
(
SCMCfgDnodeMsg
*
)
pMsg
;
pDCL
->
a
[
0
].
n
=
strdequote
(
pDCL
->
a
[
0
].
z
);
strncpy
(
pCfg
->
ep
,
pDCL
->
a
[
0
].
z
,
pDCL
->
a
[
0
].
n
);
strncpy
(
pCfg
->
ep
,
pDCL
->
a
[
0
].
z
,
pDCL
->
a
[
0
].
n
);
strncpy
(
pCfg
->
config
,
pDCL
->
a
[
1
].
z
,
pDCL
->
a
[
1
].
n
);
strncpy
(
pCfg
->
config
,
pDCL
->
a
[
1
].
z
,
pDCL
->
a
[
1
].
n
);
...
...
src/client/src/tscServer.c
浏览文件 @
1ebaa4e2
...
@@ -1005,13 +1005,7 @@ int32_t tscBuildUserMsg(SSqlObj *pSql, SSqlInfo *pInfo) {
...
@@ -1005,13 +1005,7 @@ int32_t tscBuildUserMsg(SSqlObj *pSql, SSqlInfo *pInfo) {
int32_t
tscBuildCfgDnodeMsg
(
SSqlObj
*
pSql
,
SSqlInfo
*
pInfo
)
{
int32_t
tscBuildCfgDnodeMsg
(
SSqlObj
*
pSql
,
SSqlInfo
*
pInfo
)
{
SSqlCmd
*
pCmd
=
&
pSql
->
cmd
;
SSqlCmd
*
pCmd
=
&
pSql
->
cmd
;
pCmd
->
payloadLen
=
sizeof
(
SCMCfgDnodeMsg
);
pCmd
->
payloadLen
=
sizeof
(
SCMCfgDnodeMsg
);
pCmd
->
msgType
=
TSDB_MSG_TYPE_CM_CONFIG_DNODE
;
if
(
TSDB_CODE_SUCCESS
!=
tscAllocPayload
(
pCmd
,
pCmd
->
payloadLen
))
{
tscError
(
"%p failed to malloc for query msg"
,
pSql
);
return
TSDB_CODE_CLI_OUT_OF_MEMORY
;
}
pCmd
->
msgType
=
TSDB_MSG_TYPE_MD_CONFIG_DNODE
;
return
TSDB_CODE_SUCCESS
;
return
TSDB_CODE_SUCCESS
;
}
}
...
@@ -1189,7 +1183,7 @@ int32_t tscBuildKillMsg(SSqlObj *pSql, SSqlInfo *pInfo) {
...
@@ -1189,7 +1183,7 @@ int32_t tscBuildKillMsg(SSqlObj *pSql, SSqlInfo *pInfo) {
int
tscEstimateCreateTableMsgLength
(
SSqlObj
*
pSql
,
SSqlInfo
*
pInfo
)
{
int
tscEstimateCreateTableMsgLength
(
SSqlObj
*
pSql
,
SSqlInfo
*
pInfo
)
{
SSqlCmd
*
pCmd
=
&
(
pSql
->
cmd
);
SSqlCmd
*
pCmd
=
&
(
pSql
->
cmd
);
int32_t
size
=
minMsgSize
()
+
sizeof
(
S
MgmtHead
)
+
sizeof
(
S
CMCreateTableMsg
);
int32_t
size
=
minMsgSize
()
+
sizeof
(
SCMCreateTableMsg
);
SCreateTableSQL
*
pCreateTableInfo
=
pInfo
->
pCreateTableInfo
;
SCreateTableSQL
*
pCreateTableInfo
=
pInfo
->
pCreateTableInfo
;
if
(
pCreateTableInfo
->
type
==
TSQL_CREATE_TABLE_FROM_STABLE
)
{
if
(
pCreateTableInfo
->
type
==
TSQL_CREATE_TABLE_FROM_STABLE
)
{
...
@@ -1277,7 +1271,7 @@ int tscBuildCreateTableMsg(SSqlObj *pSql, SSqlInfo *pInfo) {
...
@@ -1277,7 +1271,7 @@ int tscBuildCreateTableMsg(SSqlObj *pSql, SSqlInfo *pInfo) {
int
tscEstimateAlterTableMsgLength
(
SSqlCmd
*
pCmd
)
{
int
tscEstimateAlterTableMsgLength
(
SSqlCmd
*
pCmd
)
{
SQueryInfo
*
pQueryInfo
=
tscGetQueryInfoDetail
(
pCmd
,
0
);
SQueryInfo
*
pQueryInfo
=
tscGetQueryInfoDetail
(
pCmd
,
0
);
return
minMsgSize
()
+
sizeof
(
S
MgmtHead
)
+
sizeof
(
S
CMAlterTableMsg
)
+
sizeof
(
SSchema
)
*
tscNumOfFields
(
pQueryInfo
)
+
return
minMsgSize
()
+
sizeof
(
SCMAlterTableMsg
)
+
sizeof
(
SSchema
)
*
tscNumOfFields
(
pQueryInfo
)
+
TSDB_EXTRA_PAYLOAD_SIZE
;
TSDB_EXTRA_PAYLOAD_SIZE
;
}
}
...
@@ -1534,6 +1528,7 @@ int tscBuildTableMetaMsg(SSqlObj *pSql, SSqlInfo *pInfo) {
...
@@ -1534,6 +1528,7 @@ int tscBuildTableMetaMsg(SSqlObj *pSql, SSqlInfo *pInfo) {
* no used 4B
* no used 4B
**/
**/
int
tscBuildMultiMeterMetaMsg
(
SSqlObj
*
pSql
,
SSqlInfo
*
pInfo
)
{
int
tscBuildMultiMeterMetaMsg
(
SSqlObj
*
pSql
,
SSqlInfo
*
pInfo
)
{
#if 0
SSqlCmd *pCmd = &pSql->cmd;
SSqlCmd *pCmd = &pSql->cmd;
// copy payload content to temp buff
// copy payload content to temp buff
...
@@ -1566,6 +1561,8 @@ int tscBuildMultiMeterMetaMsg(SSqlObj *pSql, SSqlInfo *pInfo) {
...
@@ -1566,6 +1561,8 @@ int tscBuildMultiMeterMetaMsg(SSqlObj *pSql, SSqlInfo *pInfo) {
pCmd->payloadLen);
pCmd->payloadLen);
return pCmd->payloadLen;
return pCmd->payloadLen;
#endif
return
0
;
}
}
//static UNUSED_FUNC int32_t tscEstimateMetricMetaMsgSize(SSqlCmd *pCmd) {
//static UNUSED_FUNC int32_t tscEstimateMetricMetaMsgSize(SSqlCmd *pCmd) {
...
@@ -1765,7 +1762,7 @@ int tscEstimateHeartBeatMsgLength(SSqlObj *pSql) {
...
@@ -1765,7 +1762,7 @@ int tscEstimateHeartBeatMsgLength(SSqlObj *pSql) {
int
size
=
0
;
int
size
=
0
;
STscObj
*
pObj
=
pSql
->
pTscObj
;
STscObj
*
pObj
=
pSql
->
pTscObj
;
size
+=
tsRpcHeadSize
+
sizeof
(
SMgmtHead
)
;
size
+=
tsRpcHeadSize
;
size
+=
sizeof
(
SQqueryList
);
size
+=
sizeof
(
SQqueryList
);
SSqlObj
*
tpSql
=
pObj
->
sqlList
;
SSqlObj
*
tpSql
=
pObj
->
sqlList
;
...
@@ -1801,13 +1798,9 @@ int tscBuildHeartBeatMsg(SSqlObj *pSql, SSqlInfo *pInfo) {
...
@@ -1801,13 +1798,9 @@ int tscBuildHeartBeatMsg(SSqlObj *pSql, SSqlInfo *pInfo) {
return
-
1
;
return
-
1
;
}
}
pMsg
=
pCmd
->
payload
+
tsRpcHeadSize
;
pMsg
=
pCmd
->
payload
;
pStart
=
pMsg
;
pStart
=
pMsg
;
SMgmtHead
*
pMgmt
=
(
SMgmtHead
*
)
pMsg
;
strcpy
(
pMgmt
->
db
,
pObj
->
db
);
pMsg
+=
sizeof
(
SMgmtHead
);
pMsg
=
tscBuildQueryStreamDesc
(
pMsg
,
pObj
);
pMsg
=
tscBuildQueryStreamDesc
(
pMsg
,
pObj
);
pthread_mutex_unlock
(
&
pObj
->
mutex
);
pthread_mutex_unlock
(
&
pObj
->
mutex
);
...
...
src/common/src/tglobal.c
浏览文件 @
1ebaa4e2
...
@@ -204,10 +204,19 @@ static pthread_once_t tsInitGlobalCfgOnce = PTHREAD_ONCE_INIT;
...
@@ -204,10 +204,19 @@ static pthread_once_t tsInitGlobalCfgOnce = PTHREAD_ONCE_INIT;
void
taosSetAllDebugFlag
()
{
void
taosSetAllDebugFlag
()
{
for
(
int32_t
i
=
0
;
i
<
tsGlobalConfigNum
;
++
i
)
{
for
(
int32_t
i
=
0
;
i
<
tsGlobalConfigNum
;
++
i
)
{
SGlobalCfg
*
cfg
=
&
tsGlobalConfig
[
i
];
mdebugFlag
=
debugFlag
;
if
((
cfg
->
cfgType
&
TSDB_CFG_CTYPE_B_LOG
)
&&
cfg
->
cfgType
==
TAOS_CFG_VTYPE_INT32
)
{
sdbDebugFlag
=
debugFlag
;
*
((
int32_t
*
)
cfg
->
ptr
)
=
debugFlag
;
dDebugFlag
=
debugFlag
;
}
vDebugFlag
=
debugFlag
;
cdebugFlag
=
debugFlag
;
jnidebugFlag
=
debugFlag
;
odbcdebugFlag
=
debugFlag
;
httpDebugFlag
=
debugFlag
;
monitorDebugFlag
=
debugFlag
;
rpcDebugFlag
=
debugFlag
;
uDebugFlag
=
debugFlag
;
sDebugFlag
=
debugFlag
;
//qdebugFlag = debugFlag;
}
}
uPrint
(
"all debug flag are set to %d"
,
debugFlag
);
uPrint
(
"all debug flag are set to %d"
,
debugFlag
);
}
}
...
@@ -1189,6 +1198,10 @@ void taosInitGlobalCfg() {
...
@@ -1189,6 +1198,10 @@ void taosInitGlobalCfg() {
}
}
bool
taosCheckGlobalCfg
()
{
bool
taosCheckGlobalCfg
()
{
if
(
debugFlag
==
135
||
debugFlag
==
199
)
{
taosSetAllDebugFlag
();
}
taosGetFqdn
(
tsLocalEp
);
taosGetFqdn
(
tsLocalEp
);
sprintf
(
tsLocalEp
+
strlen
(
tsLocalEp
),
":%d"
,
tsServerPort
);
sprintf
(
tsLocalEp
+
strlen
(
tsLocalEp
),
":%d"
,
tsServerPort
);
uPrint
(
"localEp is %s"
,
tsLocalEp
);
uPrint
(
"localEp is %s"
,
tsLocalEp
);
...
...
src/dnode/src/dnodeShell.c
浏览文件 @
1ebaa4e2
...
@@ -137,7 +137,6 @@ void dnodeProcessMsgFromShell(SRpcMsg *pMsg) {
...
@@ -137,7 +137,6 @@ void dnodeProcessMsgFromShell(SRpcMsg *pMsg) {
}
}
}
}
static
int
dnodeRetrieveUserAuthInfo
(
char
*
user
,
char
*
spi
,
char
*
encrypt
,
char
*
secret
,
char
*
ckey
)
{
static
int
dnodeRetrieveUserAuthInfo
(
char
*
user
,
char
*
spi
,
char
*
encrypt
,
char
*
secret
,
char
*
ckey
)
{
return
TSDB_CODE_SUCCESS
;
return
TSDB_CODE_SUCCESS
;
}
}
...
...
src/inc/taosmsg.h
浏览文件 @
1ebaa4e2
...
@@ -317,10 +317,6 @@ typedef struct {
...
@@ -317,10 +317,6 @@ typedef struct {
int8_t
flag
;
int8_t
flag
;
}
SCMCreateUserMsg
,
SCMAlterUserMsg
;
}
SCMCreateUserMsg
,
SCMAlterUserMsg
;
typedef
struct
{
char
db
[
TSDB_TABLE_ID_LEN
+
1
];
}
SMgmtHead
;
typedef
struct
{
typedef
struct
{
int32_t
contLen
;
int32_t
contLen
;
int32_t
vgId
;
int32_t
vgId
;
...
...
src/mnode/src/mgmtDnode.c
浏览文件 @
1ebaa4e2
...
@@ -252,7 +252,7 @@ void mgmtProcessCfgDnodeMsg(SQueuedMsg *pMsg) {
...
@@ -252,7 +252,7 @@ void mgmtProcessCfgDnodeMsg(SQueuedMsg *pMsg) {
}
}
static
void
mgmtProcessCfgDnodeMsgRsp
(
SRpcMsg
*
rpcMsg
)
{
static
void
mgmtProcessCfgDnodeMsgRsp
(
SRpcMsg
*
rpcMsg
)
{
mPrint
(
"cfg
vnode rsp is received, result:%s"
,
tstrerror
(
rpcMsg
->
code
)
);
mPrint
(
"cfg
dnode rsp is received"
);
}
}
void
mgmtProcessDnodeStatusMsg
(
SRpcMsg
*
rpcMsg
)
{
void
mgmtProcessDnodeStatusMsg
(
SRpcMsg
*
rpcMsg
)
{
...
...
src/mnode/src/mgmtMain.c
浏览文件 @
1ebaa4e2
...
@@ -132,6 +132,7 @@ int32_t mgmtInitSystem() {
...
@@ -132,6 +132,7 @@ int32_t mgmtInitSystem() {
void
mgmtCleanUpSystem
()
{
void
mgmtCleanUpSystem
()
{
mPrint
(
"starting to clean up mgmt"
);
mPrint
(
"starting to clean up mgmt"
);
tsMgmtIsRunning
=
false
;
mgmtCleanUpShell
();
mgmtCleanUpShell
();
mgmtCleanupServer
();
mgmtCleanupServer
();
grantCleanUp
();
grantCleanUp
();
...
@@ -144,7 +145,6 @@ void mgmtCleanUpSystem() {
...
@@ -144,7 +145,6 @@ void mgmtCleanUpSystem() {
mgmtCleanupDnodes
();
mgmtCleanupDnodes
();
mgmtCleanUpUsers
();
mgmtCleanUpUsers
();
mgmtCleanUpAccts
();
mgmtCleanUpAccts
();
tsMgmtIsRunning
=
false
;
mPrint
(
"mgmt is cleaned up"
);
mPrint
(
"mgmt is cleaned up"
);
}
}
...
...
src/mnode/src/mgmtSdb.c
浏览文件 @
1ebaa4e2
...
@@ -323,11 +323,19 @@ void sdbCleanUp() {
...
@@ -323,11 +323,19 @@ void sdbCleanUp() {
if
(
tsSdbObj
.
status
!=
SDB_STATUS_SERVING
)
return
;
if
(
tsSdbObj
.
status
!=
SDB_STATUS_SERVING
)
return
;
tsSdbObj
.
status
=
SDB_STATUS_CLOSING
;
tsSdbObj
.
status
=
SDB_STATUS_CLOSING
;
syncStop
(
tsSdbObj
.
sync
);
walClose
(
tsSdbObj
.
wal
);
if
(
tsSdbObj
.
sync
)
{
syncStop
(
tsSdbObj
.
sync
);
tsSdbObj
.
sync
=
NULL
;
}
if
(
tsSdbObj
.
wal
)
{
walClose
(
tsSdbObj
.
wal
);
tsSdbObj
.
wal
=
NULL
;
}
sem_destroy
(
&
tsSdbObj
.
sem
);
sem_destroy
(
&
tsSdbObj
.
sem
);
pthread_mutex_destroy
(
&
tsSdbObj
.
mutex
);
pthread_mutex_destroy
(
&
tsSdbObj
.
mutex
);
memset
(
&
tsSdbObj
,
0
,
sizeof
(
tsSdbObj
));
}
}
void
sdbIncRef
(
void
*
handle
,
void
*
pRow
)
{
void
sdbIncRef
(
void
*
handle
,
void
*
pRow
)
{
...
...
tests/script/jenkins/basic.txt
浏览文件 @
1ebaa4e2
...
@@ -27,21 +27,21 @@ cd ../../../debug; make
...
@@ -27,21 +27,21 @@ cd ../../../debug; make
./test.sh -f general/compress/compress2.sim
./test.sh -f general/compress/compress2.sim
./test.sh -f general/compress/uncompress.sim
./test.sh -f general/compress/uncompress.sim
#
./test.sh -f general/compute/avg.sim
./test.sh -f general/compute/avg.sim
./test.sh -f general/compute/bottom.sim
./test.sh -f general/compute/bottom.sim
#
./test.sh -f general/compute/count.sim
./test.sh -f general/compute/count.sim
./test.sh -f general/compute/diff.sim
./test.sh -f general/compute/diff.sim
#./test.sh -f general/compute/diff2.sim
#./test.sh -f general/compute/diff2.sim
#
./test.sh -f general/compute/first.sim
./test.sh -f general/compute/first.sim
#./test.sh -f general/compute/interval.sim
#./test.sh -f general/compute/interval.sim
#./test.sh -f general/compute/last.sim
#./test.sh -f general/compute/last.sim
#./test.sh -f general/compute/leastsquare.sim
#./test.sh -f general/compute/leastsquare.sim
#
./test.sh -f general/compute/max.sim
./test.sh -f general/compute/max.sim
#
./test.sh -f general/compute/min.sim
./test.sh -f general/compute/min.sim
./test.sh -f general/compute/null.sim
./test.sh -f general/compute/null.sim
./test.sh -f general/compute/percentile.sim
./test.sh -f general/compute/percentile.sim
./test.sh -f general/compute/stddev.sim
./test.sh -f general/compute/stddev.sim
#
./test.sh -f general/compute/sum.sim
./test.sh -f general/compute/sum.sim
./test.sh -f general/compute/top.sim
./test.sh -f general/compute/top.sim
./test.sh -f general/db/basic.sim
./test.sh -f general/db/basic.sim
...
@@ -109,7 +109,7 @@ cd ../../../debug; make
...
@@ -109,7 +109,7 @@ cd ../../../debug; make
# ./test.sh -f general/parser/auto_create_tb.sim
# ./test.sh -f general/parser/auto_create_tb.sim
# ./test.sh -f general/parser/auto_create_tb_drop_tb.sim
# ./test.sh -f general/parser/auto_create_tb_drop_tb.sim
./test.sh -f general/parser/binary_escapeCharacter.sim
./test.sh -f general/parser/binary_escapeCharacter.sim
./test.sh -f general/parser/bug.sim
#
./test.sh -f general/parser/bug.sim
./test.sh -f general/parser/col_arithmetic_operation.sim
./test.sh -f general/parser/col_arithmetic_operation.sim
./test.sh -f general/parser/columnValue_bigint.sim
./test.sh -f general/parser/columnValue_bigint.sim
./test.sh -f general/parser/columnValue_bool.sim
./test.sh -f general/parser/columnValue_bool.sim
...
...
tests/script/sh/deploy.sh
浏览文件 @
1ebaa4e2
...
@@ -108,6 +108,7 @@ echo "udebugFlag 131" >> $TAOS_CFG
...
@@ -108,6 +108,7 @@ echo "udebugFlag 131" >> $TAOS_CFG
echo
"jnidebugFlag 131"
>>
$TAOS_CFG
echo
"jnidebugFlag 131"
>>
$TAOS_CFG
echo
"sdebugFlag 135"
>>
$TAOS_CFG
echo
"sdebugFlag 135"
>>
$TAOS_CFG
echo
"monitor 0"
>>
$TAOS_CFG
echo
"monitor 0"
>>
$TAOS_CFG
echo
"monitorInterval 1"
>>
$TAOS_CFG
echo
"http 0"
>>
$TAOS_CFG
echo
"http 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
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录