Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
c9b8e748
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1187
Star
22018
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看板
提交
c9b8e748
编写于
12月 30, 2021
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add logs
上级
3c0077a3
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
15 addition
and
6 deletion
+15
-6
source/dnode/mgmt/impl/test/sut/inc/base.h
source/dnode/mgmt/impl/test/sut/inc/base.h
+1
-1
source/dnode/mgmt/impl/test/sut/src/base.cpp
source/dnode/mgmt/impl/test/sut/src/base.cpp
+2
-2
source/dnode/mnode/impl/src/mndCluster.c
source/dnode/mnode/impl/src/mndCluster.c
+2
-1
source/dnode/mnode/sdb/inc/sdbInt.h
source/dnode/mnode/sdb/inc/sdbInt.h
+3
-1
source/dnode/mnode/sdb/src/sdbFile.c
source/dnode/mnode/sdb/src/sdbFile.c
+6
-0
source/dnode/mnode/sdb/src/sdbHash.c
source/dnode/mnode/sdb/src/sdbHash.c
+1
-1
未找到文件。
source/dnode/mgmt/impl/test/sut/inc/base.h
浏览文件 @
c9b8e748
...
...
@@ -71,7 +71,7 @@ class Testbase {
const
char
*
GetShowBinary
(
int32_t
len
);
private:
int
32
_t
showId
;
int
64
_t
showId
;
STableMetaMsg
*
pMeta
;
SRetrieveTableRsp
*
pRetrieveRsp
;
char
*
pData
;
...
...
source/dnode/mgmt/impl/test/sut/src/base.cpp
浏览文件 @
c9b8e748
...
...
@@ -79,7 +79,7 @@ void Testbase::SendShowMetaMsg(int8_t showType, const char* db) {
SShowRsp
*
pShowRsp
=
(
SShowRsp
*
)
pMsg
->
pCont
;
ASSERT
(
pShowRsp
!=
nullptr
);
pShowRsp
->
showId
=
hto
nl
(
pShowRsp
->
showId
);
pShowRsp
->
showId
=
hto
be64
(
pShowRsp
->
showId
);
pMeta
=
&
pShowRsp
->
tableMeta
;
pMeta
->
numOfTags
=
htonl
(
pMeta
->
numOfTags
);
pMeta
->
numOfColumns
=
htonl
(
pMeta
->
numOfColumns
);
...
...
@@ -121,7 +121,7 @@ void Testbase::SendShowRetrieveMsg() {
int32_t
contLen
=
sizeof
(
SRetrieveTableMsg
);
SRetrieveTableMsg
*
pRetrieve
=
(
SRetrieveTableMsg
*
)
rpcMallocCont
(
contLen
);
pRetrieve
->
showId
=
hto
nl
(
showId
);
pRetrieve
->
showId
=
hto
be64
(
showId
);
pRetrieve
->
free
=
0
;
SRpcMsg
*
pMsg
=
SendMsg
(
TDMT_MND_SHOW_RETRIEVE
,
pRetrieve
,
contLen
);
...
...
source/dnode/mnode/impl/src/mndCluster.c
浏览文件 @
c9b8e748
...
...
@@ -33,7 +33,7 @@ static void mndCancelGetNextCluster(SMnode *pMnode, void *pIter);
int32_t
mndInitCluster
(
SMnode
*
pMnode
)
{
SSdbTable
table
=
{.
sdbType
=
SDB_CLUSTER
,
.
keyType
=
SDB_KEY_INT
32
,
.
keyType
=
SDB_KEY_INT
64
,
.
deployFp
=
(
SdbDeployFp
)
mndCreateDefaultCluster
,
.
encodeFp
=
(
SdbEncodeFp
)
mndClusterActionEncode
,
.
decodeFp
=
(
SdbDecodeFp
)
mndClusterActionDecode
,
...
...
@@ -128,6 +128,7 @@ static int32_t mndCreateDefaultCluster(SMnode *pMnode) {
clusterObj
.
id
=
mndGenerateUid
(
clusterObj
.
name
,
TSDB_CLUSTER_ID_LEN
);
clusterObj
.
id
=
(
clusterObj
.
id
>=
0
?
clusterObj
.
id
:
-
clusterObj
.
id
);
pMnode
->
clusterId
=
clusterObj
.
id
;
mDebug
(
"cluster:%"
PRId64
", name is %s"
,
clusterObj
.
id
,
clusterObj
.
name
);
SSdbRaw
*
pRaw
=
mndClusterActionEncode
(
&
clusterObj
);
...
...
source/dnode/mnode/sdb/inc/sdbInt.h
浏览文件 @
c9b8e748
...
...
@@ -72,7 +72,9 @@ typedef struct SSdb {
}
SSdb
;
int32_t
sdbWriteFile
(
SSdb
*
pSdb
);
void
sdbPrintOper
(
SSdb
*
pSdb
,
SSdbRow
*
pRow
,
const
char
*
oper
);
const
char
*
sdbTableName
(
ESdbType
type
);
void
sdbPrintOper
(
SSdb
*
pSdb
,
SSdbRow
*
pRow
,
const
char
*
oper
);
#ifdef __cplusplus
}
...
...
source/dnode/mnode/sdb/src/sdbFile.c
浏览文件 @
c9b8e748
...
...
@@ -121,6 +121,8 @@ int32_t sdbWriteFile(SSdb *pSdb) {
char
curfile
[
PATH_MAX
]
=
{
0
};
snprintf
(
curfile
,
sizeof
(
curfile
),
"%s%ssdb.data"
,
pSdb
->
currDir
,
TD_DIRSEP
);
mDebug
(
"start to write file:%s"
,
curfile
);
FileFd
fd
=
taosOpenFileCreateWrite
(
tmpfile
);
if
(
fd
<=
0
)
{
terrno
=
TAOS_SYSTEM_ERROR
(
errno
);
...
...
@@ -132,6 +134,8 @@ int32_t sdbWriteFile(SSdb *pSdb) {
SdbEncodeFp
encodeFp
=
pSdb
->
encodeFps
[
i
];
if
(
encodeFp
==
NULL
)
continue
;
mTrace
(
"sdb write %s, total %d rows"
,
sdbTableName
(
i
),
sdbGetSize
(
pSdb
,
i
));
SHashObj
*
hash
=
pSdb
->
hashObjs
[
i
];
SRWLatch
*
pLock
=
&
pSdb
->
locks
[
i
];
taosWLockLatch
(
pLock
);
...
...
@@ -144,6 +148,8 @@ int32_t sdbWriteFile(SSdb *pSdb) {
continue
;
}
sdbPrintOper
(
pSdb
,
pRow
,
"writeFile"
);
SSdbRaw
*
pRaw
=
(
*
encodeFp
)(
pRow
->
pObj
);
if
(
pRaw
!=
NULL
)
{
pRaw
->
status
=
pRow
->
status
;
...
...
source/dnode/mnode/sdb/src/sdbHash.c
浏览文件 @
c9b8e748
...
...
@@ -16,7 +16,7 @@
#define _DEFAULT_SOURCE
#include "sdbInt.h"
static
const
char
*
sdbTableName
(
ESdbType
type
)
{
const
char
*
sdbTableName
(
ESdbType
type
)
{
switch
(
type
)
{
case
SDB_TRANS
:
return
"trans"
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录