Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
c84f9f86
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看板
提交
c84f9f86
编写于
11月 23, 2022
作者:
dengyihao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add debug info
上级
963d56cf
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
30 addition
and
26 deletion
+30
-26
source/libs/scheduler/src/schTask.c
source/libs/scheduler/src/schTask.c
+16
-14
source/libs/transport/src/transCli.c
source/libs/transport/src/transCli.c
+5
-3
source/libs/transport/src/transSvr.c
source/libs/transport/src/transSvr.c
+9
-9
未找到文件。
source/libs/scheduler/src/schTask.c
浏览文件 @
c84f9f86
...
...
@@ -346,7 +346,7 @@ int32_t schChkUpdateRedirectCtx(SSchJob *pJob, SSchTask *pTask, SEpSet *pEpSet)
pCtx
->
inRedirect
=
true
;
pCtx
->
periodMs
=
tsRedirectPeriod
;
pCtx
->
startTs
=
taosGetTimestampMs
();
if
(
SCH_IS_DATA_BIND_TASK
(
pTask
))
{
if
(
pEpSet
)
{
pCtx
->
roundTotal
=
pEpSet
->
numOfEps
;
...
...
@@ -360,7 +360,7 @@ int32_t schChkUpdateRedirectCtx(SSchJob *pJob, SSchTask *pTask, SEpSet *pEpSet)
goto
_return
;
}
pCtx
->
totalTimes
++
;
if
(
SCH_IS_DATA_BIND_TASK
(
pTask
)
&&
pEpSet
)
{
...
...
@@ -378,8 +378,8 @@ int32_t schChkUpdateRedirectCtx(SSchJob *pJob, SSchTask *pTask, SEpSet *pEpSet)
int64_t
nowTs
=
taosGetTimestampMs
();
int64_t
lastTime
=
nowTs
-
pCtx
->
startTs
;
if
(
lastTime
>
tsMaxRetryWaitTime
)
{
SCH_TASK_DLOG
(
"task no more redirect retry since timeout, now:%"
PRId64
", start:%"
PRId64
", max:%d, total:%d"
,
nowTs
,
pCtx
->
startTs
,
tsMaxRetryWaitTime
,
pCtx
->
totalTimes
);
SCH_TASK_DLOG
(
"task no more redirect retry since timeout, now:%"
PRId64
", start:%"
PRId64
", max:%d, total:%d"
,
nowTs
,
pCtx
->
startTs
,
tsMaxRetryWaitTime
,
pCtx
->
totalTimes
);
SCH_ERR_RET
(
TSDB_CODE_TIMEOUT_ERROR
);
}
...
...
@@ -398,8 +398,9 @@ int32_t schChkUpdateRedirectCtx(SSchJob *pJob, SSchTask *pTask, SEpSet *pEpSet)
_return:
SCH_TASK_DLOG
(
"task start %d/%d/%d redirect retry, delayExec:%d"
,
pCtx
->
roundTimes
,
pCtx
->
roundTotal
,
pCtx
->
totalTimes
,
pTask
->
delayExecMs
);
SCH_TASK_DLOG
(
"task start %d/%d/%d redirect retry, delayExec:%d"
,
pCtx
->
roundTimes
,
pCtx
->
roundTotal
,
pCtx
->
totalTimes
,
pTask
->
delayExecMs
);
return
TSDB_CODE_SUCCESS
;
}
...
...
@@ -415,7 +416,7 @@ int32_t schDoTaskRedirect(SSchJob *pJob, SSchTask *pTask, SDataBuf *pData, int32
SCH_ERR_JRET
(
schChkUpdateRedirectCtx
(
pJob
,
pTask
,
pData
?
pData
->
pEpSet
:
NULL
));
pTask
->
waitRetry
=
true
;
schDropTaskOnExecNode
(
pJob
,
pTask
);
taosHashClear
(
pTask
->
execNodes
);
schRemoveTaskFromExecList
(
pJob
,
pTask
);
...
...
@@ -435,8 +436,9 @@ int32_t schDoTaskRedirect(SSchJob *pJob, SSchTask *pTask, SDataBuf *pData, int32
SCH_TASK_DLOG
(
"switch task target node %d epset to %d/%d"
,
addr
->
nodeId
,
addr
->
epSet
.
inUse
,
addr
->
epSet
.
numOfEps
);
}
else
{
SQueryNodeAddr
*
addr
=
taosArrayGet
(
pTask
->
candidateAddrs
,
pTask
->
candidateIdx
);
SEp
*
pEp
=
&
addr
->
epSet
.
eps
[
addr
->
epSet
.
inUse
];
SCH_TASK_DLOG
(
"task retry node %d current ep, idx:%d/%d,%s:%d"
,
addr
->
nodeId
,
addr
->
epSet
.
inUse
,
addr
->
epSet
.
numOfEps
,
pEp
->
fqdn
,
pEp
->
port
);
SEp
*
pEp
=
&
addr
->
epSet
.
eps
[
addr
->
epSet
.
inUse
];
SCH_TASK_DLOG
(
"task retry node %d current ep, idx:%d/%d,%s:%d"
,
addr
->
nodeId
,
addr
->
epSet
.
inUse
,
addr
->
epSet
.
numOfEps
,
pEp
->
fqdn
,
pEp
->
port
);
}
if
(
SCH_TASK_NEED_FLOW_CTRL
(
pJob
,
pTask
))
{
...
...
@@ -1146,7 +1148,7 @@ void schHandleTimerEvent(void *param, void *tmrId) {
SSchTask
*
pTask
=
NULL
;
SSchJob
*
pJob
=
NULL
;
int32_t
code
=
0
;
if
(
schProcessOnCbBegin
(
&
pJob
,
&
pTask
,
pTimerParam
->
queryId
,
pTimerParam
->
rId
,
pTimerParam
->
taskId
))
{
return
;
}
...
...
@@ -1160,15 +1162,15 @@ int32_t schDelayLaunchTask(SSchJob *pJob, SSchTask *pTask) {
if
(
pTask
->
delayExecMs
>
0
)
{
SSchTimerParam
*
param
=
taosMemoryMalloc
(
sizeof
(
SSchTimerParam
));
if
(
NULL
==
param
)
{
SCH_TASK_ELOG
(
"taosMemoryMalloc %d failed"
,
sizeof
(
SSchTimerParam
));
SCH_TASK_ELOG
(
"taosMemoryMalloc %d failed"
,
(
int
)
sizeof
(
SSchTimerParam
));
SCH_ERR_RET
(
TSDB_CODE_QRY_OUT_OF_MEMORY
);
}
param
->
rId
=
pJob
->
refId
;
param
->
queryId
=
pJob
->
queryId
;
param
->
taskId
=
pTask
->
taskId
;
if
(
NULL
==
pTask
->
delayTimer
)
{
if
(
NULL
==
pTask
->
delayTimer
)
{
pTask
->
delayTimer
=
taosTmrStart
(
schHandleTimerEvent
,
pTask
->
delayExecMs
,
(
void
*
)
param
,
schMgmt
.
timer
);
if
(
NULL
==
pTask
->
delayTimer
)
{
SCH_TASK_ELOG
(
"start delay timer failed, handle:%p"
,
schMgmt
.
timer
);
...
...
@@ -1178,7 +1180,7 @@ int32_t schDelayLaunchTask(SSchJob *pJob, SSchTask *pTask) {
return
TSDB_CODE_SUCCESS
;
}
taosTmrReset
(
schHandleTimerEvent
,
pTask
->
delayExecMs
,
(
void
*
)
param
,
schMgmt
.
timer
,
&
pTask
->
delayTimer
);
taosTmrReset
(
schHandleTimerEvent
,
pTask
->
delayExecMs
,
(
void
*
)
param
,
schMgmt
.
timer
,
&
pTask
->
delayTimer
);
return
TSDB_CODE_SUCCESS
;
}
...
...
source/libs/transport/src/transCli.c
浏览文件 @
c84f9f86
...
...
@@ -1035,12 +1035,14 @@ void cliHandleReq(SCliMsg* pMsg, SCliThrd* pThrd) {
addr
.
sin_family
=
AF_INET
;
addr
.
sin_addr
.
s_addr
=
cliGetIpFromFqdnCache
(
pThrd
->
fqdn2ipCache
,
conn
->
ip
);
addr
.
sin_port
=
(
uint16_t
)
htons
((
uint16_t
)
conn
->
port
);
tTrace
(
"%s conn %p try to connect to %s:%d"
,
pTransInst
->
label
,
conn
,
conn
->
ip
,
conn
->
port
);
STraceId
*
trace
=
&
(
pMsg
->
msg
.
info
.
traceId
);
tGTrace
(
"%s conn %p try to connect to %s:%d"
,
pTransInst
->
label
,
conn
,
conn
->
ip
,
conn
->
port
);
int
ret
=
uv_tcp_connect
(
&
conn
->
connReq
,
(
uv_tcp_t
*
)(
conn
->
stream
),
(
const
struct
sockaddr
*
)
&
addr
,
cliConnCb
);
if
(
ret
!=
0
)
{
tTrace
(
"%s conn %p failed to connect to %s:%d, reason:%s"
,
pTransInst
->
label
,
conn
,
conn
->
ip
,
conn
->
port
,
uv_err_name
(
ret
));
t
G
Trace
(
"%s conn %p failed to connect to %s:%d, reason:%s"
,
pTransInst
->
label
,
conn
,
conn
->
ip
,
conn
->
port
,
uv_err_name
(
ret
));
uv_timer_stop
(
conn
->
timer
);
conn
->
timer
->
data
=
NULL
;
...
...
source/libs/transport/src/transSvr.c
浏览文件 @
c84f9f86
...
...
@@ -1233,17 +1233,17 @@ int transReleaseSrvHandle(void* handle) {
m
->
msg
=
tmsg
;
m
->
type
=
Release
;
t
Trace
(
"%s conn %p start to release"
,
transLabel
(
pThrd
->
pTransInst
),
exh
->
handle
);
t
Debug
(
"%s conn %p start to release"
,
transLabel
(
pThrd
->
pTransInst
),
exh
->
handle
);
transAsyncSend
(
pThrd
->
asyncPool
,
&
m
->
q
);
transReleaseExHandle
(
transGetRefMgt
(),
refId
);
return
0
;
_return1:
t
Trace
(
"handle %p failed to send to release handle"
,
exh
);
t
Debug
(
"handle %p failed to send to release handle"
,
exh
);
transReleaseExHandle
(
transGetRefMgt
(),
refId
);
return
-
1
;
_return2:
t
Trace
(
"handle %p failed to send to release handle"
,
exh
);
t
Debug
(
"handle %p failed to send to release handle"
,
exh
);
return
-
1
;
}
int
transSendResponse
(
const
STransMsg
*
msg
)
{
...
...
@@ -1268,19 +1268,19 @@ int transSendResponse(const STransMsg* msg) {
m
->
type
=
Normal
;
STraceId
*
trace
=
(
STraceId
*
)
&
msg
->
info
.
traceId
;
tG
Trace
(
"conn %p start to send resp (1/2)"
,
exh
->
handle
);
tG
Debug
(
"conn %p start to send resp (1/2)"
,
exh
->
handle
);
transAsyncSend
(
pThrd
->
asyncPool
,
&
m
->
q
);
transReleaseExHandle
(
transGetRefMgt
(),
refId
);
return
0
;
_return1:
t
Trace
(
"handle %p failed to send resp"
,
exh
);
t
Debug
(
"handle %p failed to send resp"
,
exh
);
rpcFreeCont
(
msg
->
pCont
);
transReleaseExHandle
(
transGetRefMgt
(),
refId
);
return
-
1
;
_return2:
t
Trace
(
"handle %p failed to send resp"
,
exh
);
t
Debug
(
"handle %p failed to send resp"
,
exh
);
rpcFreeCont
(
msg
->
pCont
);
return
-
1
;
}
...
...
@@ -1302,19 +1302,19 @@ int transRegisterMsg(const STransMsg* msg) {
m
->
type
=
Register
;
STrans
*
pTransInst
=
pThrd
->
pTransInst
;
t
Trace
(
"%s conn %p start to register brokenlink callback"
,
transLabel
(
pTransInst
),
exh
->
handle
);
t
Debug
(
"%s conn %p start to register brokenlink callback"
,
transLabel
(
pTransInst
),
exh
->
handle
);
transAsyncSend
(
pThrd
->
asyncPool
,
&
m
->
q
);
transReleaseExHandle
(
transGetRefMgt
(),
refId
);
return
0
;
_return1:
t
Trace
(
"handle %p failed to register brokenlink"
,
exh
);
t
Debug
(
"handle %p failed to register brokenlink"
,
exh
);
rpcFreeCont
(
msg
->
pCont
);
transReleaseExHandle
(
transGetRefMgt
(),
refId
);
return
-
1
;
_return2:
t
Trace
(
"handle %p failed to register brokenlink"
,
exh
);
t
Debug
(
"handle %p failed to register brokenlink"
,
exh
);
rpcFreeCont
(
msg
->
pCont
);
return
-
1
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录