Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
b8319739
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
b8319739
编写于
6月 13, 2022
作者:
D
dapan1121
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix msg decode issue
上级
8d86b877
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
18 addition
and
13 deletion
+18
-13
source/common/src/tmsg.c
source/common/src/tmsg.c
+8
-10
source/dnode/mnode/impl/src/mndSma.c
source/dnode/mnode/impl/src/mndSma.c
+3
-2
source/dnode/mnode/impl/src/mndStb.c
source/dnode/mnode/impl/src/mndStb.c
+6
-0
source/libs/catalog/src/ctgCache.c
source/libs/catalog/src/ctgCache.c
+1
-1
未找到文件。
source/common/src/tmsg.c
浏览文件 @
b8319739
...
...
@@ -2652,7 +2652,8 @@ int32_t tSerializeSSTbHbRsp(void *buf, int32_t bufLen, SSTbHbRsp *pRsp) {
}
int32_t
numOfIndex
=
taosArrayGetSize
(
pRsp
->
pIndexRsp
);
for
(
int32_t
i
=
0
;
i
<
numOfMeta
;
++
i
)
{
if
(
tEncodeI32
(
&
encoder
,
numOfIndex
)
<
0
)
return
-
1
;
for
(
int32_t
i
=
0
;
i
<
numOfIndex
;
++
i
)
{
STableIndexRsp
*
pIndexRsp
=
taosArrayGet
(
pRsp
->
pIndexRsp
,
i
);
if
(
tEncodeCStr
(
&
encoder
,
pIndexRsp
->
tbName
)
<
0
)
return
-
1
;
if
(
tEncodeCStr
(
&
encoder
,
pIndexRsp
->
dbFName
)
<
0
)
return
-
1
;
...
...
@@ -2660,12 +2661,10 @@ int32_t tSerializeSSTbHbRsp(void *buf, int32_t bufLen, SSTbHbRsp *pRsp) {
if
(
tEncodeI32
(
&
encoder
,
pIndexRsp
->
version
)
<
0
)
return
-
1
;
int32_t
num
=
taosArrayGetSize
(
pIndexRsp
->
pIndex
);
if
(
tEncodeI32
(
&
encoder
,
num
)
<
0
)
return
-
1
;
if
(
num
>
0
)
{
for
(
int32_t
i
=
0
;
i
<
num
;
++
i
)
{
STableIndexInfo
*
pInfo
=
(
STableIndexInfo
*
)
taosArrayGet
(
pIndexRsp
->
pIndex
,
i
);
if
(
tSerializeSTableIndexInfo
(
&
encoder
,
pInfo
)
<
0
)
return
-
1
;
}
}
for
(
int32_t
i
=
0
;
i
<
num
;
++
i
)
{
STableIndexInfo
*
pInfo
=
(
STableIndexInfo
*
)
taosArrayGet
(
pIndexRsp
->
pIndex
,
i
);
if
(
tSerializeSTableIndexInfo
(
&
encoder
,
pInfo
)
<
0
)
return
-
1
;
}
}
tEndEncode
(
&
encoder
);
...
...
@@ -2693,9 +2692,8 @@ int32_t tDeserializeSSTbHbRsp(void *buf, int32_t bufLen, SSTbHbRsp *pRsp) {
if
(
tStartDecode
(
&
decoder
)
<
0
)
return
-
1
;
int32_t
numOfMeta
=
taosArrayGetSize
(
pRsp
->
pMetaRsp
)
;
int32_t
numOfMeta
=
0
;
if
(
tDecodeI32
(
&
decoder
,
&
numOfMeta
)
<
0
)
return
-
1
;
pRsp
->
pMetaRsp
=
taosArrayInit
(
numOfMeta
,
sizeof
(
STableMetaRsp
));
if
(
pRsp
->
pMetaRsp
==
NULL
)
{
terrno
=
TSDB_CODE_OUT_OF_MEMORY
;
...
...
@@ -2708,7 +2706,7 @@ int32_t tDeserializeSSTbHbRsp(void *buf, int32_t bufLen, SSTbHbRsp *pRsp) {
taosArrayPush
(
pRsp
->
pMetaRsp
,
&
tableMetaRsp
);
}
int32_t
numOfIndex
=
taosArrayGetSize
(
pRsp
->
pIndexRsp
)
;
int32_t
numOfIndex
=
0
;
if
(
tDecodeI32
(
&
decoder
,
&
numOfIndex
)
<
0
)
return
-
1
;
pRsp
->
pIndexRsp
=
taosArrayInit
(
numOfIndex
,
sizeof
(
STableIndexRsp
));
...
...
source/dnode/mnode/impl/src/mndSma.c
浏览文件 @
b8319739
...
...
@@ -532,6 +532,7 @@ static int32_t mndCreateSma(SMnode *pMnode, SRpcMsg *pReq, SMCreateSmaReq *pCrea
SStreamObj
streamObj
=
{
0
};
tstrncpy
(
streamObj
.
name
,
pCreate
->
name
,
TSDB_STREAM_FNAME_LEN
);
tstrncpy
(
streamObj
.
sourceDb
,
pDb
->
name
,
TSDB_DB_FNAME_LEN
);
tstrncpy
(
streamObj
.
targetDb
,
streamObj
.
sourceDb
,
TSDB_DB_FNAME_LEN
);
streamObj
.
createTime
=
taosGetTimestampMs
();
streamObj
.
updateTime
=
streamObj
.
createTime
;
streamObj
.
uid
=
mndGenerateUid
(
pCreate
->
name
,
strlen
(
pCreate
->
name
));
...
...
@@ -913,7 +914,7 @@ int32_t mndGetTableSma(SMnode *pMnode, char *tbFName, STableIndexRsp *rsp, bool
}
strcpy
(
rsp
->
dbFName
,
pStb
->
db
);
strcpy
(
rsp
->
tbName
,
pStb
->
name
);
strcpy
(
rsp
->
tbName
,
pStb
->
name
+
strlen
(
pStb
->
db
)
+
1
);
rsp
->
suid
=
pStb
->
uid
;
rsp
->
version
=
pStb
->
smaVer
;
mndReleaseStb
(
pMnode
,
pStb
);
...
...
@@ -1127,4 +1128,4 @@ static int32_t mndRetrieveSma(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pBloc
static
void
mndCancelGetNextSma
(
SMnode
*
pMnode
,
void
*
pIter
)
{
SSdb
*
pSdb
=
pMnode
->
pSdb
;
sdbCancelFetch
(
pSdb
,
pIter
);
}
\ No newline at end of file
}
source/dnode/mnode/impl/src/mndStb.c
浏览文件 @
b8319739
...
...
@@ -1715,6 +1715,12 @@ int32_t mndValidateStbInfo(SMnode *pMnode, SSTableVersion *pStbVersions, int32_t
bool
exist
=
false
;
char
tbFName
[
TSDB_TABLE_FNAME_LEN
];
STableIndexRsp
indexRsp
=
{
0
};
indexRsp
.
pIndex
=
taosArrayInit
(
10
,
sizeof
(
STableIndexInfo
));
if
(
NULL
==
indexRsp
.
pIndex
)
{
terrno
=
TSDB_CODE_OUT_OF_MEMORY
;
return
-
1
;
}
sprintf
(
tbFName
,
"%s.%s"
,
pStbVersion
->
dbFName
,
pStbVersion
->
stbName
);
int32_t
code
=
mndGetTableSma
(
pMnode
,
tbFName
,
&
indexRsp
,
&
exist
);
if
(
code
||
!
exist
)
{
...
...
source/libs/catalog/src/ctgCache.c
浏览文件 @
b8319739
...
...
@@ -1445,7 +1445,7 @@ int32_t ctgWriteTbIndexToCache(SCatalog *pCtg, SCtgDBCache *dbCache, char* dbFNa
ctgDebug
(
"table %s index updated to cache, ver:%d, num:%d"
,
tbName
,
pIndex
->
version
,
(
int32_t
)
taosArrayGetSize
(
pIndex
->
pIndex
));
if
(
suid
)
{
CTG_ERR_RET
(
ctgUpdateRentStbVersion
(
pCtg
,
dbFName
,
tbName
,
dbCache
->
dbId
,
pIndex
->
suid
,
pC
ache
));
CTG_ERR_RET
(
ctgUpdateRentStbVersion
(
pCtg
,
dbFName
,
tbName
,
dbCache
->
dbId
,
pIndex
->
suid
,
&
c
ache
));
}
return
TSDB_CODE_SUCCESS
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录