Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
eae7947c
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看板
提交
eae7947c
编写于
9月 08, 2022
作者:
H
Hongze Cheng
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
more refact
上级
2e8b43d0
变更
6
显示空白变更内容
内联
并排
Showing
6 changed file
with
12 addition
and
13 deletion
+12
-13
include/util/tdef.h
include/util/tdef.h
+2
-2
source/dnode/mnode/impl/src/mndDb.c
source/dnode/mnode/impl/src/mndDb.c
+1
-1
source/dnode/vnode/src/inc/tsdb.h
source/dnode/vnode/src/inc/tsdb.h
+3
-4
source/dnode/vnode/src/tsdb/tsdbCommit.c
source/dnode/vnode/src/tsdb/tsdbCommit.c
+3
-3
source/dnode/vnode/src/tsdb/tsdbReaderWriter.c
source/dnode/vnode/src/tsdb/tsdbReaderWriter.c
+1
-1
source/libs/parser/src/parTranslater.c
source/libs/parser/src/parTranslater.c
+2
-2
未找到文件。
include/util/tdef.h
浏览文件 @
eae7947c
...
@@ -359,8 +359,8 @@ typedef enum ELogicConditionType {
...
@@ -359,8 +359,8 @@ typedef enum ELogicConditionType {
#define TSDB_DB_SCHEMALESS_ON 1
#define TSDB_DB_SCHEMALESS_ON 1
#define TSDB_DB_SCHEMALESS_OFF 0
#define TSDB_DB_SCHEMALESS_OFF 0
#define TSDB_DEFAULT_DB_SCHEMALESS TSDB_DB_SCHEMALESS_OFF
#define TSDB_DEFAULT_DB_SCHEMALESS TSDB_DB_SCHEMALESS_OFF
#define TSDB_MIN_S
S
T_TRIGGER 1
#define TSDB_MIN_S
T
T_TRIGGER 1
#define TSDB_MAX_S
ST_TRIGGER 128
#define TSDB_MAX_S
TT_TRIGGER 16
#define TSDB_DEFAULT_SST_TRIGGER 8
#define TSDB_DEFAULT_SST_TRIGGER 8
#define TSDB_MIN_HASH_PREFIX 0
#define TSDB_MIN_HASH_PREFIX 0
#define TSDB_MAX_HASH_PREFIX 128
#define TSDB_MAX_HASH_PREFIX 128
...
...
source/dnode/mnode/impl/src/mndDb.c
浏览文件 @
eae7947c
...
@@ -338,7 +338,7 @@ static int32_t mndCheckDbCfg(SMnode *pMnode, SDbCfg *pCfg) {
...
@@ -338,7 +338,7 @@ static int32_t mndCheckDbCfg(SMnode *pMnode, SDbCfg *pCfg) {
if
(
pCfg
->
walRetentionSize
<
TSDB_DB_MIN_WAL_RETENTION_SIZE
)
return
-
1
;
if
(
pCfg
->
walRetentionSize
<
TSDB_DB_MIN_WAL_RETENTION_SIZE
)
return
-
1
;
if
(
pCfg
->
walRollPeriod
<
TSDB_DB_MIN_WAL_ROLL_PERIOD
)
return
-
1
;
if
(
pCfg
->
walRollPeriod
<
TSDB_DB_MIN_WAL_ROLL_PERIOD
)
return
-
1
;
if
(
pCfg
->
walSegmentSize
<
TSDB_DB_MIN_WAL_SEGMENT_SIZE
)
return
-
1
;
if
(
pCfg
->
walSegmentSize
<
TSDB_DB_MIN_WAL_SEGMENT_SIZE
)
return
-
1
;
if
(
pCfg
->
sstTrigger
<
TSDB_MIN_S
ST_TRIGGER
||
pCfg
->
sstTrigger
>
TSDB_MAX_SS
T_TRIGGER
)
return
-
1
;
if
(
pCfg
->
sstTrigger
<
TSDB_MIN_S
TT_TRIGGER
||
pCfg
->
sstTrigger
>
TSDB_MAX_ST
T_TRIGGER
)
return
-
1
;
if
(
pCfg
->
hashPrefix
<
TSDB_MIN_HASH_PREFIX
||
pCfg
->
hashPrefix
>
TSDB_MAX_HASH_PREFIX
)
return
-
1
;
if
(
pCfg
->
hashPrefix
<
TSDB_MIN_HASH_PREFIX
||
pCfg
->
hashPrefix
>
TSDB_MAX_HASH_PREFIX
)
return
-
1
;
if
(
pCfg
->
hashSuffix
<
TSDB_MIN_HASH_SUFFIX
||
pCfg
->
hashSuffix
>
TSDB_MAX_HASH_SUFFIX
)
return
-
1
;
if
(
pCfg
->
hashSuffix
<
TSDB_MIN_HASH_SUFFIX
||
pCfg
->
hashSuffix
>
TSDB_MAX_HASH_SUFFIX
)
return
-
1
;
...
...
source/dnode/vnode/src/inc/tsdb.h
浏览文件 @
eae7947c
...
@@ -69,7 +69,6 @@ typedef struct SLDataIter SLDataIter;
...
@@ -69,7 +69,6 @@ typedef struct SLDataIter SLDataIter;
#define TSDB_FILE_DLMT ((uint32_t)0xF00AFA0F)
#define TSDB_FILE_DLMT ((uint32_t)0xF00AFA0F)
#define TSDB_MAX_SUBBLOCKS 8
#define TSDB_MAX_SUBBLOCKS 8
#define TSDB_MAX_STT_FILE 16
#define TSDB_FHDR_SIZE 512
#define TSDB_FHDR_SIZE 512
#define TSDB_DEFAULT_PAGE_SIZE 4096
#define TSDB_DEFAULT_PAGE_SIZE 4096
...
@@ -571,7 +570,7 @@ struct SDFileSet {
...
@@ -571,7 +570,7 @@ struct SDFileSet {
SDataFile
*
pDataF
;
SDataFile
*
pDataF
;
SSmaFile
*
pSmaF
;
SSmaFile
*
pSmaF
;
uint8_t
nSttF
;
uint8_t
nSttF
;
SSttFile
*
aSttF
[
TSDB_MAX_STT_
FILE
];
SSttFile
*
aSttF
[
TSDB_MAX_STT_
TRIGGER
];
};
};
struct
SRowIter
{
struct
SRowIter
{
...
@@ -621,7 +620,7 @@ struct SDataFWriter {
...
@@ -621,7 +620,7 @@ struct SDataFWriter {
SHeadFile
fHead
;
SHeadFile
fHead
;
SDataFile
fData
;
SDataFile
fData
;
SSmaFile
fSma
;
SSmaFile
fSma
;
SSttFile
fStt
[
TSDB_MAX_STT_
FILE
];
SSttFile
fStt
[
TSDB_MAX_STT_
TRIGGER
];
uint8_t
*
aBuf
[
4
];
uint8_t
*
aBuf
[
4
];
};
};
...
@@ -632,7 +631,7 @@ struct SDataFReader {
...
@@ -632,7 +631,7 @@ struct SDataFReader {
STsdbFD
*
pHeadFD
;
STsdbFD
*
pHeadFD
;
STsdbFD
*
pDataFD
;
STsdbFD
*
pDataFD
;
STsdbFD
*
pSmaFD
;
STsdbFD
*
pSmaFD
;
STsdbFD
*
aSttFD
[
TSDB_MAX_STT_
FILE
];
STsdbFD
*
aSttFD
[
TSDB_MAX_STT_
TRIGGER
];
uint8_t
*
aBuf
[
3
];
uint8_t
*
aBuf
[
3
];
};
};
...
...
source/dnode/vnode/src/tsdb/tsdbCommit.c
浏览文件 @
eae7947c
...
@@ -71,7 +71,7 @@ typedef struct {
...
@@ -71,7 +71,7 @@ typedef struct {
SDataIter
*
pIter
;
SDataIter
*
pIter
;
SRBTree
rbt
;
SRBTree
rbt
;
SDataIter
dataIter
;
SDataIter
dataIter
;
SDataIter
aDataIter
[
TSDB_MAX_STT_
FILE
];
SDataIter
aDataIter
[
TSDB_MAX_STT_
TRIGGER
];
int8_t
toLastOnly
;
int8_t
toLastOnly
;
};
};
struct
{
struct
{
...
@@ -787,7 +787,7 @@ static int32_t tsdbCommitDataStart(SCommitter *pCommitter) {
...
@@ -787,7 +787,7 @@ static int32_t tsdbCommitDataStart(SCommitter *pCommitter) {
if
(
code
)
goto
_exit
;
if
(
code
)
goto
_exit
;
// merger
// merger
for
(
int32_t
iStt
=
0
;
iStt
<
TSDB_MAX_STT_
FILE
;
iStt
++
)
{
for
(
int32_t
iStt
=
0
;
iStt
<
TSDB_MAX_STT_
TRIGGER
;
iStt
++
)
{
SDataIter
*
pIter
=
&
pCommitter
->
aDataIter
[
iStt
];
SDataIter
*
pIter
=
&
pCommitter
->
aDataIter
[
iStt
];
pIter
->
aSttBlk
=
taosArrayInit
(
0
,
sizeof
(
SSttBlk
));
pIter
->
aSttBlk
=
taosArrayInit
(
0
,
sizeof
(
SSttBlk
));
if
(
pIter
->
aSttBlk
==
NULL
)
{
if
(
pIter
->
aSttBlk
==
NULL
)
{
...
@@ -829,7 +829,7 @@ static void tsdbCommitDataEnd(SCommitter *pCommitter) {
...
@@ -829,7 +829,7 @@ static void tsdbCommitDataEnd(SCommitter *pCommitter) {
tBlockDataDestroy
(
&
pCommitter
->
dReader
.
bData
,
1
);
tBlockDataDestroy
(
&
pCommitter
->
dReader
.
bData
,
1
);
// merger
// merger
for
(
int32_t
iStt
=
0
;
iStt
<
TSDB_MAX_STT_
FILE
;
iStt
++
)
{
for
(
int32_t
iStt
=
0
;
iStt
<
TSDB_MAX_STT_
TRIGGER
;
iStt
++
)
{
SDataIter
*
pIter
=
&
pCommitter
->
aDataIter
[
iStt
];
SDataIter
*
pIter
=
&
pCommitter
->
aDataIter
[
iStt
];
taosArrayDestroy
(
pIter
->
aSttBlk
);
taosArrayDestroy
(
pIter
->
aSttBlk
);
tBlockDataDestroy
(
&
pIter
->
bData
,
1
);
tBlockDataDestroy
(
&
pIter
->
bData
,
1
);
...
...
source/dnode/vnode/src/tsdb/tsdbReaderWriter.c
浏览文件 @
eae7947c
...
@@ -780,7 +780,7 @@ int32_t tsdbDataFReaderClose(SDataFReader **ppReader) {
...
@@ -780,7 +780,7 @@ int32_t tsdbDataFReaderClose(SDataFReader **ppReader) {
tsdbCloseFile
(
&
(
*
ppReader
)
->
pSmaFD
);
tsdbCloseFile
(
&
(
*
ppReader
)
->
pSmaFD
);
// stt
// stt
for
(
int32_t
iStt
=
0
;
iStt
<
TSDB_MAX_STT_
FILE
;
iStt
++
)
{
for
(
int32_t
iStt
=
0
;
iStt
<
TSDB_MAX_STT_
TRIGGER
;
iStt
++
)
{
if
((
*
ppReader
)
->
aSttFD
[
iStt
])
{
if
((
*
ppReader
)
->
aSttFD
[
iStt
])
{
tsdbCloseFile
(
&
(
*
ppReader
)
->
aSttFD
[
iStt
]);
tsdbCloseFile
(
&
(
*
ppReader
)
->
aSttFD
[
iStt
]);
}
}
...
...
source/libs/parser/src/parTranslater.c
浏览文件 @
eae7947c
...
@@ -3770,7 +3770,7 @@ static int32_t checkDatabaseOptions(STranslateContext* pCxt, const char* pDbName
...
@@ -3770,7 +3770,7 @@ static int32_t checkDatabaseOptions(STranslateContext* pCxt, const char* pDbName
checkDbRangeOption
(
pCxt
,
"walSegmentSize"
,
pOptions
->
walSegmentSize
,
TSDB_DB_MIN_WAL_SEGMENT_SIZE
,
INT32_MAX
);
checkDbRangeOption
(
pCxt
,
"walSegmentSize"
,
pOptions
->
walSegmentSize
,
TSDB_DB_MIN_WAL_SEGMENT_SIZE
,
INT32_MAX
);
}
}
if
(
TSDB_CODE_SUCCESS
==
code
)
{
if
(
TSDB_CODE_SUCCESS
==
code
)
{
code
=
checkDbRangeOption
(
pCxt
,
"sstTrigger"
,
pOptions
->
sstTrigger
,
TSDB_MIN_S
ST_TRIGGER
,
TSDB_MAX_SS
T_TRIGGER
);
code
=
checkDbRangeOption
(
pCxt
,
"sstTrigger"
,
pOptions
->
sstTrigger
,
TSDB_MIN_S
TT_TRIGGER
,
TSDB_MAX_ST
T_TRIGGER
);
}
}
if
(
TSDB_CODE_SUCCESS
==
code
)
{
if
(
TSDB_CODE_SUCCESS
==
code
)
{
code
=
checkDbRangeOption
(
pCxt
,
"tablePrefix"
,
pOptions
->
tablePrefix
,
TSDB_MIN_HASH_PREFIX
,
TSDB_MAX_HASH_PREFIX
);
code
=
checkDbRangeOption
(
pCxt
,
"tablePrefix"
,
pOptions
->
tablePrefix
,
TSDB_MIN_HASH_PREFIX
,
TSDB_MAX_HASH_PREFIX
);
...
@@ -6606,7 +6606,7 @@ static int32_t buildUpdateTagValReq(STranslateContext* pCxt, SAlterTableStmt* pS
...
@@ -6606,7 +6606,7 @@ static int32_t buildUpdateTagValReq(STranslateContext* pCxt, SAlterTableStmt* pS
SDataType
targetDt
=
schemaToDataType
(
pTableMeta
->
tableInfo
.
precision
,
pSchema
);
SDataType
targetDt
=
schemaToDataType
(
pTableMeta
->
tableInfo
.
precision
,
pSchema
);
if
(
QUERY_NODE_VALUE
!=
pStmt
->
pVal
->
node
.
type
)
{
if
(
QUERY_NODE_VALUE
!=
pStmt
->
pVal
->
node
.
type
)
{
SValueNode
*
pVal
=
NULL
;
SValueNode
*
pVal
=
NULL
;
pCxt
->
errCode
=
createTagValFromExpr
(
pCxt
,
targetDt
,
(
SNode
*
)
pStmt
->
pVal
,
&
pVal
);
pCxt
->
errCode
=
createTagValFromExpr
(
pCxt
,
targetDt
,
(
SNode
*
)
pStmt
->
pVal
,
&
pVal
);
if
(
pCxt
->
errCode
)
{
if
(
pCxt
->
errCode
)
{
return
pCxt
->
errCode
;
return
pCxt
->
errCode
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录