Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
3cd5a350
T
TDengine
项目概览
taosdata
/
TDengine
大约 1 年 前同步成功
通知
1184
Star
22015
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
3cd5a350
编写于
7月 08, 2022
作者:
L
Liu Jicong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor(stream): internal refactor
上级
866e4c4b
变更
19
展开全部
显示空白变更内容
内联
并排
Showing
19 changed file
with
657 addition
and
415 deletion
+657
-415
include/common/tcommon.h
include/common/tcommon.h
+4
-2
include/common/tdatablock.h
include/common/tdatablock.h
+1
-1
include/libs/executor/executor.h
include/libs/executor/executor.h
+7
-1
include/libs/wal/wal.h
include/libs/wal/wal.h
+1
-0
source/common/src/tdatablock.c
source/common/src/tdatablock.c
+1
-1
source/dnode/mnode/impl/src/mndSubscribe.c
source/dnode/mnode/impl/src/mndSubscribe.c
+5
-1
source/dnode/vnode/inc/vnode.h
source/dnode/vnode/inc/vnode.h
+3
-0
source/dnode/vnode/src/inc/tq.h
source/dnode/vnode/src/inc/tq.h
+1
-0
source/dnode/vnode/src/tq/tq.c
source/dnode/vnode/src/tq/tq.c
+16
-1
source/dnode/vnode/src/tq/tqExec.c
source/dnode/vnode/src/tq/tqExec.c
+46
-6
source/dnode/vnode/src/tq/tqRead.c
source/dnode/vnode/src/tq/tqRead.c
+16
-8
source/libs/executor/inc/executorimpl.h
source/libs/executor/inc/executorimpl.h
+397
-365
source/libs/executor/src/executor.c
source/libs/executor/src/executor.c
+3
-3
source/libs/executor/src/executorMain.c
source/libs/executor/src/executorMain.c
+38
-1
source/libs/executor/src/executorimpl.c
source/libs/executor/src/executorimpl.c
+4
-1
source/libs/executor/src/scanoperator.c
source/libs/executor/src/scanoperator.c
+111
-6
source/libs/wal/src/walRead.c
source/libs/wal/src/walRead.c
+1
-17
tests/script/jenkins/basic.txt
tests/script/jenkins/basic.txt
+1
-1
tests/system-test/failed.txt
tests/system-test/failed.txt
+1
-0
未找到文件。
include/common/tcommon.h
浏览文件 @
3cd5a350
...
@@ -55,7 +55,8 @@ enum {
...
@@ -55,7 +55,8 @@ enum {
enum
{
enum
{
STREAM_INPUT__DATA_SUBMIT
=
1
,
STREAM_INPUT__DATA_SUBMIT
=
1
,
STREAM_INPUT__DATA_BLOCK
,
STREAM_INPUT__DATA_BLOCK
,
STREAM_INPUT__DATA_SCAN
,
STREAM_INPUT__TABLE_SCAN
,
STREAM_INPUT__TQ_SCAN
,
STREAM_INPUT__DATA_RETRIEVE
,
STREAM_INPUT__DATA_RETRIEVE
,
STREAM_INPUT__TRIGGER
,
STREAM_INPUT__TRIGGER
,
STREAM_INPUT__CHECKPOINT
,
STREAM_INPUT__CHECKPOINT
,
...
@@ -125,6 +126,7 @@ enum {
...
@@ -125,6 +126,7 @@ enum {
typedef
struct
{
typedef
struct
{
int8_t
fetchType
;
int8_t
fetchType
;
STqOffsetVal
offset
;
union
{
union
{
SSDataBlock
data
;
SSDataBlock
data
;
void
*
meta
;
void
*
meta
;
...
...
include/common/tdatablock.h
浏览文件 @
3cd5a350
...
@@ -231,7 +231,7 @@ SSDataBlock* createDataBlock();
...
@@ -231,7 +231,7 @@ SSDataBlock* createDataBlock();
int32_t
blockDataAppendColInfo
(
SSDataBlock
*
pBlock
,
SColumnInfoData
*
pColInfoData
);
int32_t
blockDataAppendColInfo
(
SSDataBlock
*
pBlock
,
SColumnInfoData
*
pColInfoData
);
SColumnInfoData
createColumnInfoData
(
int16_t
type
,
int32_t
bytes
,
int16_t
colId
);
SColumnInfoData
createColumnInfoData
(
int16_t
type
,
int32_t
bytes
,
int16_t
colId
);
SColumnInfoData
*
bdGetColumnInfoData
(
SSDataBlock
*
pBlock
,
int32_t
index
);
SColumnInfoData
*
bdGetColumnInfoData
(
const
SSDataBlock
*
pBlock
,
int32_t
index
);
void
blockEncode
(
const
SSDataBlock
*
pBlock
,
char
*
data
,
int32_t
*
dataLen
,
int32_t
numOfCols
,
int8_t
needCompress
);
void
blockEncode
(
const
SSDataBlock
*
pBlock
,
char
*
data
,
int32_t
*
dataLen
,
int32_t
numOfCols
,
int8_t
needCompress
);
const
char
*
blockDecode
(
SSDataBlock
*
pBlock
,
int32_t
numOfCols
,
int32_t
numOfRows
,
const
char
*
pData
);
const
char
*
blockDecode
(
SSDataBlock
*
pBlock
,
int32_t
numOfCols
,
int32_t
numOfRows
,
const
char
*
pData
);
...
...
include/libs/executor/executor.h
浏览文件 @
3cd5a350
...
@@ -174,7 +174,13 @@ int32_t qDeserializeTaskStatus(qTaskInfo_t tinfo, const char* pInput, int32_t le
...
@@ -174,7 +174,13 @@ int32_t qDeserializeTaskStatus(qTaskInfo_t tinfo, const char* pInput, int32_t le
*/
*/
int32_t
qGetStreamScanStatus
(
qTaskInfo_t
tinfo
,
uint64_t
*
uid
,
int64_t
*
ts
);
int32_t
qGetStreamScanStatus
(
qTaskInfo_t
tinfo
,
uint64_t
*
uid
,
int64_t
*
ts
);
int32_t
qStreamPrepareScan
(
qTaskInfo_t
tinfo
,
uint64_t
uid
,
int64_t
ts
);
int32_t
qStreamPrepareTsdbScan
(
qTaskInfo_t
tinfo
,
uint64_t
uid
,
int64_t
ts
);
int32_t
qStreamPrepareScan1
(
qTaskInfo_t
tinfo
,
const
STqOffsetVal
*
pOffset
);
int32_t
qStreamExtractOffset
(
qTaskInfo_t
tinfo
,
STqOffsetVal
*
pOffset
);
void
*
qStreamExtractMetaMsg
(
qTaskInfo_t
tinfo
);
void
*
qExtractReaderFromStreamScanner
(
void
*
scanner
);
void
*
qExtractReaderFromStreamScanner
(
void
*
scanner
);
int32_t
qExtractStreamScanner
(
qTaskInfo_t
tinfo
,
void
**
scanner
);
int32_t
qExtractStreamScanner
(
qTaskInfo_t
tinfo
,
void
**
scanner
);
...
...
include/libs/wal/wal.h
浏览文件 @
3cd5a350
...
@@ -194,6 +194,7 @@ int32_t walRestoreFromSnapshot(SWal *, int64_t ver);
...
@@ -194,6 +194,7 @@ int32_t walRestoreFromSnapshot(SWal *, int64_t ver);
SWalReader
*
walOpenReader
(
SWal
*
,
SWalFilterCond
*
pCond
);
SWalReader
*
walOpenReader
(
SWal
*
,
SWalFilterCond
*
pCond
);
void
walCloseReader
(
SWalReader
*
pRead
);
void
walCloseReader
(
SWalReader
*
pRead
);
int32_t
walReadVer
(
SWalReader
*
pRead
,
int64_t
ver
);
int32_t
walReadVer
(
SWalReader
*
pRead
,
int64_t
ver
);
int32_t
walReadSeekVer
(
SWalReader
*
pRead
,
int64_t
ver
);
int32_t
walNextValidMsg
(
SWalReader
*
pRead
);
int32_t
walNextValidMsg
(
SWalReader
*
pRead
);
// only for tq usage
// only for tq usage
...
...
source/common/src/tdatablock.c
浏览文件 @
3cd5a350
...
@@ -1356,7 +1356,7 @@ SColumnInfoData createColumnInfoData(int16_t type, int32_t bytes, int16_t colId)
...
@@ -1356,7 +1356,7 @@ SColumnInfoData createColumnInfoData(int16_t type, int32_t bytes, int16_t colId)
return
col
;
return
col
;
}
}
SColumnInfoData
*
bdGetColumnInfoData
(
SSDataBlock
*
pBlock
,
int32_t
index
)
{
SColumnInfoData
*
bdGetColumnInfoData
(
const
SSDataBlock
*
pBlock
,
int32_t
index
)
{
ASSERT
(
pBlock
!=
NULL
);
ASSERT
(
pBlock
!=
NULL
);
if
(
index
>=
taosArrayGetSize
(
pBlock
->
pDataBlock
))
{
if
(
index
>=
taosArrayGetSize
(
pBlock
->
pDataBlock
))
{
return
NULL
;
return
NULL
;
...
...
source/dnode/mnode/impl/src/mndSubscribe.c
浏览文件 @
3cd5a350
...
@@ -546,7 +546,11 @@ static int32_t mndProcessRebalanceReq(SRpcMsg *pMsg) {
...
@@ -546,7 +546,11 @@ static int32_t mndProcessRebalanceReq(SRpcMsg *pMsg) {
char
cgroup
[
TSDB_CGROUP_LEN
];
char
cgroup
[
TSDB_CGROUP_LEN
];
mndSplitSubscribeKey
(
pRebInfo
->
key
,
topic
,
cgroup
,
true
);
mndSplitSubscribeKey
(
pRebInfo
->
key
,
topic
,
cgroup
,
true
);
SMqTopicObj
*
pTopic
=
mndAcquireTopic
(
pMnode
,
topic
);
SMqTopicObj
*
pTopic
=
mndAcquireTopic
(
pMnode
,
topic
);
ASSERT
(
pTopic
);
/*ASSERT(pTopic);*/
if
(
pTopic
==
NULL
)
{
mError
(
"rebalance %s failed since topic %s was dropped, abort"
,
pRebInfo
->
key
,
topic
);
continue
;
}
taosRLockLatch
(
&
pTopic
->
lock
);
taosRLockLatch
(
&
pTopic
->
lock
);
rebOutput
.
pSub
=
mndCreateSub
(
pMnode
,
pTopic
,
pRebInfo
->
key
);
rebOutput
.
pSub
=
mndCreateSub
(
pMnode
,
pTopic
,
pRebInfo
->
key
);
...
...
source/dnode/vnode/inc/vnode.h
浏览文件 @
3cd5a350
...
@@ -173,6 +173,9 @@ int32_t tqReaderSetTbUidList(STqReader *pReader, const SArray *tbUidList);
...
@@ -173,6 +173,9 @@ int32_t tqReaderSetTbUidList(STqReader *pReader, const SArray *tbUidList);
int32_t
tqReaderAddTbUidList
(
STqReader
*
pReader
,
const
SArray
*
tbUidList
);
int32_t
tqReaderAddTbUidList
(
STqReader
*
pReader
,
const
SArray
*
tbUidList
);
int32_t
tqReaderRemoveTbUidList
(
STqReader
*
pReader
,
const
SArray
*
tbUidList
);
int32_t
tqReaderRemoveTbUidList
(
STqReader
*
pReader
,
const
SArray
*
tbUidList
);
int32_t
tqSeekVer
(
STqReader
*
pReader
,
int64_t
ver
);
int32_t
tqNextBlock
(
STqReader
*
pReader
,
SFetchRet
*
ret
);
int32_t
tqReaderSetDataMsg
(
STqReader
*
pReader
,
SSubmitReq
*
pMsg
,
int64_t
ver
);
int32_t
tqReaderSetDataMsg
(
STqReader
*
pReader
,
SSubmitReq
*
pMsg
,
int64_t
ver
);
bool
tqNextDataBlock
(
STqReader
*
pReader
);
bool
tqNextDataBlock
(
STqReader
*
pReader
);
bool
tqNextDataBlockFilterOut
(
STqReader
*
pReader
,
SHashObj
*
filterOutUids
);
bool
tqNextDataBlockFilterOut
(
STqReader
*
pReader
,
SHashObj
*
filterOutUids
);
...
...
source/dnode/vnode/src/inc/tq.h
浏览文件 @
3cd5a350
...
@@ -129,6 +129,7 @@ typedef struct {
...
@@ -129,6 +129,7 @@ typedef struct {
static
STqMgmt
tqMgmt
=
{
0
};
static
STqMgmt
tqMgmt
=
{
0
};
// tqRead
// tqRead
int64_t
tqScanLog
(
STQ
*
pTq
,
const
STqExecHandle
*
pExec
,
SMqDataRsp
*
pRsp
,
STqOffsetVal
*
offset
);
int64_t
tqFetchLog
(
STQ
*
pTq
,
STqHandle
*
pHandle
,
int64_t
*
fetchOffset
,
SWalCkHead
**
pHeadWithCkSum
);
int64_t
tqFetchLog
(
STQ
*
pTq
,
STqHandle
*
pHandle
,
int64_t
*
fetchOffset
,
SWalCkHead
**
pHeadWithCkSum
);
// tqExec
// tqExec
...
...
source/dnode/vnode/src/tq/tq.c
浏览文件 @
3cd5a350
...
@@ -307,7 +307,22 @@ int32_t tqProcessPollReq(STQ* pTq, SRpcMsg* pMsg, int32_t workerId) {
...
@@ -307,7 +307,22 @@ int32_t tqProcessPollReq(STQ* pTq, SRpcMsg* pMsg, int32_t workerId) {
SMqDataRsp
dataRsp
=
{
0
};
SMqDataRsp
dataRsp
=
{
0
};
tqInitDataRsp
(
&
dataRsp
,
pReq
,
pHandle
->
execHandle
.
subType
);
tqInitDataRsp
(
&
dataRsp
,
pReq
,
pHandle
->
execHandle
.
subType
);
if
(
fetchOffsetNew
.
type
==
TMQ_OFFSET__LOG
)
{
if
(
!
pHandle
->
fetchMeta
&&
fetchOffsetNew
.
type
==
TMQ_OFFSET__LOG
)
{
if
(
tqScanLog
(
pTq
,
&
pHandle
->
execHandle
,
&
dataRsp
,
&
fetchOffsetNew
)
<
0
)
{
ASSERT
(
0
);
code
=
-
1
;
goto
OVER
;
}
if
(
dataRsp
.
blockNum
==
0
)
{
// add to async task
}
if
(
tqSendDataRsp
(
pTq
,
pMsg
,
pReq
,
&
dataRsp
)
<
0
)
{
code
=
-
1
;
}
goto
OVER
;
}
if
(
pHandle
->
fetchMeta
&&
fetchOffsetNew
.
type
==
TMQ_OFFSET__LOG
)
{
int64_t
fetchVer
=
fetchOffsetNew
.
version
+
1
;
int64_t
fetchVer
=
fetchOffsetNew
.
version
+
1
;
SWalCkHead
*
pCkHead
=
taosMemoryMalloc
(
sizeof
(
SWalCkHead
)
+
2048
);
SWalCkHead
*
pCkHead
=
taosMemoryMalloc
(
sizeof
(
SWalCkHead
)
+
2048
);
if
(
pCkHead
==
NULL
)
{
if
(
pCkHead
==
NULL
)
{
...
...
source/dnode/vnode/src/tq/tqExec.c
浏览文件 @
3cd5a350
...
@@ -46,7 +46,7 @@ static int32_t tqAddBlockSchemaToRsp(const STqExecHandle* pExec, int32_t workerI
...
@@ -46,7 +46,7 @@ static int32_t tqAddBlockSchemaToRsp(const STqExecHandle* pExec, int32_t workerI
return
0
;
return
0
;
}
}
static
int32_t
tqAddTbNameToRsp
(
const
STQ
*
pTq
,
int64_t
uid
,
SMqDataRsp
*
pRsp
,
int32_t
workerId
)
{
static
int32_t
tqAddTbNameToRsp
(
const
STQ
*
pTq
,
int64_t
uid
,
SMqDataRsp
*
pRsp
)
{
SMetaReader
mr
=
{
0
};
SMetaReader
mr
=
{
0
};
metaReaderInit
(
&
mr
,
pTq
->
pVnode
->
pMeta
,
0
);
metaReaderInit
(
&
mr
,
pTq
->
pVnode
->
pMeta
,
0
);
if
(
metaGetTableEntryByUid
(
&
mr
,
uid
)
<
0
)
{
if
(
metaGetTableEntryByUid
(
&
mr
,
uid
)
<
0
)
{
...
@@ -59,6 +59,46 @@ static int32_t tqAddTbNameToRsp(const STQ* pTq, int64_t uid, SMqDataRsp* pRsp, i
...
@@ -59,6 +59,46 @@ static int32_t tqAddTbNameToRsp(const STQ* pTq, int64_t uid, SMqDataRsp* pRsp, i
return
0
;
return
0
;
}
}
int64_t
tqScanLog
(
STQ
*
pTq
,
const
STqExecHandle
*
pExec
,
SMqDataRsp
*
pRsp
,
STqOffsetVal
*
pOffset
)
{
qTaskInfo_t
task
=
pExec
->
execCol
.
task
[
0
];
if
(
qStreamPrepareScan1
(
task
,
pOffset
)
<
0
)
{
ASSERT
(
0
);
}
while
(
1
)
{
SSDataBlock
*
pDataBlock
=
NULL
;
uint64_t
ts
=
0
;
if
(
qExecTask
(
task
,
&
pDataBlock
,
&
ts
)
<
0
)
{
ASSERT
(
0
);
}
if
(
pDataBlock
!=
NULL
)
{
tqAddBlockDataToRsp
(
pDataBlock
,
pRsp
);
if
(
pRsp
->
withTbName
)
{
int64_t
uid
=
pExec
->
pExecReader
[
0
]
->
msgIter
.
uid
;
tqAddTbNameToRsp
(
pTq
,
uid
,
pRsp
);
}
pRsp
->
blockNum
++
;
continue
;
}
void
*
meta
=
qStreamExtractMetaMsg
(
task
);
if
(
meta
!=
NULL
)
{
// tq add meta to rsp
}
if
(
qStreamExtractOffset
(
task
,
&
pRsp
->
rspOffset
)
<
0
)
{
ASSERT
(
0
);
}
ASSERT
(
pRsp
->
rspOffset
.
type
!=
0
);
break
;
}
return
0
;
}
int32_t
tqScanSnapshot
(
STQ
*
pTq
,
const
STqExecHandle
*
pExec
,
SMqDataRsp
*
pRsp
,
STqOffsetVal
offset
,
int32_t
workerId
)
{
int32_t
tqScanSnapshot
(
STQ
*
pTq
,
const
STqExecHandle
*
pExec
,
SMqDataRsp
*
pRsp
,
STqOffsetVal
offset
,
int32_t
workerId
)
{
ASSERT
(
pExec
->
subType
==
TOPIC_SUB_TYPE__COLUMN
);
ASSERT
(
pExec
->
subType
==
TOPIC_SUB_TYPE__COLUMN
);
qTaskInfo_t
task
=
pExec
->
execCol
.
task
[
workerId
];
qTaskInfo_t
task
=
pExec
->
execCol
.
task
[
workerId
];
...
@@ -67,7 +107,7 @@ int32_t tqScanSnapshot(STQ* pTq, const STqExecHandle* pExec, SMqDataRsp* pRsp, S
...
@@ -67,7 +107,7 @@ int32_t tqScanSnapshot(STQ* pTq, const STqExecHandle* pExec, SMqDataRsp* pRsp, S
/*ASSERT(0);*/
/*ASSERT(0);*/
/*}*/
/*}*/
if
(
qStreamPrepareScan
(
task
,
offset
.
uid
,
offset
.
ts
)
<
0
)
{
if
(
qStreamPrepare
Tsdb
Scan
(
task
,
offset
.
uid
,
offset
.
ts
)
<
0
)
{
ASSERT
(
0
);
ASSERT
(
0
);
}
}
...
@@ -93,7 +133,7 @@ int32_t tqScanSnapshot(STQ* pTq, const STqExecHandle* pExec, SMqDataRsp* pRsp, S
...
@@ -93,7 +133,7 @@ int32_t tqScanSnapshot(STQ* pTq, const STqExecHandle* pExec, SMqDataRsp* pRsp, S
if (qGetStreamScanStatus(task, &uid, &ts) < 0) {
if (qGetStreamScanStatus(task, &uid, &ts) < 0) {
ASSERT(0);
ASSERT(0);
}
}
tqAddTbNameToRsp(pTq, uid, pRsp
, workerId
);
tqAddTbNameToRsp(pTq, uid, pRsp);
#endif
#endif
}
}
pRsp
->
blockNum
++
;
pRsp
->
blockNum
++
;
...
@@ -129,7 +169,7 @@ int32_t tqLogScanExec(STQ* pTq, STqExecHandle* pExec, SSubmitReq* pReq, SMqDataR
...
@@ -129,7 +169,7 @@ int32_t tqLogScanExec(STQ* pTq, STqExecHandle* pExec, SSubmitReq* pReq, SMqDataR
tqAddBlockDataToRsp
(
pDataBlock
,
pRsp
);
tqAddBlockDataToRsp
(
pDataBlock
,
pRsp
);
if
(
pRsp
->
withTbName
)
{
if
(
pRsp
->
withTbName
)
{
int64_t
uid
=
pExec
->
pExecReader
[
workerId
]
->
msgIter
.
uid
;
int64_t
uid
=
pExec
->
pExecReader
[
workerId
]
->
msgIter
.
uid
;
tqAddTbNameToRsp
(
pTq
,
uid
,
pRsp
,
workerId
);
tqAddTbNameToRsp
(
pTq
,
uid
,
pRsp
);
}
}
pRsp
->
blockNum
++
;
pRsp
->
blockNum
++
;
}
}
...
@@ -146,7 +186,7 @@ int32_t tqLogScanExec(STQ* pTq, STqExecHandle* pExec, SSubmitReq* pReq, SMqDataR
...
@@ -146,7 +186,7 @@ int32_t tqLogScanExec(STQ* pTq, STqExecHandle* pExec, SSubmitReq* pReq, SMqDataR
tqAddBlockDataToRsp
(
&
block
,
pRsp
);
tqAddBlockDataToRsp
(
&
block
,
pRsp
);
if
(
pRsp
->
withTbName
)
{
if
(
pRsp
->
withTbName
)
{
int64_t
uid
=
pExec
->
pExecReader
[
workerId
]
->
msgIter
.
uid
;
int64_t
uid
=
pExec
->
pExecReader
[
workerId
]
->
msgIter
.
uid
;
tqAddTbNameToRsp
(
pTq
,
uid
,
pRsp
,
workerId
);
tqAddTbNameToRsp
(
pTq
,
uid
,
pRsp
);
}
}
tqAddBlockSchemaToRsp
(
pExec
,
workerId
,
pRsp
);
tqAddBlockSchemaToRsp
(
pExec
,
workerId
,
pRsp
);
pRsp
->
blockNum
++
;
pRsp
->
blockNum
++
;
...
@@ -164,7 +204,7 @@ int32_t tqLogScanExec(STQ* pTq, STqExecHandle* pExec, SSubmitReq* pReq, SMqDataR
...
@@ -164,7 +204,7 @@ int32_t tqLogScanExec(STQ* pTq, STqExecHandle* pExec, SSubmitReq* pReq, SMqDataR
tqAddBlockDataToRsp
(
&
block
,
pRsp
);
tqAddBlockDataToRsp
(
&
block
,
pRsp
);
if
(
pRsp
->
withTbName
)
{
if
(
pRsp
->
withTbName
)
{
int64_t
uid
=
pExec
->
pExecReader
[
workerId
]
->
msgIter
.
uid
;
int64_t
uid
=
pExec
->
pExecReader
[
workerId
]
->
msgIter
.
uid
;
tqAddTbNameToRsp
(
pTq
,
uid
,
pRsp
,
workerId
);
tqAddTbNameToRsp
(
pTq
,
uid
,
pRsp
);
}
}
tqAddBlockSchemaToRsp
(
pExec
,
workerId
,
pRsp
);
tqAddBlockSchemaToRsp
(
pExec
,
workerId
,
pRsp
);
pRsp
->
blockNum
++
;
pRsp
->
blockNum
++
;
...
...
source/dnode/vnode/src/tq/tqRead.c
浏览文件 @
3cd5a350
...
@@ -15,11 +15,6 @@
...
@@ -15,11 +15,6 @@
#include "tq.h"
#include "tq.h"
int64_t
tqScanLog
(
STQ
*
pTq
,
const
STqExecHandle
*
pExec
,
SMqDataRsp
*
pRsp
,
STqOffsetVal
offset
)
{
/*if ()*/
return
0
;
}
int64_t
tqFetchLog
(
STQ
*
pTq
,
STqHandle
*
pHandle
,
int64_t
*
fetchOffset
,
SWalCkHead
**
ppCkHead
)
{
int64_t
tqFetchLog
(
STQ
*
pTq
,
STqHandle
*
pHandle
,
int64_t
*
fetchOffset
,
SWalCkHead
**
ppCkHead
)
{
int32_t
code
=
0
;
int32_t
code
=
0
;
taosThreadMutexLock
(
&
pHandle
->
pWalReader
->
mutex
);
taosThreadMutexLock
(
&
pHandle
->
pWalReader
->
mutex
);
...
@@ -84,8 +79,10 @@ STqReader* tqOpenReader(SVnode* pVnode) {
...
@@ -84,8 +79,10 @@ STqReader* tqOpenReader(SVnode* pVnode) {
return
NULL
;
return
NULL
;
}
}
// TODO open
pReader
->
pWalReader
=
walOpenReader
(
pVnode
->
pWal
,
NULL
);
/*pReader->pWalReader = walOpenReader(pVnode->pWal, NULL);*/
if
(
pReader
->
pWalReader
==
NULL
)
{
return
NULL
;
}
pReader
->
pVnodeMeta
=
pVnode
->
pMeta
;
pReader
->
pVnodeMeta
=
pVnode
->
pMeta
;
pReader
->
pMsg
=
NULL
;
pReader
->
pMsg
=
NULL
;
...
@@ -106,12 +103,19 @@ void tqCloseReader(STqReader* pReader) {
...
@@ -106,12 +103,19 @@ void tqCloseReader(STqReader* pReader) {
taosMemoryFree
(
pReader
);
taosMemoryFree
(
pReader
);
}
}
int32_t
tqSeekVer
(
STqReader
*
pReader
,
int64_t
ver
)
{
//
return
walReadSeekVer
(
pReader
->
pWalReader
,
ver
);
}
int32_t
tqNextBlock
(
STqReader
*
pReader
,
SFetchRet
*
ret
)
{
int32_t
tqNextBlock
(
STqReader
*
pReader
,
SFetchRet
*
ret
)
{
bool
fromProcessedMsg
=
pReader
->
pMsg
!=
NULL
;
bool
fromProcessedMsg
=
pReader
->
pMsg
!=
NULL
;
while
(
1
)
{
while
(
1
)
{
if
(
!
fromProcessedMsg
)
{
if
(
!
fromProcessedMsg
)
{
if
(
walNextValidMsg
(
pReader
->
pWalReader
)
<
0
)
{
if
(
walNextValidMsg
(
pReader
->
pWalReader
)
<
0
)
{
ret
->
offset
.
type
=
TMQ_OFFSET__LOG
;
ret
->
offset
.
version
=
pReader
->
ver
;
ret
->
fetchType
=
FETCH_TYPE__NONE
;
ret
->
fetchType
=
FETCH_TYPE__NONE
;
return
-
1
;
return
-
1
;
}
}
...
@@ -130,19 +134,23 @@ int32_t tqNextBlock(STqReader* pReader, SFetchRet* ret) {
...
@@ -130,19 +134,23 @@ int32_t tqNextBlock(STqReader* pReader, SFetchRet* ret) {
memset
(
&
ret
->
data
,
0
,
sizeof
(
SSDataBlock
));
memset
(
&
ret
->
data
,
0
,
sizeof
(
SSDataBlock
));
int32_t
code
=
tqRetrieveDataBlock
(
&
ret
->
data
,
pReader
);
int32_t
code
=
tqRetrieveDataBlock
(
&
ret
->
data
,
pReader
);
if
(
code
!=
0
||
ret
->
data
.
info
.
rows
==
0
)
{
if
(
code
!=
0
||
ret
->
data
.
info
.
rows
==
0
)
{
ASSERT
(
0
);
#if 0
if (fromProcessedMsg) {
if (fromProcessedMsg) {
ret->fetchType = FETCH_TYPE__NONE;
ret->fetchType = FETCH_TYPE__NONE;
return 0;
return 0;
} else {
} else {
break;
break;
}
}
#endif
}
}
ret
->
fetchType
=
FETCH_TYPE__DATA
;
ret
->
fetchType
=
FETCH_TYPE__DATA
;
return
0
;
return
0
;
}
}
if
(
fromProcessedMsg
)
{
if
(
fromProcessedMsg
)
{
ret
->
offset
.
type
=
TMQ_OFFSET__LOG
;
ret
->
offset
.
version
=
pReader
->
ver
;
ret
->
fetchType
=
FETCH_TYPE__NONE
;
ret
->
fetchType
=
FETCH_TYPE__NONE
;
return
0
;
return
0
;
}
}
...
...
source/libs/executor/inc/executorimpl.h
浏览文件 @
3cd5a350
此差异已折叠。
点击以展开。
source/libs/executor/src/executor.c
浏览文件 @
3cd5a350
...
@@ -60,9 +60,9 @@ static int32_t doSetStreamBlock(SOperatorInfo* pOperator, void* input, size_t nu
...
@@ -60,9 +60,9 @@ static int32_t doSetStreamBlock(SOperatorInfo* pOperator, void* input, size_t nu
taosArrayAddAll
(
p
->
pDataBlock
,
pDataBlock
->
pDataBlock
);
taosArrayAddAll
(
p
->
pDataBlock
,
pDataBlock
->
pDataBlock
);
taosArrayPush
(
pInfo
->
pBlockLists
,
&
p
);
taosArrayPush
(
pInfo
->
pBlockLists
,
&
p
);
}
}
}
else
if
(
type
==
STREAM_INPUT__
DATA
_SCAN
)
{
}
else
if
(
type
==
STREAM_INPUT__
TABLE
_SCAN
)
{
// do nothing
// do nothing
ASSERT
(
pInfo
->
blockType
==
STREAM_INPUT__
DATA
_SCAN
);
ASSERT
(
pInfo
->
blockType
==
STREAM_INPUT__
TABLE
_SCAN
);
}
else
{
}
else
{
ASSERT
(
0
);
ASSERT
(
0
);
}
}
...
@@ -76,7 +76,7 @@ int32_t qStreamScanSnapshot(qTaskInfo_t tinfo) {
...
@@ -76,7 +76,7 @@ int32_t qStreamScanSnapshot(qTaskInfo_t tinfo) {
return
TSDB_CODE_QRY_APP_ERROR
;
return
TSDB_CODE_QRY_APP_ERROR
;
}
}
SExecTaskInfo
*
pTaskInfo
=
(
SExecTaskInfo
*
)
tinfo
;
SExecTaskInfo
*
pTaskInfo
=
(
SExecTaskInfo
*
)
tinfo
;
return
doSetStreamBlock
(
pTaskInfo
->
pRoot
,
NULL
,
0
,
STREAM_INPUT__
DATA
_SCAN
,
0
,
NULL
);
return
doSetStreamBlock
(
pTaskInfo
->
pRoot
,
NULL
,
0
,
STREAM_INPUT__
TABLE
_SCAN
,
0
,
NULL
);
}
}
int32_t
qSetStreamInput
(
qTaskInfo_t
tinfo
,
const
void
*
input
,
int32_t
type
,
bool
assignUid
)
{
int32_t
qSetStreamInput
(
qTaskInfo_t
tinfo
,
const
void
*
input
,
int32_t
type
,
bool
assignUid
)
{
...
...
source/libs/executor/src/executorMain.c
浏览文件 @
3cd5a350
...
@@ -267,7 +267,44 @@ const STqOffset* qExtractStatusFromStreamScanner(void* scanner) {
...
@@ -267,7 +267,44 @@ const STqOffset* qExtractStatusFromStreamScanner(void* scanner) {
return
&
pInfo
->
offset
;
return
&
pInfo
->
offset
;
}
}
int32_t
qStreamPrepareScan
(
qTaskInfo_t
tinfo
,
uint64_t
uid
,
int64_t
ts
)
{
void
*
qStreamExtractMetaMsg
(
qTaskInfo_t
tinfo
)
{
SExecTaskInfo
*
pTaskInfo
=
(
SExecTaskInfo
*
)
tinfo
;
ASSERT
(
pTaskInfo
->
execModel
==
OPTR_EXEC_MODEL_STREAM
);
return
pTaskInfo
->
streamInfo
.
metaBlk
;
}
int32_t
qStreamExtractOffset
(
qTaskInfo_t
tinfo
,
STqOffsetVal
*
pOffset
)
{
SExecTaskInfo
*
pTaskInfo
=
(
SExecTaskInfo
*
)
tinfo
;
ASSERT
(
pTaskInfo
->
execModel
==
OPTR_EXEC_MODEL_STREAM
);
memcpy
(
pOffset
,
&
pTaskInfo
->
streamInfo
.
lastStatus
,
sizeof
(
STqOffsetVal
));
return
0
;
}
int32_t
qStreamPrepareScan1
(
qTaskInfo_t
tinfo
,
const
STqOffsetVal
*
pOffset
)
{
SExecTaskInfo
*
pTaskInfo
=
(
SExecTaskInfo
*
)
tinfo
;
SOperatorInfo
*
pOperator
=
pTaskInfo
->
pRoot
;
ASSERT
(
pTaskInfo
->
execModel
==
OPTR_EXEC_MODEL_STREAM
);
pTaskInfo
->
streamInfo
.
prepareStatus
=
*
pOffset
;
// TODO: optimize
/*if (pTaskInfo->streamInfo.lastStatus.type != pOffset->type ||*/
/*pTaskInfo->streamInfo.prepareStatus.version != pTaskInfo->streamInfo.lastStatus.version) {*/
while
(
1
)
{
uint8_t
type
=
pOperator
->
operatorType
;
pOperator
->
status
=
OP_OPENED
;
if
(
type
==
QUERY_NODE_PHYSICAL_PLAN_STREAM_SCAN
)
{
SStreamScanInfo
*
pInfo
=
pOperator
->
info
;
tqSeekVer
(
pInfo
->
tqReader
,
pOffset
->
version
);
return
0
;
}
else
{
ASSERT
(
pOperator
->
numOfDownstream
==
1
);
pOperator
=
pOperator
->
pDownstream
[
0
];
}
}
/*}*/
return
0
;
}
int32_t
qStreamPrepareTsdbScan
(
qTaskInfo_t
tinfo
,
uint64_t
uid
,
int64_t
ts
)
{
SExecTaskInfo
*
pTaskInfo
=
(
SExecTaskInfo
*
)
tinfo
;
SExecTaskInfo
*
pTaskInfo
=
(
SExecTaskInfo
*
)
tinfo
;
if
(
uid
==
0
)
{
if
(
uid
==
0
)
{
...
...
source/libs/executor/src/executorimpl.c
浏览文件 @
3cd5a350
...
@@ -2848,7 +2848,7 @@ int32_t doPrepareScan(SOperatorInfo* pOperator, uint64_t uid, int64_t ts) {
...
@@ -2848,7 +2848,7 @@ int32_t doPrepareScan(SOperatorInfo* pOperator, uint64_t uid, int64_t ts) {
if
(
type
==
QUERY_NODE_PHYSICAL_PLAN_STREAM_SCAN
)
{
if
(
type
==
QUERY_NODE_PHYSICAL_PLAN_STREAM_SCAN
)
{
SStreamScanInfo
*
pScanInfo
=
pOperator
->
info
;
SStreamScanInfo
*
pScanInfo
=
pOperator
->
info
;
pScanInfo
->
blockType
=
STREAM_INPUT__
DATA
_SCAN
;
pScanInfo
->
blockType
=
STREAM_INPUT__
TABLE
_SCAN
;
pScanInfo
->
pTableScanOp
->
status
=
OP_OPENED
;
pScanInfo
->
pTableScanOp
->
status
=
OP_OPENED
;
...
@@ -3283,7 +3283,10 @@ static SSDataBlock* doProjectOperation(SOperatorInfo* pOperator) {
...
@@ -3283,7 +3283,10 @@ static SSDataBlock* doProjectOperation(SOperatorInfo* pOperator) {
// The downstream exec may change the value of the newgroup, so use a local variable instead.
// The downstream exec may change the value of the newgroup, so use a local variable instead.
SSDataBlock
*
pBlock
=
downstream
->
fpSet
.
getNextFn
(
downstream
);
SSDataBlock
*
pBlock
=
downstream
->
fpSet
.
getNextFn
(
downstream
);
if
(
pBlock
==
NULL
)
{
if
(
pBlock
==
NULL
)
{
// TODO optimize
/*if (pTaskInfo->execModel != OPTR_EXEC_MODEL_STREAM) {*/
doSetOperatorCompleted
(
pOperator
);
doSetOperatorCompleted
(
pOperator
);
/*}*/
break
;
break
;
}
}
if
(
pBlock
->
info
.
type
==
STREAM_RETRIEVE
)
{
if
(
pBlock
->
info
.
type
==
STREAM_RETRIEVE
)
{
...
...
source/libs/executor/src/scanoperator.c
浏览文件 @
3cd5a350
...
@@ -1123,15 +1123,116 @@ static void setBlockGroupId(SOperatorInfo* pOperator, SSDataBlock* pBlock, int32
...
@@ -1123,15 +1123,116 @@ static void setBlockGroupId(SOperatorInfo* pOperator, SSDataBlock* pBlock, int32
uidCol
[
i
]
=
getGroupId
(
pOperator
,
uidCol
[
i
]);
uidCol
[
i
]
=
getGroupId
(
pOperator
,
uidCol
[
i
]);
}
}
}
}
static
int32_t
setBlockIntoRes
(
SStreamScanInfo
*
pInfo
,
const
SSDataBlock
*
pBlock
)
{
SDataBlockInfo
*
pBlockInfo
=
&
pInfo
->
pRes
->
info
;
SOperatorInfo
*
pOperator
=
pInfo
->
pStreamScanOp
;
SExecTaskInfo
*
pTaskInfo
=
pInfo
->
pStreamScanOp
->
pTaskInfo
;
pInfo
->
pRes
->
info
.
rows
=
pBlock
->
info
.
rows
;
pInfo
->
pRes
->
info
.
uid
=
pBlock
->
info
.
uid
;
pInfo
->
pRes
->
info
.
type
=
STREAM_NORMAL
;
pInfo
->
pRes
->
info
.
capacity
=
pBlock
->
info
.
rows
;
// for generating rollup SMA result, each time is an independent time serie.
// TODO temporarily used, when the statement of "partition by tbname" is ready, remove this
if
(
pInfo
->
assignBlockUid
)
{
pInfo
->
pRes
->
info
.
groupId
=
pBlock
->
info
.
uid
;
}
uint64_t
*
groupIdPre
=
taosHashGet
(
pOperator
->
pTaskInfo
->
tableqinfoList
.
map
,
&
pBlock
->
info
.
uid
,
sizeof
(
int64_t
));
if
(
groupIdPre
)
{
pInfo
->
pRes
->
info
.
groupId
=
*
groupIdPre
;
}
else
{
pInfo
->
pRes
->
info
.
groupId
=
0
;
}
// todo extract method
for
(
int32_t
i
=
0
;
i
<
taosArrayGetSize
(
pInfo
->
pColMatchInfo
);
++
i
)
{
SColMatchInfo
*
pColMatchInfo
=
taosArrayGet
(
pInfo
->
pColMatchInfo
,
i
);
if
(
!
pColMatchInfo
->
output
)
{
continue
;
}
bool
colExists
=
false
;
for
(
int32_t
j
=
0
;
j
<
blockDataGetNumOfCols
(
pBlock
);
++
j
)
{
SColumnInfoData
*
pResCol
=
bdGetColumnInfoData
(
pBlock
,
j
);
if
(
pResCol
->
info
.
colId
==
pColMatchInfo
->
colId
)
{
taosArraySet
(
pInfo
->
pRes
->
pDataBlock
,
pColMatchInfo
->
targetSlotId
,
pResCol
);
colExists
=
true
;
break
;
}
}
// the required column does not exists in submit block, let's set it to be all null value
if
(
!
colExists
)
{
SColumnInfoData
*
pDst
=
taosArrayGet
(
pInfo
->
pRes
->
pDataBlock
,
pColMatchInfo
->
targetSlotId
);
colDataAppendNNULL
(
pDst
,
0
,
pBlockInfo
->
rows
);
}
}
taosArrayDestroy
(
pBlock
->
pDataBlock
);
ASSERT
(
pInfo
->
pRes
->
pDataBlock
!=
NULL
);
#if 0
if (pInfo->pRes->pDataBlock == NULL) {
// TODO add log
updateInfoDestoryColseWinSBF(pInfo->pUpdateInfo);
pOperator->status = OP_EXEC_DONE;
pTaskInfo->code = terrno;
return -1;
}
#endif
// currently only the tbname pseudo column
if
(
pInfo
->
numOfPseudoExpr
>
0
)
{
addTagPseudoColumnData
(
&
pInfo
->
readHandle
,
pInfo
->
pPseudoExpr
,
pInfo
->
numOfPseudoExpr
,
pInfo
->
pRes
);
}
doFilter
(
pInfo
->
pCondition
,
pInfo
->
pRes
);
blockDataUpdateTsWindow
(
pInfo
->
pRes
,
pInfo
->
primaryTsIndex
);
if
(
pBlockInfo
->
rows
>
0
)
{
return
0
;
}
return
0
;
}
static
SSDataBlock
*
doStreamScan
(
SOperatorInfo
*
pOperator
)
{
static
SSDataBlock
*
doStreamScan
(
SOperatorInfo
*
pOperator
)
{
// NOTE: this operator does never check if current status is done or not
// NOTE: this operator does never check if current status is done or not
SExecTaskInfo
*
pTaskInfo
=
pOperator
->
pTaskInfo
;
SExecTaskInfo
*
pTaskInfo
=
pOperator
->
pTaskInfo
;
SStreamScanInfo
*
pInfo
=
pOperator
->
info
;
SStreamScanInfo
*
pInfo
=
pOperator
->
info
;
pTaskInfo
->
code
=
pOperator
->
fpSet
.
_openFn
(
pOperator
);
/*pTaskInfo->code = pOperator->fpSet._openFn(pOperator);*/
if
(
pTaskInfo
->
code
!=
TSDB_CODE_SUCCESS
||
pOperator
->
status
==
OP_EXEC_DONE
)
{
/*if (pTaskInfo->code != TSDB_CODE_SUCCESS || pOperator->status == OP_EXEC_DONE) {*/
/*return NULL;*/
/*}*/
if
(
pTaskInfo
->
streamInfo
.
prepareStatus
.
type
==
TMQ_OFFSET__LOG
)
{
while
(
1
)
{
SFetchRet
ret
=
{
0
};
tqNextBlock
(
pInfo
->
tqReader
,
&
ret
);
if
(
ret
.
fetchType
==
FETCH_TYPE__DATA
)
{
blockDataCleanup
(
pInfo
->
pRes
);
if
(
setBlockIntoRes
(
pInfo
,
&
ret
.
data
)
<
0
)
{
ASSERT
(
0
);
}
pTaskInfo
->
streamInfo
.
lastStatus
=
ret
.
offset
;
if
(
pInfo
->
pRes
->
info
.
rows
>
0
)
{
return
pInfo
->
pRes
;
}
else
{
tDeleteSSDataBlock
(
&
ret
.
data
);
}
}
else
if
(
ret
.
fetchType
==
FETCH_TYPE__META
)
{
ASSERT
(
0
);
pTaskInfo
->
streamInfo
.
lastStatus
=
ret
.
offset
;
pTaskInfo
->
streamInfo
.
metaBlk
=
ret
.
meta
;
return
NULL
;
}
else
if
(
ret
.
fetchType
==
FETCH_TYPE__NONE
)
{
pTaskInfo
->
streamInfo
.
lastStatus
=
ret
.
offset
;
return
NULL
;
return
NULL
;
}
else
{
ASSERT
(
0
);
}
}
}
}
size_t
total
=
taosArrayGetSize
(
pInfo
->
pBlockLists
);
size_t
total
=
taosArrayGetSize
(
pInfo
->
pBlockLists
);
...
@@ -1139,7 +1240,7 @@ static SSDataBlock* doStreamScan(SOperatorInfo* pOperator) {
...
@@ -1139,7 +1240,7 @@ static SSDataBlock* doStreamScan(SOperatorInfo* pOperator) {
if
(
pInfo
->
blockType
==
STREAM_INPUT__DATA_BLOCK
)
{
if
(
pInfo
->
blockType
==
STREAM_INPUT__DATA_BLOCK
)
{
if
(
pInfo
->
validBlockIndex
>=
total
)
{
if
(
pInfo
->
validBlockIndex
>=
total
)
{
/*doClearBufferedBlocks(pInfo);*/
/*doClearBufferedBlocks(pInfo);*/
pOperator
->
status
=
OP_EXEC_DONE
;
/*pOperator->status = OP_EXEC_DONE;*/
return
NULL
;
return
NULL
;
}
}
...
@@ -1286,6 +1387,9 @@ static SSDataBlock* doStreamScan(SOperatorInfo* pOperator) {
...
@@ -1286,6 +1387,9 @@ static SSDataBlock* doStreamScan(SOperatorInfo* pOperator) {
}
}
taosArrayDestroy
(
block
.
pDataBlock
);
taosArrayDestroy
(
block
.
pDataBlock
);
ASSERT
(
pInfo
->
pRes
->
pDataBlock
!=
NULL
);
#if 0
if (pInfo->pRes->pDataBlock == NULL) {
if (pInfo->pRes->pDataBlock == NULL) {
// TODO add log
// TODO add log
updateInfoDestoryColseWinSBF(pInfo->pUpdateInfo);
updateInfoDestoryColseWinSBF(pInfo->pUpdateInfo);
...
@@ -1293,6 +1397,7 @@ static SSDataBlock* doStreamScan(SOperatorInfo* pOperator) {
...
@@ -1293,6 +1397,7 @@ static SSDataBlock* doStreamScan(SOperatorInfo* pOperator) {
pTaskInfo->code = terrno;
pTaskInfo->code = terrno;
return NULL;
return NULL;
}
}
#endif
// currently only the tbname pseudo column
// currently only the tbname pseudo column
if
(
pInfo
->
numOfPseudoExpr
>
0
)
{
if
(
pInfo
->
numOfPseudoExpr
>
0
)
{
...
@@ -1312,7 +1417,7 @@ static SSDataBlock* doStreamScan(SOperatorInfo* pOperator) {
...
@@ -1312,7 +1417,7 @@ static SSDataBlock* doStreamScan(SOperatorInfo* pOperator) {
if
(
pBlockInfo
->
rows
==
0
)
{
if
(
pBlockInfo
->
rows
==
0
)
{
updateInfoDestoryColseWinSBF
(
pInfo
->
pUpdateInfo
);
updateInfoDestoryColseWinSBF
(
pInfo
->
pUpdateInfo
);
pOperator
->
status
=
OP_EXEC_DONE
;
/*pOperator->status = OP_EXEC_DONE;*/
}
else
if
(
pInfo
->
pUpdateInfo
)
{
}
else
if
(
pInfo
->
pUpdateInfo
)
{
pInfo
->
tsArrayIndex
=
0
;
pInfo
->
tsArrayIndex
=
0
;
checkUpdateData
(
pInfo
,
true
,
pInfo
->
pRes
,
true
);
checkUpdateData
(
pInfo
,
true
,
pInfo
->
pRes
,
true
);
...
@@ -1330,7 +1435,7 @@ static SSDataBlock* doStreamScan(SOperatorInfo* pOperator) {
...
@@ -1330,7 +1435,7 @@ static SSDataBlock* doStreamScan(SOperatorInfo* pOperator) {
return
(
pBlockInfo
->
rows
==
0
)
?
NULL
:
pInfo
->
pRes
;
return
(
pBlockInfo
->
rows
==
0
)
?
NULL
:
pInfo
->
pRes
;
}
else
if
(
pInfo
->
blockType
==
STREAM_INPUT__
DATA
_SCAN
)
{
}
else
if
(
pInfo
->
blockType
==
STREAM_INPUT__
TABLE
_SCAN
)
{
// check reader last status
// check reader last status
// if not match, reset status
// if not match, reset status
SSDataBlock
*
pResult
=
doTableScan
(
pInfo
->
pTableScanOp
);
SSDataBlock
*
pResult
=
doTableScan
(
pInfo
->
pTableScanOp
);
...
...
source/libs/wal/src/walRead.c
浏览文件 @
3cd5a350
...
@@ -147,7 +147,7 @@ static int32_t walReadChangeFile(SWalReader *pRead, int64_t fileFirstVer) {
...
@@ -147,7 +147,7 @@ static int32_t walReadChangeFile(SWalReader *pRead, int64_t fileFirstVer) {
return
0
;
return
0
;
}
}
static
int32_t
walReadSeekVer
(
SWalReader
*
pRead
,
int64_t
ver
)
{
int32_t
walReadSeekVer
(
SWalReader
*
pRead
,
int64_t
ver
)
{
SWal
*
pWal
=
pRead
->
pWal
;
SWal
*
pWal
=
pRead
->
pWal
;
if
(
ver
==
pRead
->
curVersion
)
{
if
(
ver
==
pRead
->
curVersion
)
{
return
0
;
return
0
;
...
@@ -355,22 +355,6 @@ int32_t walFetchBody(SWalReader *pRead, SWalCkHead **ppHead) {
...
@@ -355,22 +355,6 @@ int32_t walFetchBody(SWalReader *pRead, SWalCkHead **ppHead) {
return
0
;
return
0
;
}
}
int32_t
walReadWithHandle_s
(
SWalReader
*
pRead
,
int64_t
ver
,
SWalCont
**
ppHead
)
{
taosThreadMutexLock
(
&
pRead
->
mutex
);
if
(
walReadVer
(
pRead
,
ver
)
<
0
)
{
taosThreadMutexUnlock
(
&
pRead
->
mutex
);
return
-
1
;
}
*
ppHead
=
taosMemoryMalloc
(
sizeof
(
SWalCont
)
+
pRead
->
pHead
->
head
.
bodyLen
);
if
(
*
ppHead
==
NULL
)
{
taosThreadMutexUnlock
(
&
pRead
->
mutex
);
return
-
1
;
}
memcpy
(
*
ppHead
,
&
pRead
->
pHead
->
head
,
sizeof
(
SWalCont
)
+
pRead
->
pHead
->
head
.
bodyLen
);
taosThreadMutexUnlock
(
&
pRead
->
mutex
);
return
0
;
}
int32_t
walReadVer
(
SWalReader
*
pRead
,
int64_t
ver
)
{
int32_t
walReadVer
(
SWalReader
*
pRead
,
int64_t
ver
)
{
int64_t
code
;
int64_t
code
;
...
...
tests/script/jenkins/basic.txt
浏览文件 @
3cd5a350
...
@@ -80,7 +80,7 @@
...
@@ -80,7 +80,7 @@
./test.sh -f tsim/mnode/basic1.sim
./test.sh -f tsim/mnode/basic1.sim
./test.sh -f tsim/mnode/basic2.sim
./test.sh -f tsim/mnode/basic2.sim
./test.sh -f tsim/mnode/basic3.sim
./test.sh -f tsim/mnode/basic3.sim
./test.sh -f tsim/mnode/basic4.sim
#
./test.sh -f tsim/mnode/basic4.sim
./test.sh -f tsim/mnode/basic5.sim
./test.sh -f tsim/mnode/basic5.sim
# ---- show
# ---- show
...
...
tests/system-test/failed.txt
浏览文件 @
3cd5a350
#python3 ./test.py -f 2-query/last.py -Q 3
#python3 ./test.py -f 2-query/last.py -Q 3
#./test.sh -f tsim/mnode/basic4.sim
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录