Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
cad3b55a
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看板
提交
cad3b55a
编写于
5月 26, 2021
作者:
Y
yihaoDeng
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[TD-3178]<feature> fix some bug
上级
151fd310
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
24 addition
and
14 deletion
+24
-14
src/client/src/tscSQLParser.c
src/client/src/tscSQLParser.c
+0
-1
src/client/src/tscServer.c
src/client/src/tscServer.c
+2
-2
src/dnode/src/dnodeShell.c
src/dnode/src/dnodeShell.c
+1
-0
src/mnode/src/mnodeDb.c
src/mnode/src/mnodeDb.c
+21
-11
未找到文件。
src/client/src/tscSQLParser.c
浏览文件 @
cad3b55a
...
@@ -2798,7 +2798,6 @@ int32_t setKillInfo(SSqlObj* pSql, struct SSqlInfo* pInfo, int32_t killType) {
...
@@ -2798,7 +2798,6 @@ int32_t setKillInfo(SSqlObj* pSql, struct SSqlInfo* pInfo, int32_t killType) {
}
}
static
int32_t
setCompactVnodeInfo
(
SSqlObj
*
pSql
,
struct
SSqlInfo
*
pInfo
)
{
static
int32_t
setCompactVnodeInfo
(
SSqlObj
*
pSql
,
struct
SSqlInfo
*
pInfo
)
{
SSqlCmd
*
pCmd
=
&
pSql
->
cmd
;
SSqlCmd
*
pCmd
=
&
pSql
->
cmd
;
//STableMetaInfo* pTableMetaInfo = tscGetTableMetaInfoFromCmd(pCmd, pCmd->clauseIndex, 0);
pCmd
->
command
=
pInfo
->
type
;
pCmd
->
command
=
pInfo
->
type
;
return
TSDB_CODE_SUCCESS
;
return
TSDB_CODE_SUCCESS
;
...
...
src/client/src/tscServer.c
浏览文件 @
cad3b55a
...
@@ -1575,7 +1575,7 @@ int tscBuildCompactMsg(SSqlObj *pSql, SSqlInfo *pInfo) {
...
@@ -1575,7 +1575,7 @@ int tscBuildCompactMsg(SSqlObj *pSql, SSqlInfo *pInfo) {
for
(
int32_t
i
=
0
;
i
<
size
;
i
++
)
{
for
(
int32_t
i
=
0
;
i
<
size
;
i
++
)
{
tSqlExprItem
*
pSub
=
taosArrayGet
(
pList
,
i
);
tSqlExprItem
*
pSub
=
taosArrayGet
(
pList
,
i
);
tVariant
*
pVar
=
&
pSub
->
pNode
->
value
;
tVariant
*
pVar
=
&
pSub
->
pNode
->
value
;
if
(
pVar
->
nType
>=
TSDB_DATA_TYPE_TINYINT
&&
pVar
->
nType
<=
TSDB_DATA_TYPE_INT
)
{
if
(
pVar
->
nType
>=
TSDB_DATA_TYPE_TINYINT
&&
pVar
->
nType
<=
TSDB_DATA_TYPE_
BIG
INT
)
{
result
[
i
]
=
(
int32_t
)(
pVar
->
i64
);
result
[
i
]
=
(
int32_t
)(
pVar
->
i64
);
}
else
{
}
else
{
free
(
result
);
free
(
result
);
...
...
src/dnode/src/dnodeShell.c
浏览文件 @
cad3b55a
...
@@ -61,6 +61,7 @@ int32_t dnodeInitShell() {
...
@@ -61,6 +61,7 @@ int32_t dnodeInitShell() {
dnodeProcessShellMsgFp
[
TSDB_MSG_TYPE_CM_KILL_STREAM
]
=
dnodeDispatchToMWriteQueue
;
dnodeProcessShellMsgFp
[
TSDB_MSG_TYPE_CM_KILL_STREAM
]
=
dnodeDispatchToMWriteQueue
;
dnodeProcessShellMsgFp
[
TSDB_MSG_TYPE_CM_KILL_CONN
]
=
dnodeDispatchToMWriteQueue
;
dnodeProcessShellMsgFp
[
TSDB_MSG_TYPE_CM_KILL_CONN
]
=
dnodeDispatchToMWriteQueue
;
dnodeProcessShellMsgFp
[
TSDB_MSG_TYPE_CM_CONFIG_DNODE
]
=
dnodeDispatchToMWriteQueue
;
dnodeProcessShellMsgFp
[
TSDB_MSG_TYPE_CM_CONFIG_DNODE
]
=
dnodeDispatchToMWriteQueue
;
dnodeProcessShellMsgFp
[
TSDB_MSG_TYPE_CM_COMPACT_VNODE
]
=
dnodeDispatchToMWriteQueue
;
// the following message shall be treated as mnode query
// the following message shall be treated as mnode query
dnodeProcessShellMsgFp
[
TSDB_MSG_TYPE_CM_HEARTBEAT
]
=
dnodeDispatchToMReadQueue
;
dnodeProcessShellMsgFp
[
TSDB_MSG_TYPE_CM_HEARTBEAT
]
=
dnodeDispatchToMReadQueue
;
...
...
src/mnode/src/mnodeDb.c
浏览文件 @
cad3b55a
...
@@ -1226,26 +1226,35 @@ static int32_t mnodeSyncDb(SDbObj *pDb, SMnodeMsg *pMsg) {
...
@@ -1226,26 +1226,35 @@ static int32_t mnodeSyncDb(SDbObj *pDb, SMnodeMsg *pMsg) {
static
int32_t
mnodeCompact
(
SDbObj
*
pDb
,
SCompactMsg
*
pCompactMsg
)
{
static
int32_t
mnodeCompact
(
SDbObj
*
pDb
,
SCompactMsg
*
pCompactMsg
)
{
int32_t
count
=
htonl
(
pCompactMsg
->
numOfVgroup
);
int32_t
count
=
ntohs
(
pCompactMsg
->
numOfVgroup
);
int32_t
*
buf
=
malloc
(
sizeof
(
int32_t
)
*
count
);
int32_t
*
buf
=
malloc
(
sizeof
(
int32_t
)
*
count
);
if
(
buf
==
NULL
)
{
if
(
buf
==
NULL
)
{
return
TSDB_CODE_MND_OUT_OF_MEMORY
;
return
TSDB_CODE_MND_OUT_OF_MEMORY
;
}
}
for
(
int32_t
i
=
0
;
i
<
count
;
i
++
)
{
for
(
int32_t
i
=
0
;
i
<
count
;
i
++
)
{
buf
[
i
]
=
htonl
(
pCompactMsg
->
vgid
[
i
]);
buf
[
i
]
=
ntohs
(
pCompactMsg
->
vgid
[
i
]);
}
}
// copy from mnodeSyncDb, so ugly
// copy from mnodeSyncDb, so ugly
void
*
pIter
=
NULL
;
for
(
int32_t
i
=
0
;
i
<
count
;
i
++
)
{
SVgObj
*
pVgroup
=
NULL
;
SVgObj
*
pVgroup
=
NULL
;
void
*
pIter
=
NULL
;
bool
valid
=
false
;
while
(
1
)
{
while
(
1
)
{
pIter
=
mnodeGetNextVgroup
(
pIter
,
&
pVgroup
);
pIter
=
mnodeGetNextVgroup
(
pIter
,
&
pVgroup
);
if
(
pVgroup
==
NULL
)
break
;
if
(
pVgroup
==
NULL
)
break
;
if
(
pVgroup
->
pDb
==
pDb
)
{
if
(
pVgroup
->
pDb
==
pDb
&&
pVgroup
->
vgId
==
buf
[
i
]
)
{
mnodeSendCompactVgroupMsg
(
pVgroup
);
mnodeSendCompactVgroupMsg
(
pVgroup
);
mnodeDecVgroupRef
(
pVgroup
);
valid
=
true
;
break
;
}
}
mnodeDecVgroupRef
(
pVgroup
);
mnodeDecVgroupRef
(
pVgroup
);
}
}
if
(
valid
==
false
)
{
mLError
(
"db:%s, cannot find valid vgId: %d"
,
pDb
->
name
,
buf
[
i
]);
}
}
free
(
buf
);
free
(
buf
);
mLInfo
(
"db:%s, trigger compact"
,
pDb
->
name
);
mLInfo
(
"db:%s, trigger compact"
,
pDb
->
name
);
...
@@ -1279,6 +1288,7 @@ static int32_t mnodeProcessCompactMsg(SMnodeMsg *pMsg) {
...
@@ -1279,6 +1288,7 @@ static int32_t mnodeProcessCompactMsg(SMnodeMsg *pMsg) {
mDebug
(
"db:%s, compact is received from thandle:%p"
,
pCompact
->
db
,
pMsg
->
rpcMsg
.
handle
);
mDebug
(
"db:%s, compact is received from thandle:%p"
,
pCompact
->
db
,
pMsg
->
rpcMsg
.
handle
);
if
(
pMsg
->
pDb
==
NULL
)
pMsg
->
pDb
=
mnodeGetDb
(
pCompact
->
db
);
if
(
pMsg
->
pDb
==
NULL
)
pMsg
->
pDb
=
mnodeGetDb
(
pCompact
->
db
);
if
(
pMsg
->
pDb
==
NULL
)
return
TSDB_CODE_MND_DB_NOT_SELECTED
;
if
(
pMsg
->
pDb
->
status
!=
TSDB_DB_STATUS_READY
)
{
if
(
pMsg
->
pDb
->
status
!=
TSDB_DB_STATUS_READY
)
{
mError
(
"db:%s, status:%d, in dropping, ignore compact request"
,
pCompact
->
db
,
pMsg
->
pDb
->
status
);
mError
(
"db:%s, status:%d, in dropping, ignore compact request"
,
pCompact
->
db
,
pMsg
->
pDb
->
status
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录