Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
665ecc86
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看板
提交
665ecc86
编写于
1月 11, 2021
作者:
H
Hui Li
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'develop' into hotfix/test
上级
9a3770c0
a56e677f
变更
10
显示空白变更内容
内联
并排
Showing
10 changed file
with
33 addition
and
12 deletion
+33
-12
src/client/src/tscAsync.c
src/client/src/tscAsync.c
+1
-1
src/client/src/tscSql.c
src/client/src/tscSql.c
+1
-1
src/plugins/http/src/httpSql.c
src/plugins/http/src/httpSql.c
+2
-2
src/vnode/inc/vnodeRead.h
src/vnode/inc/vnodeRead.h
+1
-1
src/vnode/inc/vnodeWrite.h
src/vnode/inc/vnodeWrite.h
+1
-1
src/vnode/src/vnodeMain.c
src/vnode/src/vnodeMain.c
+0
-3
src/vnode/src/vnodeRead.c
src/vnode/src/vnodeRead.c
+6
-1
src/vnode/src/vnodeStatus.c
src/vnode/src/vnodeStatus.c
+12
-0
src/vnode/src/vnodeWrite.c
src/vnode/src/vnodeWrite.c
+6
-1
tests/pytest/functions/function_percentile.py
tests/pytest/functions/function_percentile.py
+3
-1
未找到文件。
src/client/src/tscAsync.c
浏览文件 @
665ecc86
...
@@ -95,7 +95,7 @@ void taos_query_a(TAOS *taos, const char *sqlstr, __async_cb_func_t fp, void *pa
...
@@ -95,7 +95,7 @@ void taos_query_a(TAOS *taos, const char *sqlstr, __async_cb_func_t fp, void *pa
return
;
return
;
}
}
nPrintTsc
(
sqlstr
);
nPrintTsc
(
"%s"
,
sqlstr
);
SSqlObj
*
pSql
=
(
SSqlObj
*
)
calloc
(
1
,
sizeof
(
SSqlObj
));
SSqlObj
*
pSql
=
(
SSqlObj
*
)
calloc
(
1
,
sizeof
(
SSqlObj
));
if
(
pSql
==
NULL
)
{
if
(
pSql
==
NULL
)
{
...
...
src/client/src/tscSql.c
浏览文件 @
665ecc86
...
@@ -327,7 +327,7 @@ TAOS_RES* taos_query_c(TAOS *taos, const char *sqlstr, uint32_t sqlLen, int64_t*
...
@@ -327,7 +327,7 @@ TAOS_RES* taos_query_c(TAOS *taos, const char *sqlstr, uint32_t sqlLen, int64_t*
return
NULL
;
return
NULL
;
}
}
nPrintTsc
(
sqlstr
);
nPrintTsc
(
"%s"
,
sqlstr
);
SSqlObj
*
pSql
=
calloc
(
1
,
sizeof
(
SSqlObj
));
SSqlObj
*
pSql
=
calloc
(
1
,
sizeof
(
SSqlObj
));
if
(
pSql
==
NULL
)
{
if
(
pSql
==
NULL
)
{
...
...
src/plugins/http/src/httpSql.c
浏览文件 @
665ecc86
...
@@ -181,7 +181,7 @@ void httpProcessMultiSql(HttpContext *pContext) {
...
@@ -181,7 +181,7 @@ void httpProcessMultiSql(HttpContext *pContext) {
char
*
sql
=
httpGetCmdsString
(
pContext
,
cmd
->
sql
);
char
*
sql
=
httpGetCmdsString
(
pContext
,
cmd
->
sql
);
httpTraceL
(
"context:%p, fd:%d, user:%s, process pos:%d, start query, sql:%s"
,
pContext
,
pContext
->
fd
,
pContext
->
user
,
httpTraceL
(
"context:%p, fd:%d, user:%s, process pos:%d, start query, sql:%s"
,
pContext
,
pContext
->
fd
,
pContext
->
user
,
multiCmds
->
pos
,
sql
);
multiCmds
->
pos
,
sql
);
nPrintHttp
(
sql
);
nPrintHttp
(
"%s"
,
sql
);
taos_query_a
(
pContext
->
session
->
taos
,
sql
,
httpProcessMultiSqlCallBack
,
(
void
*
)
pContext
);
taos_query_a
(
pContext
->
session
->
taos
,
sql
,
httpProcessMultiSqlCallBack
,
(
void
*
)
pContext
);
}
}
...
@@ -329,7 +329,7 @@ void httpProcessSingleSqlCmd(HttpContext *pContext) {
...
@@ -329,7 +329,7 @@ void httpProcessSingleSqlCmd(HttpContext *pContext) {
}
}
httpTraceL
(
"context:%p, fd:%d, user:%s, start query, sql:%s"
,
pContext
,
pContext
->
fd
,
pContext
->
user
,
sql
);
httpTraceL
(
"context:%p, fd:%d, user:%s, start query, sql:%s"
,
pContext
,
pContext
->
fd
,
pContext
->
user
,
sql
);
nPrintHttp
(
sql
);
nPrintHttp
(
"%s"
,
sql
);
taos_query_a
(
pSession
->
taos
,
sql
,
httpProcessSingleSqlCallBack
,
(
void
*
)
pContext
);
taos_query_a
(
pSession
->
taos
,
sql
,
httpProcessSingleSqlCallBack
,
(
void
*
)
pContext
);
}
}
...
...
src/vnode/inc/vnodeRead.h
浏览文件 @
665ecc86
...
@@ -27,7 +27,7 @@ void vnodeCleanupRead(void);
...
@@ -27,7 +27,7 @@ void vnodeCleanupRead(void);
int32_t
vnodeWriteToRQueue
(
void
*
pVnode
,
void
*
pCont
,
int32_t
contLen
,
int8_t
qtype
,
void
*
rparam
);
int32_t
vnodeWriteToRQueue
(
void
*
pVnode
,
void
*
pCont
,
int32_t
contLen
,
int8_t
qtype
,
void
*
rparam
);
void
vnodeFreeFromRQueue
(
void
*
pVnode
,
SVReadMsg
*
pRead
);
void
vnodeFreeFromRQueue
(
void
*
pVnode
,
SVReadMsg
*
pRead
);
int32_t
vnodeProcessRead
(
void
*
pVnode
,
SVReadMsg
*
pRead
);
int32_t
vnodeProcessRead
(
void
*
pVnode
,
SVReadMsg
*
pRead
);
void
vnodeWaitReadCompleted
(
void
*
pVnode
);
void
vnodeWaitReadCompleted
(
SVnodeObj
*
pVnode
);
#ifdef __cplusplus
#ifdef __cplusplus
}
}
...
...
src/vnode/inc/vnodeWrite.h
浏览文件 @
665ecc86
...
@@ -27,7 +27,7 @@ void vnodeCleanupWrite(void);
...
@@ -27,7 +27,7 @@ void vnodeCleanupWrite(void);
int32_t
vnodeWriteToWQueue
(
void
*
pVnode
,
void
*
pHead
,
int32_t
qtype
,
void
*
pRpcMsg
);
int32_t
vnodeWriteToWQueue
(
void
*
pVnode
,
void
*
pHead
,
int32_t
qtype
,
void
*
pRpcMsg
);
void
vnodeFreeFromWQueue
(
void
*
pVnode
,
SVWriteMsg
*
pWrite
);
void
vnodeFreeFromWQueue
(
void
*
pVnode
,
SVWriteMsg
*
pWrite
);
int32_t
vnodeProcessWrite
(
void
*
pVnode
,
void
*
pHead
,
int32_t
qtype
,
void
*
pRspRet
);
int32_t
vnodeProcessWrite
(
void
*
pVnode
,
void
*
pHead
,
int32_t
qtype
,
void
*
pRspRet
);
void
vnodeWaitWriteCompleted
(
void
*
pVnode
);
void
vnodeWaitWriteCompleted
(
SVnodeObj
*
pVnode
);
#ifdef __cplusplus
#ifdef __cplusplus
}
}
...
...
src/vnode/src/vnodeMain.c
浏览文件 @
665ecc86
...
@@ -420,9 +420,6 @@ void vnodeCleanUp(SVnodeObj *pVnode) {
...
@@ -420,9 +420,6 @@ void vnodeCleanUp(SVnodeObj *pVnode) {
vnodeSetClosingStatus
(
pVnode
);
vnodeSetClosingStatus
(
pVnode
);
// release local resources only after cutting off outside connections
qQueryMgmtNotifyClosed
(
pVnode
->
qMgmt
);
// stop replication module
// stop replication module
if
(
pVnode
->
sync
>
0
)
{
if
(
pVnode
->
sync
>
0
)
{
int64_t
sync
=
pVnode
->
sync
;
int64_t
sync
=
pVnode
->
sync
;
...
...
src/vnode/src/vnodeRead.c
浏览文件 @
665ecc86
...
@@ -436,4 +436,9 @@ int32_t vnodeNotifyCurrentQhandle(void *handle, void *qhandle, int32_t vgId) {
...
@@ -436,4 +436,9 @@ int32_t vnodeNotifyCurrentQhandle(void *handle, void *qhandle, int32_t vgId) {
return
rpcReportProgress
(
handle
,
(
char
*
)
pMsg
,
sizeof
(
SRetrieveTableMsg
));
return
rpcReportProgress
(
handle
,
(
char
*
)
pMsg
,
sizeof
(
SRetrieveTableMsg
));
}
}
void
vnodeWaitReadCompleted
(
void
*
pVnode
)
{}
void
vnodeWaitReadCompleted
(
SVnodeObj
*
pVnode
)
{
\ No newline at end of file
while
(
pVnode
->
queuedRMsg
>
0
)
{
vTrace
(
"vgId:%d, queued rmsg num:%d"
,
pVnode
->
vgId
,
pVnode
->
queuedRMsg
);
taosMsleep
(
10
);
}
}
\ No newline at end of file
src/vnode/src/vnodeStatus.c
浏览文件 @
665ecc86
...
@@ -18,6 +18,8 @@
...
@@ -18,6 +18,8 @@
#include "taosmsg.h"
#include "taosmsg.h"
#include "query.h"
#include "query.h"
#include "vnodeStatus.h"
#include "vnodeStatus.h"
#include "vnodeRead.h"
#include "vnodeWrite.h"
char
*
vnodeStatus
[]
=
{
char
*
vnodeStatus
[]
=
{
"init"
,
"init"
,
...
@@ -75,6 +77,11 @@ bool vnodeSetClosingStatus(SVnodeObj* pVnode) {
...
@@ -75,6 +77,11 @@ bool vnodeSetClosingStatus(SVnodeObj* pVnode) {
}
}
}
}
// release local resources only after cutting off outside connections
qQueryMgmtNotifyClosed
(
pVnode
->
qMgmt
);
vnodeWaitReadCompleted
(
pVnode
);
vnodeWaitWriteCompleted
(
pVnode
);
return
true
;
return
true
;
}
}
...
@@ -116,6 +123,11 @@ bool vnodeSetResetStatus(SVnodeObj* pVnode) {
...
@@ -116,6 +123,11 @@ bool vnodeSetResetStatus(SVnodeObj* pVnode) {
}
}
}
}
// release local resources only after cutting off outside connections
qQueryMgmtNotifyClosed
(
pVnode
->
qMgmt
);
vnodeWaitReadCompleted
(
pVnode
);
vnodeWaitWriteCompleted
(
pVnode
);
return
true
;
return
true
;
}
}
...
...
src/vnode/src/vnodeWrite.c
浏览文件 @
665ecc86
...
@@ -345,4 +345,9 @@ static int32_t vnodePerformFlowCtrl(SVWriteMsg *pWrite) {
...
@@ -345,4 +345,9 @@ static int32_t vnodePerformFlowCtrl(SVWriteMsg *pWrite) {
}
}
}
}
void
vnodeWaitWriteCompleted
(
void
*
pVnode
)
{}
void
vnodeWaitWriteCompleted
(
SVnodeObj
*
pVnode
)
{
\ No newline at end of file
while
(
pVnode
->
queuedWMsg
>
0
)
{
vTrace
(
"vgId:%d, queued wmsg num:%d"
,
pVnode
->
vgId
,
pVnode
->
queuedWMsg
);
taosMsleep
(
10
);
}
}
tests/pytest/functions/function_percentile.py
浏览文件 @
665ecc86
...
@@ -144,8 +144,10 @@ class TDTestCase:
...
@@ -144,8 +144,10 @@ class TDTestCase:
print
(
"apercentile result: %s"
%
tdSql
.
getData
(
0
,
0
))
print
(
"apercentile result: %s"
%
tdSql
.
getData
(
0
,
0
))
# Test case for: https://jira.taosdata.com:18080/browse/TD-2609
# Test case for: https://jira.taosdata.com:18080/browse/TD-2609
# modified for : https://jira.taosdata.com:18080/browse/TD-2627
tdSql
.
execute
(
"create table st(ts timestamp, k int)"
)
tdSql
.
execute
(
"create table st(ts timestamp, k int)"
)
tdSql
.
execute
(
"insert into st values(now, -100)"
)
tdSql
.
execute
(
"insert into st values(now, -100)
(now+1a,-99)
"
)
tdSql
.
query
(
"select apercentile(k, 20) from st"
)
tdSql
.
query
(
"select apercentile(k, 20) from st"
)
tdSql
.
checkData
(
0
,
0
,
-
100.00
)
tdSql
.
checkData
(
0
,
0
,
-
100.00
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录