Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
e1d85ce0
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看板
提交
e1d85ce0
编写于
3月 30, 2023
作者:
H
Haojun Liao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(tmq): fix error.
上级
5f4cb41e
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
16 addition
and
11 deletion
+16
-11
source/libs/executor/src/executor.c
source/libs/executor/src/executor.c
+10
-8
source/libs/executor/src/scanoperator.c
source/libs/executor/src/scanoperator.c
+2
-1
tests/system-test/7-tmq/subscribeDb.py
tests/system-test/7-tmq/subscribeDb.py
+2
-2
tests/system-test/7-tmq/tmqConsFromTsdb-mutilVg.py
tests/system-test/7-tmq/tmqConsFromTsdb-mutilVg.py
+2
-0
未找到文件。
source/libs/executor/src/executor.c
浏览文件 @
e1d85ce0
...
...
@@ -1145,13 +1145,16 @@ int32_t qStreamPrepareScan(qTaskInfo_t tinfo, STqOffsetVal* pOffset, int8_t subT
pInfo
->
pTableScanOp
->
resultInfo
.
totalRows
=
0
;
// start from current accessed position
index
=
tableListFind
(
pTableListInfo
,
uid
,
pScanInfo
->
currentTable
);
// we cannot start from the pScanInfo->currentTable, since the commit offset may cause the rollback of the start
// position, let's find it from the beginning.
index
=
tableListFind
(
pTableListInfo
,
uid
,
0
);
taosRUnLockLatch
(
&
pTaskInfo
->
lock
);
if
(
index
>=
0
)
{
pScanInfo
->
currentTable
=
index
;
}
else
{
qError
(
"uid:%"
PRIu64
" not found in table list, total:%d %s"
,
uid
,
numOfTables
,
id
);
qError
(
"vgId:%d uid:%"
PRIu64
" not found in table list, total:%d, index:%d %s"
,
pTaskInfo
->
id
.
vgId
,
uid
,
numOfTables
,
pScanInfo
->
currentTable
,
id
);
return
-
1
;
}
...
...
@@ -1160,25 +1163,24 @@ int32_t qStreamPrepareScan(qTaskInfo_t tinfo, STqOffsetVal* pOffset, int8_t subT
// let's start from the next ts that returned to consumer.
pScanBaseInfo
->
cond
.
twindows
.
skey
=
ts
+
1
;
pScanInfo
->
scanTimes
=
0
;
if
(
pScanBaseInfo
->
dataReader
==
NULL
)
{
int32_t
code
=
tsdbReaderOpen
(
pScanBaseInfo
->
readHandle
.
vnode
,
&
pScanBaseInfo
->
cond
,
&
keyInfo
,
1
,
pScanInfo
->
pResBlock
,
&
pScanBaseInfo
->
dataReader
,
NULL
);
pScanInfo
->
pResBlock
,
&
pScanBaseInfo
->
dataReader
,
id
);
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
qError
(
"prepare read tsdb snapshot failed, uid:%"
PRId64
", code:%s %s"
,
pOffset
->
uid
,
tstrerror
(
code
),
id
);
terrno
=
code
;
return
-
1
;
}
qDebug
(
"tsdb reader created with offset(snapshot) uid:%"
PRId64
" ts
%"
PRId64
" table index:%d, total:%d, %s"
,
uid
,
ts
,
pScanInfo
->
currentTable
,
numOfTables
,
id
);
qDebug
(
"tsdb reader created with offset(snapshot) uid:%"
PRId64
" ts
:
%"
PRId64
" table index:%d, total:%d, %s"
,
uid
,
pScanBaseInfo
->
cond
.
twindows
.
skey
,
pScanInfo
->
currentTable
,
numOfTables
,
id
);
}
else
{
tsdbSetTableList
(
pScanBaseInfo
->
dataReader
,
&
keyInfo
,
1
);
tsdbReaderReset
(
pScanBaseInfo
->
dataReader
,
&
pScanBaseInfo
->
cond
);
pScanInfo
->
scanTimes
=
0
;
qDebug
(
"tsdb reader offset seek snapshot to uid:%"
PRId64
" ts %"
PRId64
" table index:%d numOfTable:%d, %s"
,
uid
,
ts
,
pScanInfo
->
currentTable
,
numOfTables
,
id
);
uid
,
pScanBaseInfo
->
cond
.
twindows
.
skey
,
pScanInfo
->
currentTable
,
numOfTables
,
id
);
}
// restore the key value
...
...
source/libs/executor/src/scanoperator.c
浏览文件 @
e1d85ce0
...
...
@@ -779,13 +779,14 @@ static SSDataBlock* doTableScan(SOperatorInfo* pOperator) {
// if no data, switch to next table and continue scan
pInfo
->
currentTable
++
;
if
(
pInfo
->
currentTable
>=
numOfTables
)
{
qDebug
(
"all table checked in table list, total:%d, return NULL, %s"
,
numOfTables
,
GET_TASKID
(
pTaskInfo
));
return
NULL
;
}
STableKeyInfo
*
pTableInfo
=
tableListGetInfo
(
pTaskInfo
->
pTableInfoList
,
pInfo
->
currentTable
);
tsdbSetTableList
(
pInfo
->
base
.
dataReader
,
pTableInfo
,
1
);
qDebug
(
"set uid:%"
PRIu64
" into scanner, total tables:%d, index:%d/%d %s"
,
pTableInfo
->
uid
,
numOfTables
,
pInfo
->
currentTable
,
numOfTables
,
pTaskInfo
->
id
.
str
);
pInfo
->
currentTable
,
numOfTables
,
GET_TASKID
(
pTaskInfo
)
);
tsdbReaderReset
(
pInfo
->
base
.
dataReader
,
&
pInfo
->
base
.
cond
);
pInfo
->
scanTimes
=
0
;
...
...
tests/system-test/7-tmq/subscribeDb.py
浏览文件 @
e1d85ce0
...
...
@@ -13,11 +13,11 @@ from util.dnodes import *
class
TDTestCase
:
hostname
=
socket
.
gethostname
()
#
rpcDebugFlagVal = '143'
rpcDebugFlagVal
=
'143'
#clientCfgDict = {'serverPort': '', 'firstEp': '', 'secondEp':'', 'rpcDebugFlag':'135', 'fqdn':''}
#clientCfgDict["rpcDebugFlag"] = rpcDebugFlagVal
#updatecfgDict = {'clientCfg': {}, 'serverPort': '', 'firstEp': '', 'secondEp':'', 'rpcDebugFlag':'135', 'fqdn':''}
#
updatecfgDict["rpcDebugFlag"] = rpcDebugFlagVal
updatecfgDict
[
"rpcDebugFlag"
]
=
rpcDebugFlagVal
#print ("===================: ", updatecfgDict)
def
init
(
self
,
conn
,
logSql
,
replicaVar
=
1
):
...
...
tests/system-test/7-tmq/tmqConsFromTsdb-mutilVg.py
浏览文件 @
e1d85ce0
...
...
@@ -16,6 +16,8 @@ sys.path.append("./7-tmq")
from
tmqCommon
import
*
class
TDTestCase
:
updatecfgDict
=
{
"tsdbDebugFlag"
:
135
}
def
__init__
(
self
):
self
.
vgroups
=
4
self
.
ctbNum
=
10
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录