Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
dgr6878
TDengine
提交
335d42cf
T
TDengine
项目概览
dgr6878
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
8
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
335d42cf
编写于
8月 29, 2019
作者:
S
slguan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix the issue #443
上级
b806c458
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
17 addition
and
20 deletion
+17
-20
src/system/src/dnodeService.c
src/system/src/dnodeService.c
+1
-1
src/system/src/mgmtDnodeInt.c
src/system/src/mgmtDnodeInt.c
+2
-1
src/system/src/vnodeCommit.c
src/system/src/vnodeCommit.c
+2
-1
src/system/src/vnodeMeter.c
src/system/src/vnodeMeter.c
+3
-3
src/system/src/vnodeShell.c
src/system/src/vnodeShell.c
+3
-2
src/system/src/vnodeStream.c
src/system/src/vnodeStream.c
+1
-1
src/system/src/vnodeSystem.c
src/system/src/vnodeSystem.c
+5
-11
未找到文件。
src/system/src/dnodeService.c
浏览文件 @
335d42cf
...
...
@@ -66,7 +66,7 @@ int main(int argc, char *argv[]) {
exit
(
EXIT_FAILURE
);
}
}
else
if
(
strcmp
(
argv
[
i
],
"-V"
)
==
0
)
{
printf
(
"
%s
%s
\n
"
,
version
,
compatible_version
);
printf
(
"
version: %s compatible_version:
%s
\n
"
,
version
,
compatible_version
);
printf
(
"gitinfo: %s
\n
"
,
gitinfo
);
printf
(
"buildinfo: %s
\n
"
,
buildinfo
);
return
0
;
...
...
src/system/src/mgmtDnodeInt.c
浏览文件 @
335d42cf
...
...
@@ -29,6 +29,7 @@ char *mgmtBuildCreateMeterIe(STabObj *pMeter, char *pMsg, int vnode);
void
vnodeProcessMsgFromMgmt
(
SSchedMsg
*
smsg
);
void
*
rpcQhandle
;
extern
void
*
dmQhandle
;
int
mgmtSendMsgToDnode
(
char
*
msg
)
{
mTrace
(
"msg:%s is sent to dnode"
,
taosMsg
[
*
msg
]);
...
...
@@ -38,7 +39,7 @@ int mgmtSendMsgToDnode(char *msg) {
schedMsg
.
msg
=
msg
;
schedMsg
.
ahandle
=
NULL
;
schedMsg
.
thandle
=
NULL
;
taosScheduleTask
(
rpc
Qhandle
,
&
schedMsg
);
taosScheduleTask
(
dm
Qhandle
,
&
schedMsg
);
return
0
;
}
...
...
src/system/src/vnodeCommit.c
浏览文件 @
335d42cf
...
...
@@ -144,6 +144,7 @@ size_t vnodeRestoreDataFromLog(int vnode, char *fileName, uint64_t *firstV) {
goto
_error
;
}
TSKEY
now
=
taosGetTimestamp
(
pVnode
->
cfg
.
precision
);
SCommitHead
head
;
int
simpleCheck
=
0
;
while
(
1
)
{
...
...
@@ -180,7 +181,7 @@ size_t vnodeRestoreDataFromLog(int vnode, char *fileName, uint64_t *firstV) {
int32_t
numOfPoints
=
0
;
(
*
vnodeProcessAction
[
head
.
action
])(
pObj
,
cont
,
head
.
contLen
,
TSDB_DATA_SOURCE_LOG
,
NULL
,
head
.
sversion
,
&
numOfPoints
);
&
numOfPoints
,
now
);
actions
++
;
}
else
{
break
;
...
...
src/system/src/vnodeMeter.c
浏览文件 @
335d42cf
...
...
@@ -35,7 +35,7 @@ int tsMeterSizeOnFile;
void
vnodeUpdateMeter
(
void
*
param
,
void
*
tmdId
);
void
vnodeRecoverMeterObjectFile
(
int
vnode
);
int
(
*
vnodeProcessAction
[])(
SMeterObj
*
,
char
*
,
int
,
char
,
void
*
,
int
,
int
*
)
=
{
vnodeInsertPoints
,
int
(
*
vnodeProcessAction
[])(
SMeterObj
*
,
char
*
,
int
,
char
,
void
*
,
int
,
int
*
,
TSKEY
)
=
{
vnodeInsertPoints
,
vnodeImportPoints
};
void
vnodeFreeMeterObj
(
SMeterObj
*
pObj
)
{
...
...
@@ -506,7 +506,7 @@ int vnodeRemoveMeterObj(int vnode, int sid) {
}
int
vnodeInsertPoints
(
SMeterObj
*
pObj
,
char
*
cont
,
int
contLen
,
char
source
,
void
*
param
,
int
sversion
,
int
*
numOfInsertPoints
)
{
int
*
numOfInsertPoints
,
TSKEY
now
)
{
int
expectedLen
,
i
;
short
numOfPoints
;
SSubmitMsg
*
pSubmit
=
(
SSubmitMsg
*
)
cont
;
...
...
@@ -528,7 +528,7 @@ int vnodeInsertPoints(SMeterObj *pObj, char *cont, int contLen, char source, voi
// to guarantee time stamp is the same for all vnodes
pData
=
pSubmit
->
payLoad
;
tsKey
=
taosGetTimestamp
(
pVnode
->
cfg
.
precision
)
;
tsKey
=
now
;
cfile
=
tsKey
/
pVnode
->
cfg
.
daysPerFile
/
tsMsPerDay
[
pVnode
->
cfg
.
precision
];
if
(
*
((
TSKEY
*
)
pData
)
==
0
)
{
for
(
i
=
0
;
i
<
numOfPoints
;
++
i
)
{
...
...
src/system/src/vnodeShell.c
浏览文件 @
335d42cf
...
...
@@ -484,6 +484,7 @@ int vnodeProcessShellSubmitRequest(char *pMsg, int msgLen, SShellObj *pObj) {
int32_t
numOfPoints
=
0
;
int32_t
numOfTotalPoints
=
0
;
TSKEY
now
=
taosGetTimestamp
(
pVnode
->
cfg
.
precision
);
for
(
int32_t
i
=
0
;
i
<
pSubmit
->
numOfSid
;
++
i
)
{
numOfPoints
=
0
;
...
...
@@ -523,11 +524,11 @@ int vnodeProcessShellSubmitRequest(char *pMsg, int msgLen, SShellObj *pObj) {
// meter status is ready for insert/import
if
(
pSubmit
->
import
)
{
code
=
vnodeImportPoints
(
pMeterObj
,
(
char
*
)
&
(
pBlocks
->
numOfRows
),
subMsgLen
,
TSDB_DATA_SOURCE_SHELL
,
pObj
,
sversion
,
&
numOfPoints
);
sversion
,
&
numOfPoints
,
now
);
vnodeClearMeterState
(
pMeterObj
,
TSDB_METER_STATE_IMPORTING
);
}
else
{
code
=
vnodeInsertPoints
(
pMeterObj
,
(
char
*
)
&
(
pBlocks
->
numOfRows
),
subMsgLen
,
TSDB_DATA_SOURCE_SHELL
,
NULL
,
sversion
,
&
numOfPoints
);
sversion
,
&
numOfPoints
,
now
);
vnodeClearMeterState
(
pMeterObj
,
TSDB_METER_STATE_INSERT
);
}
...
...
src/system/src/vnodeStream.c
浏览文件 @
335d42cf
...
...
@@ -57,7 +57,7 @@ void vnodeProcessStreamRes(void *param, TAOS_RES *tres, TAOS_ROW row) {
int32_t
state
=
vnodeSetMeterState
(
pObj
,
TSDB_METER_STATE_INSERT
);
if
(
state
==
TSDB_METER_STATE_READY
)
{
vnodeInsertPoints
(
pObj
,
(
char
*
)
pMsg
,
contLen
,
TSDB_DATA_SOURCE_SHELL
,
NULL
,
pObj
->
sversion
,
&
numOfPoints
);
vnodeInsertPoints
(
pObj
,
(
char
*
)
pMsg
,
contLen
,
TSDB_DATA_SOURCE_SHELL
,
NULL
,
pObj
->
sversion
,
&
numOfPoints
,
taosGetTimestamp
(
vnodeList
[
pObj
->
vnode
].
cfg
.
precision
)
);
vnodeClearMeterState
(
pObj
,
TSDB_METER_STATE_INSERT
);
}
else
{
dError
(
"vid:%d sid:%d id:%s, failed to insert continuous query results, state:%d"
,
pObj
->
vnode
,
pObj
->
sid
,
...
...
src/system/src/vnodeSystem.c
浏览文件 @
335d42cf
...
...
@@ -41,9 +41,11 @@ int vnodeInitSystem() {
if
(
numOfThreads
<
1
)
numOfThreads
=
1
;
queryQhandle
=
taosInitScheduler
(
tsNumOfVnodesPerCore
*
tsNumOfCores
*
tsSessionsPerVnode
,
numOfThreads
,
"query"
);
// numOfThreads = (1.0 - tsRatioOfQueryThreads) * tsNumOfCores * tsNumOfThreadsPerCore / 2.0;
// if (numOfThreads < 1) numOfThreads = 1;
rpcQhandle
=
taosInitScheduler
(
tsNumOfVnodesPerCore
*
tsNumOfCores
*
tsSessionsPerVnode
,
1
,
"dnode"
);
numOfThreads
=
(
1
.
0
-
tsRatioOfQueryThreads
)
*
tsNumOfCores
*
tsNumOfThreadsPerCore
/
2
.
0
;
if
(
numOfThreads
<
1
)
numOfThreads
=
1
;
rpcQhandle
=
taosInitScheduler
(
tsNumOfVnodesPerCore
*
tsNumOfCores
*
tsSessionsPerVnode
,
numOfThreads
,
"dnode"
);
dmQhandle
=
taosInitScheduler
(
tsSessionsPerVnode
,
1
,
"mgmt"
);
vnodeTmrCtrl
=
taosTmrInit
(
tsSessionsPerVnode
+
1000
,
200
,
60000
,
"DND-vnode"
);
if
(
vnodeTmrCtrl
==
NULL
)
{
...
...
@@ -70,11 +72,3 @@ int vnodeInitSystem() {
return
0
;
}
void
vnodeInitQHandle
()
{
// int numOfThreads = (1.0 - tsRatioOfQueryThreads) * tsNumOfCores * tsNumOfThreadsPerCore / 2.0;
// if (numOfThreads < 1) numOfThreads = 1;
rpcQhandle
=
taosInitScheduler
(
tsNumOfVnodesPerCore
*
tsNumOfCores
*
tsSessionsPerVnode
,
1
,
"dnode"
);
dmQhandle
=
taosInitScheduler
(
tsSessionsPerVnode
,
1
,
"mgmt"
);
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录