Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
84ec8a7f
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看板
提交
84ec8a7f
编写于
1月 05, 2023
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'main' into fix/TD-21353
上级
0dd9e4bd
eb7b16a4
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
28 addition
and
17 deletion
+28
-17
source/dnode/mgmt/mgmt_vnode/src/vmWorker.c
source/dnode/mgmt/mgmt_vnode/src/vmWorker.c
+10
-1
source/dnode/mnode/impl/src/mndUser.c
source/dnode/mnode/impl/src/mndUser.c
+4
-4
source/dnode/vnode/src/vnd/vnodeSvr.c
source/dnode/vnode/src/vnd/vnodeSvr.c
+0
-1
source/libs/parser/src/parTranslater.c
source/libs/parser/src/parTranslater.c
+10
-6
source/libs/sync/src/syncMain.c
source/libs/sync/src/syncMain.c
+4
-5
未找到文件。
source/dnode/mgmt/mgmt_vnode/src/vmWorker.c
浏览文件 @
84ec8a7f
...
...
@@ -134,6 +134,13 @@ static void vmProcessSyncQueue(SQueueInfo *pInfo, STaosQall *qall, int32_t numOf
}
}
static
void
vmSendResponse
(
SRpcMsg
*
pMsg
)
{
if
(
pMsg
->
info
.
handle
)
{
SRpcMsg
rsp
=
{.
info
=
pMsg
->
info
,
.
code
=
terrno
};
rpcSendResponse
(
&
rsp
);
}
}
static
int32_t
vmPutMsgToQueue
(
SVnodeMgmt
*
pMgmt
,
SRpcMsg
*
pMsg
,
EQueueType
qtype
)
{
const
STraceId
*
trace
=
&
pMsg
->
info
.
traceId
;
if
(
pMsg
->
contLen
<
sizeof
(
SMsgHead
))
{
...
...
@@ -152,7 +159,9 @@ static int32_t vmPutMsgToQueue(SVnodeMgmt *pMgmt, SRpcMsg *pMsg, EQueueType qtyp
if
(
pVnode
==
NULL
)
{
dGError
(
"vgId:%d, msg:%p failed to put into vnode queue since %s, type:%s qtype:%d contLen:%d"
,
pHead
->
vgId
,
pMsg
,
terrstr
(),
TMSG_INFO
(
pMsg
->
msgType
),
qtype
,
pHead
->
contLen
);
return
terrno
!=
0
?
terrno
:
-
1
;
terrno
=
(
terrno
!=
0
)
?
terrno
:
-
1
;
vmSendResponse
(
pMsg
);
return
terrno
;
}
switch
(
qtype
)
{
...
...
source/dnode/mnode/impl/src/mndUser.c
浏览文件 @
84ec8a7f
...
...
@@ -884,9 +884,9 @@ static int32_t mndRetrievePrivileges(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock
db
=
taosHashIterate
(
pUser
->
writeDbs
,
NULL
);
while
(
db
!=
NULL
)
{
cols
=
0
;
SColumnInfoData
*
pColInfo
=
taosArrayGet
(
pBlock
->
pDataBlock
,
cols
++
);
char
userName
[
TSDB_USER_LEN
+
VARSTR_HEADER_SIZE
]
=
{
0
};
char
userName
[
TSDB_USER_LEN
+
VARSTR_HEADER_SIZE
]
=
{
0
};
STR_WITH_MAXSIZE_TO_VARSTR
(
userName
,
pUser
->
user
,
pShow
->
pMeta
->
pSchemas
[
cols
].
bytes
);
SColumnInfoData
*
pColInfo
=
taosArrayGet
(
pBlock
->
pDataBlock
,
cols
++
);
colDataAppend
(
pColInfo
,
numOfRows
,
(
const
char
*
)
userName
,
false
);
char
privilege
[
20
]
=
{
0
};
...
...
@@ -909,9 +909,9 @@ static int32_t mndRetrievePrivileges(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock
char
*
topic
=
taosHashIterate
(
pUser
->
topics
,
NULL
);
while
(
topic
!=
NULL
)
{
cols
=
0
;
SColumnInfoData
*
pColInfo
=
taosArrayGet
(
pBlock
->
pDataBlock
,
cols
++
);
char
userName
[
TSDB_USER_LEN
+
VARSTR_HEADER_SIZE
]
=
{
0
};
char
userName
[
TSDB_USER_LEN
+
VARSTR_HEADER_SIZE
]
=
{
0
};
STR_WITH_MAXSIZE_TO_VARSTR
(
userName
,
pUser
->
user
,
pShow
->
pMeta
->
pSchemas
[
cols
].
bytes
);
SColumnInfoData
*
pColInfo
=
taosArrayGet
(
pBlock
->
pDataBlock
,
cols
++
);
colDataAppend
(
pColInfo
,
numOfRows
,
(
const
char
*
)
userName
,
false
);
char
privilege
[
20
]
=
{
0
};
...
...
source/dnode/vnode/src/vnd/vnodeSvr.c
浏览文件 @
84ec8a7f
...
...
@@ -182,7 +182,6 @@ int32_t vnodeProcessWriteMsg(SVnode *pVnode, SRpcMsg *pMsg, int64_t version, SRp
vError
(
"vgId:%d, duplicate write request. version: %"
PRId64
", applied: %"
PRId64
""
,
TD_VID
(
pVnode
),
version
,
pVnode
->
state
.
applied
);
terrno
=
TSDB_CODE_VND_DUP_REQUEST
;
pRsp
->
info
.
handle
=
NULL
;
return
-
1
;
}
...
...
source/libs/parser/src/parTranslater.c
浏览文件 @
84ec8a7f
...
...
@@ -5527,7 +5527,8 @@ static void getStreamQueryFirstProjectAliasName(SHashObj* pUserAliasSet, char* a
return
;
}
static
int32_t
addWstartTsToCreateStreamQueryImpl
(
SSelectStmt
*
pSelect
,
SHashObj
*
pUserAliasSet
)
{
static
int32_t
addWstartTsToCreateStreamQueryImpl
(
STranslateContext
*
pCxt
,
SSelectStmt
*
pSelect
,
SHashObj
*
pUserAliasSet
)
{
SNode
*
pProj
=
nodesListGetNode
(
pSelect
->
pProjectionList
,
0
);
if
(
NULL
==
pSelect
->
pWindow
||
(
QUERY_NODE_FUNCTION
==
nodeType
(
pProj
)
&&
0
==
strcmp
(
"_wstart"
,
((
SFunctionNode
*
)
pProj
)
->
functionName
)))
{
...
...
@@ -5539,7 +5540,10 @@ static int32_t addWstartTsToCreateStreamQueryImpl(SSelectStmt* pSelect, SHashObj
}
strcpy
(
pFunc
->
functionName
,
"_wstart"
);
getStreamQueryFirstProjectAliasName
(
pUserAliasSet
,
pFunc
->
node
.
aliasName
,
sizeof
(
pFunc
->
node
.
aliasName
));
int32_t
code
=
nodesListPushFront
(
pSelect
->
pProjectionList
,
(
SNode
*
)
pFunc
);
int32_t
code
=
getFuncInfo
(
pCxt
,
pFunc
);
if
(
TSDB_CODE_SUCCESS
==
code
)
{
code
=
nodesListPushFront
(
pSelect
->
pProjectionList
,
(
SNode
*
)
pFunc
);
}
if
(
TSDB_CODE_SUCCESS
!=
code
)
{
nodesDestroyNode
((
SNode
*
)
pFunc
);
}
...
...
@@ -5551,7 +5555,7 @@ static int32_t addWstartTsToCreateStreamQuery(STranslateContext* pCxt, SNode* pS
SHashObj
*
pUserAliasSet
=
NULL
;
int32_t
code
=
checkProjectAlias
(
pCxt
,
pSelect
->
pProjectionList
,
&
pUserAliasSet
);
if
(
TSDB_CODE_SUCCESS
==
code
)
{
code
=
addWstartTsToCreateStreamQueryImpl
(
pSelect
,
pUserAliasSet
);
code
=
addWstartTsToCreateStreamQueryImpl
(
p
Cxt
,
p
Select
,
pUserAliasSet
);
}
taosHashCleanup
(
pUserAliasSet
);
return
code
;
...
...
@@ -5664,12 +5668,12 @@ static int32_t checkStreamQuery(STranslateContext* pCxt, SCreateStreamStmt* pStm
static
int32_t
buildCreateStreamQuery
(
STranslateContext
*
pCxt
,
SCreateStreamStmt
*
pStmt
,
SCMCreateStreamReq
*
pReq
)
{
pCxt
->
createStream
=
true
;
int32_t
code
=
add
WstartTsToCreateStreamQuery
(
pCxt
,
pStmt
->
pQuery
);
int32_t
code
=
add
SubtableInfoToCreateStreamQuery
(
pCxt
,
pStmt
);
if
(
TSDB_CODE_SUCCESS
==
code
)
{
code
=
addSubtableInfoToCreateStreamQuery
(
pCxt
,
pStmt
);
code
=
translateQuery
(
pCxt
,
pStmt
->
pQuery
);
}
if
(
TSDB_CODE_SUCCESS
==
code
)
{
code
=
translate
Query
(
pCxt
,
pStmt
->
pQuery
);
code
=
addWstartTsToCreateStream
Query
(
pCxt
,
pStmt
->
pQuery
);
}
if
(
TSDB_CODE_SUCCESS
==
code
)
{
code
=
checkStreamQuery
(
pCxt
,
pStmt
);
...
...
source/libs/sync/src/syncMain.c
浏览文件 @
84ec8a7f
...
...
@@ -1252,6 +1252,9 @@ void syncNodePreClose(SSyncNode* pSyncNode) {
// stop heartbeat timer
syncNodeStopHeartbeatTimer
(
pSyncNode
);
// clean rsp
syncRespCleanRsp
(
pSyncNode
->
pSyncRespMgr
);
}
void
syncHbTimerDataFree
(
SSyncHbTimerData
*
pData
)
{
taosMemoryFree
(
pData
);
}
...
...
@@ -2667,16 +2670,12 @@ int32_t syncNodeOnClientRequest(SSyncNode* ths, SRpcMsg* pMsg, SyncIndex* pRetIn
}
int32_t
code
=
syncNodeAppend
(
ths
,
pEntry
);
if
(
code
<
0
)
{
sNError
(
ths
,
"failed to append blocking msg"
);
}
return
code
;
}
else
{
syncEntryDestroy
(
pEntry
);
pEntry
=
NULL
;
return
-
1
;
}
return
-
1
;
}
int32_t
syncNodeOnClientRequestOld
(
SSyncNode
*
ths
,
SRpcMsg
*
pMsg
,
SyncIndex
*
pRetIndex
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录