Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
165dc989
T
TDengine
项目概览
慢慢CG
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
165dc989
编写于
5月 22, 2021
作者:
haoranc
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of github.com:taosdata/TDengine into test/chr
上级
f321ba91
dbf565c9
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
81 addition
and
58 deletion
+81
-58
cmake/platform.inc
cmake/platform.inc
+6
-0
src/client/src/tscStream.c
src/client/src/tscStream.c
+1
-0
src/kit/taosdemo/taosdemo.c
src/kit/taosdemo/taosdemo.c
+70
-54
src/os/src/detail/osSignal.c
src/os/src/detail/osSignal.c
+3
-3
src/util/src/tcrc32c.c
src/util/src/tcrc32c.c
+1
-1
未找到文件。
cmake/platform.inc
浏览文件 @
165dc989
...
...
@@ -102,6 +102,12 @@ IF ("${CPUTYPE}" STREQUAL "")
SET
(
TD_LINUX
TRUE
)
SET
(
TD_LINUX_64
FALSE
)
SET
(
TD_ARM_64
TRUE
)
ELSEIF
(
CMAKE_SYSTEM_PROCESSOR
MATCHES
"mips64"
)
SET
(
CPUTYPE
"mips64"
)
MESSAGE
(
STATUS
"Set CPUTYPE to mips64"
)
SET
(
TD_LINUX
TRUE
)
SET
(
TD_LINUX_64
FALSE
)
SET
(
TD_MIPS_64
TRUE
)
ENDIF
()
ELSE
()
...
...
src/client/src/tscStream.c
浏览文件 @
165dc989
...
...
@@ -623,6 +623,7 @@ TAOS_STREAM *taos_open_stream(TAOS *taos, const char *sqlstr, void (*fp)(void *p
if
(
pSql
->
sqlstr
==
NULL
)
{
tscError
(
"0x%"
PRIx64
" failed to malloc sql string buffer"
,
pSql
->
self
);
tscFreeSqlObj
(
pSql
);
free
(
pStream
);
return
NULL
;
}
...
...
src/kit/taosdemo/taosdemo.c
浏览文件 @
165dc989
...
...
@@ -3453,16 +3453,6 @@ static bool getMetaFromInsertJsonFile(cJSON* root) {
}
g_args
.
interlace_rows
=
interlaceRows
->
valueint
;
// rows per table need be less than insert batch
if
(
g_args
.
interlace_rows
>
g_args
.
num_of_RPR
)
{
printf
(
"NOTICE: interlace rows value %"
PRIu64
" > num_of_records_per_req %"
PRIu64
"
\n\n
"
,
g_args
.
interlace_rows
,
g_args
.
num_of_RPR
);
printf
(
" interlace rows value will be set to num_of_records_per_req %"
PRIu64
"
\n\n
"
,
g_args
.
num_of_RPR
);
prompt
();
g_args
.
interlace_rows
=
g_args
.
num_of_RPR
;
}
}
else
if
(
!
interlaceRows
)
{
g_args
.
interlace_rows
=
0
;
// 0 means progressive mode, > 0 mean interlace mode. max value is less or equ num_of_records_per_req
}
else
{
...
...
@@ -3528,6 +3518,16 @@ static bool getMetaFromInsertJsonFile(cJSON* root) {
goto
PARSE_OVER
;
}
// rows per table need be less than insert batch
if
(
g_args
.
interlace_rows
>
g_args
.
num_of_RPR
)
{
printf
(
"NOTICE: interlace rows value %"
PRIu64
" > num_of_records_per_req %"
PRIu64
"
\n\n
"
,
g_args
.
interlace_rows
,
g_args
.
num_of_RPR
);
printf
(
" interlace rows value will be set to num_of_records_per_req %"
PRIu64
"
\n\n
"
,
g_args
.
num_of_RPR
);
prompt
();
g_args
.
interlace_rows
=
g_args
.
num_of_RPR
;
}
cJSON
*
dbs
=
cJSON_GetObjectItem
(
root
,
"databases"
);
if
(
!
dbs
||
dbs
->
type
!=
cJSON_Array
)
{
printf
(
"ERROR: failed to read json, databases not found
\n
"
);
...
...
@@ -4825,10 +4825,12 @@ static int64_t execInsert(threadInfo *pThreadInfo, char *buffer, uint64_t k)
return
affectedRows
;
}
static
void
getTableName
(
char
*
pTblName
,
threadInfo
*
pThreadInfo
,
uint64_t
tableSeq
)
static
void
getTableName
(
char
*
pTblName
,
threadInfo
*
pThreadInfo
,
uint64_t
tableSeq
)
{
SSuperTable
*
superTblInfo
=
pThreadInfo
->
superTblInfo
;
if
(
superTblInfo
)
{
if
((
superTblInfo
)
&&
(
AUTO_CREATE_SUBTBL
!=
superTblInfo
->
autoCreateTable
))
{
if
(
superTblInfo
->
childTblLimit
>
0
)
{
snprintf
(
pTblName
,
TSDB_TABLE_NAME_LEN
,
"%s"
,
superTblInfo
->
childTblName
+
...
...
@@ -6601,6 +6603,7 @@ static void *superSubscribe(void *sarg) {
threadInfo
*
pThreadInfo
=
(
threadInfo
*
)
sarg
;
char
subSqlstr
[
MAX_QUERY_SQL_LENGTH
];
TAOS_SUB
*
tsub
[
MAX_QUERY_SQL_COUNT
]
=
{
0
};
uint64_t
tsubSeq
;
if
(
pThreadInfo
->
ntables
>
MAX_QUERY_SQL_COUNT
)
{
errorPrint
(
"The table number(%"
PRId64
") of the thread is more than max query sql count: %d
\n
"
,
...
...
@@ -6609,6 +6612,15 @@ static void *superSubscribe(void *sarg) {
exit
(
-
1
);
}
if
(
g_queryInfo
.
superQueryInfo
.
sqlCount
*
pThreadInfo
->
ntables
>
MAX_QUERY_SQL_COUNT
)
{
errorPrint
(
"The number %"
PRId64
" of sql count(%"
PRIu64
") multiple the table number(%"
PRId64
") of the thread is more than max query sql count: %d
\n
"
,
g_queryInfo
.
superQueryInfo
.
sqlCount
*
pThreadInfo
->
ntables
,
g_queryInfo
.
superQueryInfo
.
sqlCount
,
pThreadInfo
->
ntables
,
MAX_QUERY_SQL_COUNT
);
exit
(
-
1
);
}
if
(
pThreadInfo
->
taos
==
NULL
)
{
TAOS
*
taos
=
NULL
;
taos
=
taos_connect
(
g_queryInfo
.
host
,
...
...
@@ -6637,6 +6649,8 @@ static void *superSubscribe(void *sarg) {
char
topic
[
32
]
=
{
0
};
for
(
uint64_t
i
=
pThreadInfo
->
start_table_from
;
i
<=
pThreadInfo
->
end_table_to
;
i
++
)
{
tsubSeq
=
i
-
pThreadInfo
->
start_table_from
;
verbosePrint
(
"%s() LN%d, [%d], start=%"
PRId64
" end=%"
PRId64
" i=%"
PRIu64
"
\n
"
,
__func__
,
__LINE__
,
pThreadInfo
->
threadID
,
...
...
@@ -6656,12 +6670,12 @@ static void *superSubscribe(void *sarg) {
debugPrint
(
"%s() LN%d, [%d] subSqlstr: %s
\n
"
,
__func__
,
__LINE__
,
pThreadInfo
->
threadID
,
subSqlstr
);
tsub
[
i
]
=
subscribeImpl
(
tsub
[
tsubSeq
]
=
subscribeImpl
(
STABLE_CLASS
,
pThreadInfo
,
subSqlstr
,
topic
,
g_queryInfo
.
superQueryInfo
.
subscribeRestart
,
g_queryInfo
.
superQueryInfo
.
subscribeInterval
);
if
(
NULL
==
tsub
[
i
])
{
if
(
NULL
==
tsub
[
tsubSeq
])
{
taos_close
(
pThreadInfo
->
taos
);
return
NULL
;
}
...
...
@@ -6677,54 +6691,56 @@ static void *superSubscribe(void *sarg) {
while
(
1
)
{
for
(
uint64_t
i
=
pThreadInfo
->
start_table_from
;
i
<=
pThreadInfo
->
end_table_to
;
i
++
)
{
if
(
ASYNC_MODE
==
g_queryInfo
.
superQueryInfo
.
asyncMode
)
{
continue
;
}
res
=
taos_consume
(
tsub
[
i
]);
if
(
res
)
{
if
(
g_queryInfo
.
superQueryInfo
.
result
[
pThreadInfo
->
querySeq
][
0
]
!=
0
)
{
sprintf
(
pThreadInfo
->
fp
,
"%s-%d"
,
g_queryInfo
.
superQueryInfo
.
result
[
pThreadInfo
->
querySeq
],
pThreadInfo
->
threadID
);
appendResultToFile
(
res
,
pThreadInfo
->
fp
);
}
if
(
g_queryInfo
.
superQueryInfo
.
result
[
pThreadInfo
->
querySeq
][
0
]
!=
0
)
{
sprintf
(
pThreadInfo
->
fp
,
"%s-%d"
,
g_queryInfo
.
superQueryInfo
.
result
[
pThreadInfo
->
querySeq
],
pThreadInfo
->
threadID
);
appendResultToFile
(
res
,
pThreadInfo
->
fp
);
}
consumed
[
i
]
++
;
tsubSeq
=
i
-
pThreadInfo
->
start_table_from
;
if
(
ASYNC_MODE
==
g_queryInfo
.
superQueryInfo
.
asyncMode
)
{
continue
;
}
if
((
g_queryInfo
.
superQueryInfo
.
subscribeKeepProgress
)
&&
(
consumed
[
i
]
>=
g_queryInfo
.
superQueryInfo
.
resubAfterConsume
[
pThreadInfo
->
querySeq
]))
{
printf
(
"keepProgress:%d, resub super table query: %"
PRIu64
"
\n
"
,
g_queryInfo
.
superQueryInfo
.
subscribeKeepProgress
,
pThreadInfo
->
querySeq
);
taos_unsubscribe
(
tsub
,
res
=
taos_consume
(
tsub
[
tsubSeq
]);
if
(
res
)
{
if
(
g_queryInfo
.
superQueryInfo
.
result
[
pThreadInfo
->
querySeq
][
0
]
!=
0
)
{
sprintf
(
pThreadInfo
->
fp
,
"%s-%d"
,
g_queryInfo
.
superQueryInfo
.
result
[
pThreadInfo
->
querySeq
],
pThreadInfo
->
threadID
);
appendResultToFile
(
res
,
pThreadInfo
->
fp
);
}
if
(
g_queryInfo
.
superQueryInfo
.
result
[
pThreadInfo
->
querySeq
][
0
]
!=
0
)
{
sprintf
(
pThreadInfo
->
fp
,
"%s-%d"
,
g_queryInfo
.
superQueryInfo
.
result
[
pThreadInfo
->
querySeq
],
pThreadInfo
->
threadID
);
appendResultToFile
(
res
,
pThreadInfo
->
fp
);
}
consumed
[
tsubSeq
]
++
;
if
((
g_queryInfo
.
superQueryInfo
.
subscribeKeepProgress
)
&&
(
consumed
[
tsubSeq
]
>=
g_queryInfo
.
superQueryInfo
.
resubAfterConsume
[
pThreadInfo
->
querySeq
]))
{
printf
(
"keepProgress:%d, resub super table query: %"
PRIu64
"
\n
"
,
g_queryInfo
.
superQueryInfo
.
subscribeKeepProgress
,
pThreadInfo
->
querySeq
);
taos_unsubscribe
(
tsub
[
tsubSeq
],
g_queryInfo
.
superQueryInfo
.
subscribeKeepProgress
);
consumed
[
i
]
=
0
;
tsub
[
i
]
=
subscribeImpl
(
STABLE_CLASS
,
pThreadInfo
,
subSqlstr
,
topic
,
g_queryInfo
.
superQueryInfo
.
subscribeRestart
,
g_queryInfo
.
superQueryInfo
.
subscribeInterval
);
if
(
NULL
==
tsub
[
i
])
{
taos_close
(
pThreadInfo
->
taos
);
return
NULL
;
}
}
}
consumed
[
tsubSeq
]
=
0
;
tsub
[
tsubSeq
]
=
subscribeImpl
(
STABLE_CLASS
,
pThreadInfo
,
subSqlstr
,
topic
,
g_queryInfo
.
superQueryInfo
.
subscribeRestart
,
g_queryInfo
.
superQueryInfo
.
subscribeInterval
);
if
(
NULL
==
tsub
[
tsubSeq
])
{
taos_close
(
pThreadInfo
->
taos
);
return
NULL
;
}
}
}
}
}
taos_free_result
(
res
);
for
(
uint64_t
i
=
pThreadInfo
->
start_table_from
;
i
<=
pThreadInfo
->
end_table_to
;
i
++
)
{
taos_unsubscribe
(
tsub
[
i
],
0
);
tsubSeq
=
i
-
pThreadInfo
->
start_table_from
;
taos_unsubscribe
(
tsub
[
tsubSeq
],
0
);
}
taos_close
(
pThreadInfo
->
taos
);
...
...
src/os/src/detail/osSignal.c
浏览文件 @
165dc989
...
...
@@ -23,14 +23,14 @@
typedef
void
(
*
FLinuxSignalHandler
)(
int32_t
signum
,
siginfo_t
*
sigInfo
,
void
*
context
);
void
taosSetSignal
(
int32_t
signum
,
FSignalHandler
sigfp
)
{
struct
sigaction
act
=
{{
0
}};
struct
sigaction
act
;
memset
(
&
act
,
0
,
sizeof
(
act
));
#if 1
act
.
sa_flags
=
SA_SIGINFO
;
act
.
sa_sigaction
=
(
FLinuxSignalHandler
)
sigfp
;
#else
act
.
sa_handler
=
sigfp
;
act
.
sa_handler
=
sigfp
;
#endif
sigaction
(
signum
,
&
act
,
NULL
);
sigaction
(
signum
,
&
act
,
NULL
);
}
void
taosIgnSignal
(
int32_t
signum
)
{
...
...
src/util/src/tcrc32c.c
浏览文件 @
165dc989
...
...
@@ -17,7 +17,7 @@
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#if
ndef _TD_ARM_
#if
!defined(_TD_ARM_) && !defined(_TD_MIPS_)
#include <nmmintrin.h>
#endif
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录