Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
d0141f7a
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看板
提交
d0141f7a
编写于
12月 10, 2020
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
TD-2321
上级
f887f92a
变更
6
显示空白变更内容
内联
并排
Showing
6 changed file
with
20 addition
and
15 deletion
+20
-15
src/common/src/tglobal.c
src/common/src/tglobal.c
+1
-1
src/cq/src/cqMain.c
src/cq/src/cqMain.c
+1
-1
src/inc/taoserror.h
src/inc/taoserror.h
+3
-2
src/mnode/src/mnodeSdb.c
src/mnode/src/mnodeSdb.c
+1
-1
src/vnode/src/vnodeRead.c
src/vnode/src/vnodeRead.c
+7
-7
src/vnode/src/vnodeWrite.c
src/vnode/src/vnodeWrite.c
+7
-3
未找到文件。
src/common/src/tglobal.c
浏览文件 @
d0141f7a
...
@@ -206,7 +206,7 @@ int32_t tsNumOfLogLines = 10000000;
...
@@ -206,7 +206,7 @@ int32_t tsNumOfLogLines = 10000000;
int32_t
mDebugFlag
=
131
;
int32_t
mDebugFlag
=
131
;
int32_t
sdbDebugFlag
=
131
;
int32_t
sdbDebugFlag
=
131
;
int32_t
dDebugFlag
=
135
;
int32_t
dDebugFlag
=
135
;
int32_t
vDebugFlag
=
13
1
;
int32_t
vDebugFlag
=
13
5
;
int32_t
cDebugFlag
=
131
;
int32_t
cDebugFlag
=
131
;
int32_t
jniDebugFlag
=
131
;
int32_t
jniDebugFlag
=
131
;
int32_t
odbcDebugFlag
=
131
;
int32_t
odbcDebugFlag
=
131
;
...
...
src/cq/src/cqMain.c
浏览文件 @
d0141f7a
...
@@ -161,7 +161,7 @@ void cqStop(void *handle) {
...
@@ -161,7 +161,7 @@ void cqStop(void *handle) {
return
;
return
;
}
}
SCqContext
*
pContext
=
handle
;
SCqContext
*
pContext
=
handle
;
c
Info
(
"vgId:%d, stop all CQs"
,
pContext
->
vgId
);
c
Debug
(
"vgId:%d, stop all CQs"
,
pContext
->
vgId
);
if
(
pContext
->
dbConn
==
NULL
||
pContext
->
master
==
0
)
return
;
if
(
pContext
->
dbConn
==
NULL
||
pContext
->
master
==
0
)
return
;
pthread_mutex_lock
(
&
pContext
->
mutex
);
pthread_mutex_lock
(
&
pContext
->
mutex
);
...
...
src/inc/taoserror.h
浏览文件 @
d0141f7a
...
@@ -206,9 +206,10 @@ TAOS_DEFINE_ERROR(TSDB_CODE_VND_NO_SUCH_FILE_OR_DIR, 0, 0x0507, "Missing da
...
@@ -206,9 +206,10 @@ TAOS_DEFINE_ERROR(TSDB_CODE_VND_NO_SUCH_FILE_OR_DIR, 0, 0x0507, "Missing da
TAOS_DEFINE_ERROR
(
TSDB_CODE_VND_OUT_OF_MEMORY
,
0
,
0x0508
,
"Out of memory"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_VND_OUT_OF_MEMORY
,
0
,
0x0508
,
"Out of memory"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_VND_APP_ERROR
,
0
,
0x0509
,
"Unexpected generic error in vnode"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_VND_APP_ERROR
,
0
,
0x0509
,
"Unexpected generic error in vnode"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_VND_INVALID_VRESION_FILE
,
0
,
0x050A
,
"Invalid version file"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_VND_INVALID_VRESION_FILE
,
0
,
0x050A
,
"Invalid version file"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_VND_IS_FULL
,
0
,
0x050B
,
"Vnode memory is full because commit failed"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_VND_IS_FULL
,
0
,
0x050B
,
"Database memory is full for commit failed"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_VND_IS_FLOWCTRL
,
0
,
0x050C
,
"Database memory is full for waiting commit"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_VND_NOT_SYNCED
,
0
,
0x0511
,
"Database suspended"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_VND_NOT_SYNCED
,
0
,
0x0511
,
"Database suspended"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_VND_NO_WRITE_AUTH
,
0
,
0x0512
,
"
W
rite operation denied"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_VND_NO_WRITE_AUTH
,
0
,
0x0512
,
"
Database w
rite operation denied"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_VND_SYNCING
,
0
,
0x0513
,
"Database is syncing"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_VND_SYNCING
,
0
,
0x0513
,
"Database is syncing"
)
// tsdb
// tsdb
...
...
src/mnode/src/mnodeSdb.c
浏览文件 @
d0141f7a
...
@@ -35,7 +35,7 @@
...
@@ -35,7 +35,7 @@
#include "mnodeSdb.h"
#include "mnodeSdb.h"
#define SDB_TABLE_LEN 12
#define SDB_TABLE_LEN 12
#define MAX_QUEUED_MSG_NUM 10
24
#define MAX_QUEUED_MSG_NUM 10
000
typedef
enum
{
typedef
enum
{
SDB_ACTION_INSERT
=
0
,
SDB_ACTION_INSERT
=
0
,
...
...
src/vnode/src/vnodeRead.c
浏览文件 @
d0141f7a
...
@@ -133,7 +133,7 @@ static int32_t vnodePutItemIntoReadQueue(SVnodeObj *pVnode, void **qhandle, void
...
@@ -133,7 +133,7 @@ static int32_t vnodePutItemIntoReadQueue(SVnodeObj *pVnode, void **qhandle, void
int32_t
code
=
vnodeWriteToRQueue
(
pVnode
,
qhandle
,
0
,
TAOS_QTYPE_QUERY
,
&
rpcMsg
);
int32_t
code
=
vnodeWriteToRQueue
(
pVnode
,
qhandle
,
0
,
TAOS_QTYPE_QUERY
,
&
rpcMsg
);
if
(
code
==
TSDB_CODE_SUCCESS
)
{
if
(
code
==
TSDB_CODE_SUCCESS
)
{
v
Debug
(
"QInfo:%p add to vread queue for exec query"
,
*
qhandle
);
v
Trace
(
"QInfo:%p add to vread queue for exec query"
,
*
qhandle
);
}
}
return
code
;
return
code
;
...
@@ -164,7 +164,7 @@ static int32_t vnodeDumpQueryResult(SRspRet *pRet, void *pVnode, void **handle,
...
@@ -164,7 +164,7 @@ static int32_t vnodeDumpQueryResult(SRspRet *pRet, void *pVnode, void **handle,
}
}
}
else
{
}
else
{
*
freeHandle
=
true
;
*
freeHandle
=
true
;
v
Debug
(
"QInfo:%p exec completed, free handle:%d"
,
*
handle
,
*
freeHandle
);
v
Trace
(
"QInfo:%p exec completed, free handle:%d"
,
*
handle
,
*
freeHandle
);
}
}
}
else
{
}
else
{
SRetrieveTableRsp
*
pRsp
=
(
SRetrieveTableRsp
*
)
rpcMallocCont
(
sizeof
(
SRetrieveTableRsp
));
SRetrieveTableRsp
*
pRsp
=
(
SRetrieveTableRsp
*
)
rpcMallocCont
(
sizeof
(
SRetrieveTableRsp
));
...
@@ -266,7 +266,7 @@ static int32_t vnodeProcessQueryMsg(SVnodeObj *pVnode, SVReadMsg *pRead) {
...
@@ -266,7 +266,7 @@ static int32_t vnodeProcessQueryMsg(SVnodeObj *pVnode, SVReadMsg *pRead) {
}
}
if
(
handle
!=
NULL
)
{
if
(
handle
!=
NULL
)
{
v
Debug
(
"vgId:%d, QInfo:%p, dnode query msg disposed, create qhandle and returns to app"
,
vgId
,
*
handle
);
v
Trace
(
"vgId:%d, QInfo:%p, dnode query msg disposed, create qhandle and returns to app"
,
vgId
,
*
handle
);
code
=
vnodePutItemIntoReadQueue
(
pVnode
,
handle
,
pRead
->
rpcHandle
);
code
=
vnodePutItemIntoReadQueue
(
pVnode
,
handle
,
pRead
->
rpcHandle
);
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
pRsp
->
code
=
code
;
pRsp
->
code
=
code
;
...
@@ -278,7 +278,7 @@ static int32_t vnodeProcessQueryMsg(SVnodeObj *pVnode, SVReadMsg *pRead) {
...
@@ -278,7 +278,7 @@ static int32_t vnodeProcessQueryMsg(SVnodeObj *pVnode, SVReadMsg *pRead) {
assert
(
pCont
!=
NULL
);
assert
(
pCont
!=
NULL
);
void
**
qhandle
=
(
void
**
)
pRead
->
qhandle
;
void
**
qhandle
=
(
void
**
)
pRead
->
qhandle
;
v
Debug
(
"vgId:%d, QInfo:%p, dnode continues to exec query"
,
pVnode
->
vgId
,
*
qhandle
);
v
Trace
(
"vgId:%d, QInfo:%p, dnode continues to exec query"
,
pVnode
->
vgId
,
*
qhandle
);
// In the retrieve blocking model, only 50% CPU will be used in query processing
// In the retrieve blocking model, only 50% CPU will be used in query processing
if
(
tsHalfCoresForQuery
)
{
if
(
tsHalfCoresForQuery
)
{
...
@@ -294,7 +294,7 @@ static int32_t vnodeProcessQueryMsg(SVnodeObj *pVnode, SVReadMsg *pRead) {
...
@@ -294,7 +294,7 @@ static int32_t vnodeProcessQueryMsg(SVnodeObj *pVnode, SVReadMsg *pRead) {
pRead
->
rpcHandle
=
qGetResultRetrieveMsg
(
*
qhandle
);
pRead
->
rpcHandle
=
qGetResultRetrieveMsg
(
*
qhandle
);
assert
(
pRead
->
rpcHandle
!=
NULL
);
assert
(
pRead
->
rpcHandle
!=
NULL
);
v
Debug
(
"vgId:%d, QInfo:%p, start to build retrieval rsp after query paused, %p"
,
pVnode
->
vgId
,
*
qhandle
,
v
Trace
(
"vgId:%d, QInfo:%p, start to build retrieval rsp after query paused, %p"
,
pVnode
->
vgId
,
*
qhandle
,
pRead
->
rpcHandle
);
pRead
->
rpcHandle
);
// set the real rsp error code
// set the real rsp error code
...
@@ -327,7 +327,7 @@ static int32_t vnodeProcessFetchMsg(SVnodeObj *pVnode, SVReadMsg *pRead) {
...
@@ -327,7 +327,7 @@ static int32_t vnodeProcessFetchMsg(SVnodeObj *pVnode, SVReadMsg *pRead) {
pRetrieve
->
free
=
htons
(
pRetrieve
->
free
);
pRetrieve
->
free
=
htons
(
pRetrieve
->
free
);
pRetrieve
->
qhandle
=
htobe64
(
pRetrieve
->
qhandle
);
pRetrieve
->
qhandle
=
htobe64
(
pRetrieve
->
qhandle
);
v
Debug
(
"vgId:%d, QInfo:%p, retrieve msg is disposed, free:%d, conn:%p"
,
pVnode
->
vgId
,
(
void
*
)
pRetrieve
->
qhandle
,
v
Trace
(
"vgId:%d, QInfo:%p, retrieve msg is disposed, free:%d, conn:%p"
,
pVnode
->
vgId
,
(
void
*
)
pRetrieve
->
qhandle
,
pRetrieve
->
free
,
pRead
->
rpcHandle
);
pRetrieve
->
free
,
pRead
->
rpcHandle
);
memset
(
pRet
,
0
,
sizeof
(
SRspRet
));
memset
(
pRet
,
0
,
sizeof
(
SRspRet
));
...
@@ -410,6 +410,6 @@ int32_t vnodeNotifyCurrentQhandle(void *handle, void *qhandle, int32_t vgId) {
...
@@ -410,6 +410,6 @@ int32_t vnodeNotifyCurrentQhandle(void *handle, void *qhandle, int32_t vgId) {
pMsg
->
header
.
vgId
=
htonl
(
vgId
);
pMsg
->
header
.
vgId
=
htonl
(
vgId
);
pMsg
->
header
.
contLen
=
htonl
(
sizeof
(
SRetrieveTableMsg
));
pMsg
->
header
.
contLen
=
htonl
(
sizeof
(
SRetrieveTableMsg
));
v
Debug
(
"QInfo:%p register qhandle to connect:%p"
,
qhandle
,
handle
);
v
Trace
(
"QInfo:%p register qhandle to connect:%p"
,
qhandle
,
handle
);
return
rpcReportProgress
(
handle
,
(
char
*
)
pMsg
,
sizeof
(
SRetrieveTableMsg
));
return
rpcReportProgress
(
handle
,
(
char
*
)
pMsg
,
sizeof
(
SRetrieveTableMsg
));
}
}
src/vnode/src/vnodeWrite.c
浏览文件 @
d0141f7a
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
#include "dnode.h"
#include "dnode.h"
#include "vnodeStatus.h"
#include "vnodeStatus.h"
#define MAX_QUEUED_MSG_NUM 10
24
#define MAX_QUEUED_MSG_NUM 10
000
extern
void
*
tsDnodeTmr
;
extern
void
*
tsDnodeTmr
;
static
int32_t
(
*
vnodeProcessWriteMsgFp
[
TSDB_MSG_TYPE_MAX
])(
SVnodeObj
*
,
void
*
pCont
,
SRspRet
*
);
static
int32_t
(
*
vnodeProcessWriteMsgFp
[
TSDB_MSG_TYPE_MAX
])(
SVnodeObj
*
,
void
*
pCont
,
SRspRet
*
);
...
@@ -271,6 +271,8 @@ static void vnodeFlowCtrlMsgToWQueue(void *param, void *tmrId) {
...
@@ -271,6 +271,8 @@ static void vnodeFlowCtrlMsgToWQueue(void *param, void *tmrId) {
SVnodeObj
*
pVnode
=
pWrite
->
pVnode
;
SVnodeObj
*
pVnode
=
pWrite
->
pVnode
;
int32_t
code
=
TSDB_CODE_VND_SYNCING
;
int32_t
code
=
TSDB_CODE_VND_SYNCING
;
if
(
pVnode
->
flowctrlLevel
<=
0
)
code
=
TSDB_CODE_VND_IS_FLOWCTRL
;
pWrite
->
processedCount
++
;
pWrite
->
processedCount
++
;
if
(
pWrite
->
processedCount
>
100
)
{
if
(
pWrite
->
processedCount
>
100
)
{
vError
(
"vgId:%d, msg:%p, failed to process since %s, retry:%d"
,
pVnode
->
vgId
,
pWrite
,
tstrerror
(
code
),
vError
(
"vgId:%d, msg:%p, failed to process since %s, retry:%d"
,
pVnode
->
vgId
,
pWrite
,
tstrerror
(
code
),
...
@@ -290,8 +292,10 @@ static void vnodeFlowCtrlMsgToWQueue(void *param, void *tmrId) {
...
@@ -290,8 +292,10 @@ static void vnodeFlowCtrlMsgToWQueue(void *param, void *tmrId) {
static
int32_t
vnodePerformFlowCtrl
(
SVWriteMsg
*
pWrite
)
{
static
int32_t
vnodePerformFlowCtrl
(
SVWriteMsg
*
pWrite
)
{
SVnodeObj
*
pVnode
=
pWrite
->
pVnode
;
SVnodeObj
*
pVnode
=
pWrite
->
pVnode
;
if
(
pVnode
->
queuedWMsg
<
MAX_QUEUED_MSG_NUM
)
{
if
(
pVnode
->
flowctrlLevel
<=
0
)
return
0
;
if
(
pVnode
->
flowctrlLevel
<=
0
)
return
0
;
if
(
pWrite
->
qtype
!=
TAOS_QTYPE_RPC
)
return
0
;
if
(
pWrite
->
qtype
!=
TAOS_QTYPE_RPC
)
return
0
;
}
if
(
tsFlowCtrl
==
0
)
{
if
(
tsFlowCtrl
==
0
)
{
int32_t
ms
=
pow
(
2
,
pVnode
->
flowctrlLevel
+
2
);
int32_t
ms
=
pow
(
2
,
pVnode
->
flowctrlLevel
+
2
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录