Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
344ef7e1
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
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看板
提交
344ef7e1
编写于
7月 01, 2022
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: drop tsma
上级
0cbc2248
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
31 addition
and
34 deletion
+31
-34
source/dnode/mnode/impl/inc/mndVgroup.h
source/dnode/mnode/impl/inc/mndVgroup.h
+1
-0
source/dnode/mnode/impl/src/mndDb.c
source/dnode/mnode/impl/src/mndDb.c
+2
-2
source/dnode/mnode/impl/src/mndScheduler.c
source/dnode/mnode/impl/src/mndScheduler.c
+7
-4
source/dnode/mnode/impl/src/mndSma.c
source/dnode/mnode/impl/src/mndSma.c
+11
-0
source/dnode/mnode/impl/src/mndStb.c
source/dnode/mnode/impl/src/mndStb.c
+4
-24
source/dnode/mnode/impl/src/mndTrans.c
source/dnode/mnode/impl/src/mndTrans.c
+2
-2
source/dnode/mnode/impl/src/mndVgroup.c
source/dnode/mnode/impl/src/mndVgroup.c
+3
-1
tests/system-test/fulltest.sh
tests/system-test/fulltest.sh
+1
-1
未找到文件。
source/dnode/mnode/impl/inc/mndVgroup.h
浏览文件 @
344ef7e1
...
...
@@ -47,6 +47,7 @@ int32_t mndBuildAlterVgroupAction(SMnode *pMnode, STrans *pTrans, SDbObj *pDb, S
void
*
mndBuildCreateVnodeReq
(
SMnode
*
,
SDnodeObj
*
pDnode
,
SDbObj
*
pDb
,
SVgObj
*
pVgroup
,
int32_t
*
cntlen
,
bool
standby
);
void
*
mndBuildDropVnodeReq
(
SMnode
*
,
SDnodeObj
*
pDnode
,
SDbObj
*
pDb
,
SVgObj
*
pVgroup
,
int32_t
*
pContLen
);
void
*
mndBuildAlterVnodeReq
(
SMnode
*
,
SDbObj
*
pDb
,
SVgObj
*
pVgroup
,
int32_t
*
pContLen
);
bool
mndVgroupInDb
(
SVgObj
*
pVgroup
,
int64_t
dbUid
);
#ifdef __cplusplus
}
...
...
source/dnode/mnode/impl/src/mndDb.c
浏览文件 @
344ef7e1
...
...
@@ -645,7 +645,7 @@ static int32_t mndSetAlterDbRedoActions(SMnode *pMnode, STrans *pTrans, SDbObj *
pIter
=
sdbFetch
(
pSdb
,
SDB_VGROUP
,
pIter
,
(
void
**
)
&
pVgroup
);
if
(
pIter
==
NULL
)
break
;
if
(
pVgroup
->
dbUid
==
pNew
->
uid
)
{
if
(
mndVgroupInDb
(
pVgroup
,
pNew
->
uid
)
)
{
if
(
mndBuildAlterVgroupAction
(
pMnode
,
pTrans
,
pNew
,
pVgroup
,
pArray
)
!=
0
)
{
sdbCancelFetch
(
pSdb
,
pIter
);
sdbRelease
(
pSdb
,
pVgroup
);
...
...
@@ -1006,7 +1006,7 @@ static int32_t mndGetDBTableNum(SDbObj *pDb, SMnode *pMnode) {
pIter
=
sdbFetch
(
pSdb
,
SDB_VGROUP
,
pIter
,
(
void
**
)
&
pVgroup
);
if
(
pIter
==
NULL
)
break
;
if
(
pVgroup
->
dbUid
==
pDb
->
uid
)
{
if
(
mndVgroupInDb
(
pVgroup
,
pDb
->
uid
)
)
{
numOfTables
+=
pVgroup
->
numOfTables
/
TSDB_TABLE_NUM_UNIT
;
vindex
++
;
}
...
...
source/dnode/mnode/impl/src/mndScheduler.c
浏览文件 @
344ef7e1
...
...
@@ -225,10 +225,11 @@ int32_t mndAddShuffleSinkTasksToStream(SMnode* pMnode, SStreamObj* pStream) {
SVgObj
*
pVgroup
;
pIter
=
sdbFetch
(
pSdb
,
SDB_VGROUP
,
pIter
,
(
void
**
)
&
pVgroup
);
if
(
pIter
==
NULL
)
break
;
if
(
strcmp
(
pVgroup
->
dbName
,
pStream
->
targetDb
)
!=
0
)
{
if
(
!
mndVgroupInDb
(
pVgroup
,
pStream
->
targetDbUid
)
)
{
sdbRelease
(
pSdb
,
pVgroup
);
continue
;
}
SStreamTask
*
pTask
=
tNewSStreamTask
(
pStream
->
uid
);
if
(
pTask
==
NULL
)
{
sdbRelease
(
pSdb
,
pVgroup
);
...
...
@@ -420,10 +421,11 @@ int32_t mndScheduleStream(SMnode* pMnode, SStreamObj* pStream) {
SVgObj
*
pVgroup
;
pIter
=
sdbFetch
(
pSdb
,
SDB_VGROUP
,
pIter
,
(
void
**
)
&
pVgroup
);
if
(
pIter
==
NULL
)
break
;
if
(
pVgroup
->
dbUid
!=
pStream
->
sourceDbUid
)
{
if
(
!
mndVgroupInDb
(
pVgroup
,
pStream
->
sourceDbUid
)
)
{
sdbRelease
(
pSdb
,
pVgroup
);
continue
;
}
SStreamTask
*
pTask
=
tNewSStreamTask
(
pStream
->
uid
);
if
(
pInnerTask
==
NULL
)
{
terrno
=
TSDB_CODE_OUT_OF_MEMORY
;
...
...
@@ -483,10 +485,11 @@ int32_t mndScheduleStream(SMnode* pMnode, SStreamObj* pStream) {
SVgObj
*
pVgroup
;
pIter
=
sdbFetch
(
pSdb
,
SDB_VGROUP
,
pIter
,
(
void
**
)
&
pVgroup
);
if
(
pIter
==
NULL
)
break
;
if
(
pVgroup
->
dbUid
!=
pStream
->
sourceDbUid
)
{
if
(
!
mndVgroupInDb
(
pVgroup
,
pStream
->
sourceDbUid
)
)
{
sdbRelease
(
pSdb
,
pVgroup
);
continue
;
}
SStreamTask
*
pTask
=
tNewSStreamTask
(
pStream
->
uid
);
if
(
pTask
==
NULL
)
{
sdbRelease
(
pSdb
,
pVgroup
);
...
...
@@ -559,7 +562,7 @@ int32_t mndSchedInitSubEp(SMnode* pMnode, const SMqTopicObj* pTopic, SMqSubscrib
while
(
1
)
{
pIter
=
sdbFetch
(
pSdb
,
SDB_VGROUP
,
pIter
,
(
void
**
)
&
pVgroup
);
if
(
pIter
==
NULL
)
break
;
if
(
pVgroup
->
dbUid
!=
pTopic
->
dbUid
)
{
if
(
!
mndVgroupInDb
(
pVgroup
,
pTopic
->
uid
)
)
{
sdbRelease
(
pSdb
,
pVgroup
);
continue
;
}
...
...
source/dnode/mnode/impl/src/mndSma.c
浏览文件 @
344ef7e1
...
...
@@ -822,6 +822,17 @@ int32_t mndDropSmasByStb(SMnode *pMnode, STrans *pTrans, SDbObj *pDb, SStbObj *p
if
(
pSma
->
stbUid
==
pStb
->
uid
)
{
pVgroup
=
mndAcquireVgroup
(
pMnode
,
pSma
->
dstVgId
);
if
(
pVgroup
==
NULL
)
goto
_OVER
;
SStreamObj
*
pStream
=
mndAcquireStream
(
pMnode
,
pSma
->
name
);
if
(
pStream
!=
NULL
&&
pStream
->
smaId
==
pSma
->
uid
)
{
if
(
mndDropStreamTasks
(
pMnode
,
pTrans
,
pStream
)
<
0
)
{
mError
(
"stream:%s, failed to drop task since %s"
,
pStream
->
name
,
terrstr
());
goto
_OVER
;
}
if
(
mndPersistDropStreamLog
(
pMnode
,
pTrans
,
pStream
)
<
0
)
{
goto
_OVER
;
}
}
if
(
mndSetDropSmaVgroupCommitLogs
(
pMnode
,
pTrans
,
pVgroup
)
!=
0
)
goto
_OVER
;
if
(
mndSetDropSmaVgroupRedoActions
(
pMnode
,
pTrans
,
pDb
,
pVgroup
)
!=
0
)
goto
_OVER
;
if
(
mndSetDropSmaCommitLogs
(
pMnode
,
pTrans
,
pSma
)
!=
0
)
goto
_OVER
;
...
...
source/dnode/mnode/impl/src/mndStb.c
浏览文件 @
344ef7e1
...
...
@@ -621,12 +621,7 @@ static int32_t mndSetCreateStbRedoActions(SMnode *pMnode, STrans *pTrans, SDbObj
while
(
1
)
{
pIter
=
sdbFetch
(
pSdb
,
SDB_VGROUP
,
pIter
,
(
void
**
)
&
pVgroup
);
if
(
pIter
==
NULL
)
break
;
if
(
pVgroup
->
dbUid
!=
pDb
->
uid
)
{
sdbRelease
(
pSdb
,
pVgroup
);
continue
;
}
if
(
pVgroup
->
isTsma
)
{
if
(
!
mndVgroupInDb
(
pVgroup
,
pDb
->
uid
))
{
sdbRelease
(
pSdb
,
pVgroup
);
continue
;
}
...
...
@@ -664,12 +659,7 @@ static int32_t mndSetCreateStbUndoActions(SMnode *pMnode, STrans *pTrans, SDbObj
while
(
1
)
{
pIter
=
sdbFetch
(
pSdb
,
SDB_VGROUP
,
pIter
,
(
void
**
)
&
pVgroup
);
if
(
pIter
==
NULL
)
break
;
if
(
pVgroup
->
dbUid
!=
pDb
->
uid
)
{
sdbRelease
(
pSdb
,
pVgroup
);
continue
;
}
if
(
pVgroup
->
isTsma
)
{
if
(
!
mndVgroupInDb
(
pVgroup
,
pDb
->
uid
))
{
sdbRelease
(
pSdb
,
pVgroup
);
continue
;
}
...
...
@@ -1297,12 +1287,7 @@ static int32_t mndSetAlterStbRedoActions(SMnode *pMnode, STrans *pTrans, SDbObj
while
(
1
)
{
pIter
=
sdbFetch
(
pSdb
,
SDB_VGROUP
,
pIter
,
(
void
**
)
&
pVgroup
);
if
(
pIter
==
NULL
)
break
;
if
(
pVgroup
->
dbUid
!=
pDb
->
uid
)
{
sdbRelease
(
pSdb
,
pVgroup
);
continue
;
}
if
(
pVgroup
->
isTsma
)
{
if
(
!
mndVgroupInDb
(
pVgroup
,
pDb
->
uid
))
{
sdbRelease
(
pSdb
,
pVgroup
);
continue
;
}
...
...
@@ -1688,12 +1673,7 @@ static int32_t mndSetDropStbRedoActions(SMnode *pMnode, STrans *pTrans, SDbObj *
while
(
1
)
{
pIter
=
sdbFetch
(
pSdb
,
SDB_VGROUP
,
pIter
,
(
void
**
)
&
pVgroup
);
if
(
pIter
==
NULL
)
break
;
if
(
pVgroup
->
dbUid
!=
pDb
->
uid
)
{
sdbRelease
(
pSdb
,
pVgroup
);
continue
;
}
if
(
pVgroup
->
isTsma
)
{
if
(
!
mndVgroupInDb
(
pVgroup
,
pDb
->
uid
))
{
sdbRelease
(
pSdb
,
pVgroup
);
continue
;
}
...
...
source/dnode/mnode/impl/src/mndTrans.c
浏览文件 @
344ef7e1
...
...
@@ -1146,13 +1146,13 @@ static int32_t mndTransExecuteRedoActionsSerial(SMnode *pMnode, STrans *pTrans)
}
else
{
code
=
TSDB_CODE_ACTION_IN_PROGRESS
;
}
}
if
(
pAction
->
rawWritten
)
{
}
else
if
(
pAction
->
rawWritten
)
{
if
(
pAction
->
errCode
!=
0
&&
pAction
->
errCode
!=
pAction
->
acceptableCode
)
{
code
=
pAction
->
errCode
;
}
else
{
mDebug
(
"trans:%d, %s:%d write successfully"
,
pTrans
->
id
,
mndTransStr
(
pAction
->
stage
),
action
);
}
}
else
{
}
}
...
...
source/dnode/mnode/impl/src/mndVgroup.c
浏览文件 @
344ef7e1
...
...
@@ -1751,4 +1751,6 @@ _OVER:
taosArrayDestroy
(
pArray
);
return
code
;
}
\ No newline at end of file
}
bool
mndVgroupInDb
(
SVgObj
*
pVgroup
,
int64_t
dbUid
)
{
return
!
pVgroup
->
isTsma
&&
pVgroup
->
dbUid
==
dbUid
;
}
\ No newline at end of file
tests/system-test/fulltest.sh
浏览文件 @
344ef7e1
...
...
@@ -63,7 +63,7 @@ python3 ./test.py -f 2-query/To_unixtimestamp.py
python3 ./test.py
-f
2-query/timetruncate.py
python3 ./test.py
-f
2-query/diff.py
python3 ./test.py
-f
2-query/Timediff.py
#
python3 ./test.py -f 2-query/json_tag.py
python3 ./test.py
-f
2-query/json_tag.py
python3 ./test.py
-f
2-query/top.py
python3 ./test.py
-f
2-query/bottom.py
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录