Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
7b9663b4
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看板
提交
7b9663b4
编写于
6月 28, 2021
作者:
haoranc
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of github.com:taosdata/TDengine into test/chr
上级
f5f56ae2
1c5819d3
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
52 addition
and
20 deletion
+52
-20
Jenkinsfile
Jenkinsfile
+19
-3
src/dnode/src/dnodeShell.c
src/dnode/src/dnodeShell.c
+8
-1
src/inc/taoserror.h
src/inc/taoserror.h
+1
-0
src/kit/taosdemo/taosdemo.c
src/kit/taosdemo/taosdemo.c
+9
-8
src/kit/taosdump/taosdump.c
src/kit/taosdump/taosdump.c
+5
-3
src/tsdb/src/tsdbMain.c
src/tsdb/src/tsdbMain.c
+2
-0
src/util/src/terror.c
src/util/src/terror.c
+1
-0
tests/pytest/insert/boundary2.py
tests/pytest/insert/boundary2.py
+7
-5
未找到文件。
Jenkinsfile
浏览文件 @
7b9663b4
...
...
@@ -119,16 +119,32 @@ pipeline {
abortPreviousBuilds
()
}
sh
'''
rm -rf ${WORKSPACE}.tes
cp -r ${WORKSPACE} ${WORKSPACE}.tes
cd ${WORKSPACE}.tes
git checkout develop
git pull
'''
script
{
if
(
env
.
CHANGE_TARGET
==
'master'
)
{
sh
'''
git checkout master
git pull origin master
'''
}
else
{
sh
'''
git checkout develop
git pull origin develop
'''
}
}
sh
'''
git fetch origin +refs/pull/${CHANGE_ID}/merge
git checkout -qf FETCH_HEAD
'''
script
{
env
.
skipstage
=
sh
(
script:
"cd ${WORKSPACE}.tes && git --no-pager diff --name-only FETCH_HEAD
develop
|grep -v -E '.*md|//src//connector|Jenkinsfile|test-all.sh' || echo 0 "
,
returnStdout:
true
)
env
.
skipstage
=
sh
(
script:
"cd ${WORKSPACE}.tes && git --no-pager diff --name-only FETCH_HEAD
${env.CHANGE_TARGET}
|grep -v -E '.*md|//src//connector|Jenkinsfile|test-all.sh' || echo 0 "
,
returnStdout:
true
)
}
println
env
.
skipstage
sh
'''
...
...
src/dnode/src/dnodeShell.c
浏览文件 @
7b9663b4
...
...
@@ -116,7 +116,14 @@ static void dnodeProcessMsgFromShell(SRpcMsg *pMsg, SRpcEpSet *pEpSet) {
if
(
pMsg
->
pCont
==
NULL
)
return
;
if
(
dnodeGetRunStatus
()
!=
TSDB_RUN_STATUS_RUNING
)
{
SRunStatus
dnodeStatus
=
dnodeGetRunStatus
();
if
(
dnodeStatus
==
TSDB_RUN_STATUS_STOPPED
)
{
dError
(
"RPC %p, shell msg:%s is ignored since dnode exiting"
,
pMsg
->
handle
,
taosMsg
[
pMsg
->
msgType
]);
rpcMsg
.
code
=
TSDB_CODE_DND_EXITING
;
rpcSendResponse
(
&
rpcMsg
);
rpcFreeCont
(
pMsg
->
pCont
);
return
;
}
else
if
(
dnodeStatus
!=
TSDB_RUN_STATUS_RUNING
)
{
dError
(
"RPC %p, shell msg:%s is ignored since dnode not running"
,
pMsg
->
handle
,
taosMsg
[
pMsg
->
msgType
]);
rpcMsg
.
code
=
TSDB_CODE_APP_NOT_READY
;
rpcSendResponse
(
&
rpcMsg
);
...
...
src/inc/taoserror.h
浏览文件 @
7b9663b4
...
...
@@ -198,6 +198,7 @@ int32_t* taosGetErrno();
#define TSDB_CODE_DND_INVALID_MSG_LEN TAOS_DEF_ERROR_CODE(0, 0x0403) //"Invalid message length")
#define TSDB_CODE_DND_ACTION_IN_PROGRESS TAOS_DEF_ERROR_CODE(0, 0x0404) //"Action in progress")
#define TSDB_CODE_DND_TOO_MANY_VNODES TAOS_DEF_ERROR_CODE(0, 0x0405) //"Too many vnode directories")
#define TSDB_CODE_DND_EXITING TAOS_DEF_ERROR_CODE(0, 0x0406) //"Dnode is exiting"
// vnode
#define TSDB_CODE_VND_ACTION_IN_PROGRESS TAOS_DEF_ERROR_CODE(0, 0x0500) //"Action in progress")
...
...
src/kit/taosdemo/taosdemo.c
浏览文件 @
7b9663b4
...
...
@@ -982,9 +982,9 @@ static void parse_args(int argc, char *argv[], SArguments *arguments) {
arguments
->
len_of_binary
=
atoi
(
argv
[
++
i
]);
}
else
if
(
strcmp
(
argv
[
i
],
"-m"
)
==
0
)
{
if
((
argc
==
i
+
1
)
||
(
!
isStringNumber
(
argv
[
i
+
1
])))
{
(
isStringNumber
(
argv
[
i
+
1
])))
{
printHelp
();
errorPrint
(
"%s"
,
"
\n\t
-m need a
number
following!
\n
"
);
errorPrint
(
"%s"
,
"
\n\t
-m need a
letter-initial string
following!
\n
"
);
exit
(
EXIT_FAILURE
);
}
arguments
->
tb_prefix
=
argv
[
++
i
];
...
...
@@ -1204,23 +1204,24 @@ static void fetchResult(TAOS_RES *res, threadInfo* pThreadInfo) {
return
;
}
int
totalLen
=
0
;
char
temp
[
16000
];
int64_t
totalLen
=
0
;
// fetch the records row by row
while
((
row
=
taos_fetch_row
(
res
)))
{
if
(
(
strlen
(
pThreadInfo
->
filePath
)
>
0
)
&&
(
totalLen
>=
100
*
1024
*
1024
-
32000
))
{
appendResultBufToFile
(
databuf
,
pThreadInfo
);
if
(
totalLen
>=
100
*
1024
*
1024
-
32000
)
{
if
(
strlen
(
pThreadInfo
->
filePath
)
>
0
)
appendResultBufToFile
(
databuf
,
pThreadInfo
);
totalLen
=
0
;
memset
(
databuf
,
0
,
100
*
1024
*
1024
);
}
num_rows
++
;
char
temp
[
16000
]
=
{
0
};
int
len
=
taos_print_row
(
temp
,
row
,
fields
,
num_fields
);
len
+=
sprintf
(
temp
+
len
,
"
\n
"
);
//printf("query result:%s\n", temp);
memcpy
(
databuf
+
totalLen
,
temp
,
len
);
totalLen
+=
len
;
debugPrint
(
"totalLen: %"
PRId64
"
\n
"
,
totalLen
);
}
verbosePrint
(
"%s() LN%d, databuf=%s resultFile=%s
\n
"
,
...
...
@@ -5097,7 +5098,7 @@ static int32_t generateStbDataTail(
}
else
{
retLen
=
getRowDataFromSample
(
data
,
remainderBufLen
,
remainderBufLen
<
MAX_DATA_SIZE
?
remainderBufLen
:
MAX_DATA_SIZE
,
startTime
+
superTblInfo
->
timeStampStep
*
k
,
superTblInfo
,
pSamplePos
);
...
...
src/kit/taosdump/taosdump.c
浏览文件 @
7b9663b4
...
...
@@ -29,6 +29,9 @@
#define COMMAND_SIZE 65536
//#define DEFAULT_DUMP_FILE "taosdump.sql"
// for strncpy buffer overflow
#define min(a, b) (((a) < (b)) ? (a) : (b))
int
converStringToReadable
(
char
*
str
,
int
size
,
char
*
buf
,
int
bufsize
);
int
convertNCharToReadable
(
char
*
str
,
int
size
,
char
*
buf
,
int
bufsize
);
void
taosDumpCharset
(
FILE
*
fp
);
...
...
@@ -1119,12 +1122,11 @@ int taosGetTableDes(
TAOS_FIELD
*
fields
=
taos_fetch_fields
(
res
);
tstrncpy
(
tableDes
->
name
,
table
,
TSDB_TABLE_NAME_LEN
);
while
((
row
=
taos_fetch_row
(
res
))
!=
NULL
)
{
strncpy
(
tableDes
->
cols
[
count
].
field
,
(
char
*
)
row
[
TSDB_DESCRIBE_METRIC_FIELD_INDEX
],
fields
[
TSDB_DESCRIBE_METRIC_FIELD_INDEX
].
bytes
);
strncpy
(
tableDes
->
cols
[
count
].
type
,
(
char
*
)
row
[
TSDB_DESCRIBE_METRIC_TYPE_INDEX
],
fields
[
TSDB_DESCRIBE_METRIC_TYPE_INDEX
].
bytes
);
min
(
15
,
fields
[
TSDB_DESCRIBE_METRIC_TYPE_INDEX
].
bytes
)
);
tableDes
->
cols
[
count
].
length
=
*
((
int
*
)
row
[
TSDB_DESCRIBE_METRIC_LENGTH_INDEX
]);
strncpy
(
tableDes
->
cols
[
count
].
note
,
(
char
*
)
row
[
TSDB_DESCRIBE_METRIC_NOTE_INDEX
],
fields
[
TSDB_DESCRIBE_METRIC_NOTE_INDEX
].
bytes
);
...
...
@@ -1575,7 +1577,7 @@ int taosDumpDb(SDbInfo *dbInfo, struct arguments *arguments, FILE *fp, TAOS *tao
tstrncpy
(
tableRecord
.
name
,
(
char
*
)
row
[
TSDB_SHOW_TABLES_NAME_INDEX
],
fields
[
TSDB_SHOW_TABLES_NAME_INDEX
].
bytes
);
tstrncpy
(
tableRecord
.
metric
,
(
char
*
)
row
[
TSDB_SHOW_TABLES_METRIC_INDEX
],
fields
[
TSDB_SHOW_TABLES_METRIC_INDEX
].
bytes
);
min
(
TSDB_TABLE_NAME_LEN
,
fields
[
TSDB_SHOW_TABLES_METRIC_INDEX
].
bytes
)
);
taosWrite
(
fd
,
&
tableRecord
,
sizeof
(
STableRecord
));
...
...
src/tsdb/src/tsdbMain.c
浏览文件 @
7b9663b4
...
...
@@ -126,6 +126,8 @@ int tsdbCloseRepo(STsdbRepo *repo, int toCommit) {
tsdbSyncCommit
(
repo
);
}
tsem_wait
(
&
(
pRepo
->
readyToCommit
));
tsdbUnRefMemTable
(
pRepo
,
pRepo
->
mem
);
tsdbUnRefMemTable
(
pRepo
,
pRepo
->
imem
);
pRepo
->
mem
=
NULL
;
...
...
src/util/src/terror.c
浏览文件 @
7b9663b4
...
...
@@ -210,6 +210,7 @@ TAOS_DEFINE_ERROR(TSDB_CODE_DND_NO_WRITE_ACCESS, "No permission for dis
TAOS_DEFINE_ERROR
(
TSDB_CODE_DND_INVALID_MSG_LEN
,
"Invalid message length"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_DND_ACTION_IN_PROGRESS
,
"Action in progress"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_DND_TOO_MANY_VNODES
,
"Too many vnode directories"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_DND_EXITING
,
"Dnode is exiting"
)
// vnode
TAOS_DEFINE_ERROR
(
TSDB_CODE_VND_ACTION_IN_PROGRESS
,
"Action in progress"
)
...
...
tests/pytest/insert/boundary2.py
浏览文件 @
7b9663b4
...
...
@@ -50,14 +50,16 @@ class TDTestCase:
sql
+=
"'%s')"
%
self
.
get_random_string
(
22
)
tdSql
.
execute
(
sql
%
(
self
.
ts
+
i
))
tdSql
.
query
(
"select * from stb"
)
tdSql
.
checkRows
(
4096
)
time
.
sleep
(
10
)
tdSql
.
query
(
"select count(*) from stb"
)
tdSql
.
checkData
(
0
,
0
,
4096
)
tdDnodes
.
stop
(
1
)
tdDnodes
.
start
(
1
)
tdSql
.
query
(
"select * from stb"
)
tdSql
.
checkRows
(
4096
)
time
.
sleep
(
1
)
tdSql
.
query
(
"select count(*) from stb"
)
tdSql
.
checkData
(
0
,
0
,
4096
)
endTime
=
time
.
time
()
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录