Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
4b9613f2
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看板
未验证
提交
4b9613f2
编写于
5月 26, 2023
作者:
H
Haojun Liao
提交者:
GitHub
5月 26, 2023
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #21489 from taosdata/refact/fillhistory
fix(query): fix bug in iterating the table list.
上级
64e89620
00810d1f
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
23 addition
and
14 deletion
+23
-14
source/client/src/clientTmq.c
source/client/src/clientTmq.c
+4
-2
source/dnode/vnode/src/tq/tq.c
source/dnode/vnode/src/tq/tq.c
+2
-0
source/dnode/vnode/src/tsdb/tsdbRead.c
source/dnode/vnode/src/tsdb/tsdbRead.c
+1
-0
source/libs/stream/src/streamMeta.c
source/libs/stream/src/streamMeta.c
+5
-1
tests/script/tsim/query/udfpy.sim
tests/script/tsim/query/udfpy.sim
+11
-11
未找到文件。
source/client/src/clientTmq.c
浏览文件 @
4b9613f2
...
...
@@ -27,6 +27,8 @@
#define EMPTY_BLOCK_POLL_IDLE_DURATION 10
#define DEFAULT_AUTO_COMMIT_INTERVAL 5000
#define OFFSET_IS_RESET_OFFSET(_of) ((_of) < 0)
typedef
void
(
*
__tmq_askep_fn_t
)(
tmq_t
*
pTmq
,
int32_t
code
,
SDataBuf
*
pBuf
,
void
*
pParam
);
struct
SMqMgmt
{
...
...
@@ -2626,12 +2628,12 @@ int32_t tmq_offset_seek(tmq_t* tmq, const char* pTopicName, int32_t vgId, int64_
SVgOffsetInfo
*
pOffsetInfo
=
&
pVg
->
offsetInfo
;
int32_t
type
=
pOffsetInfo
->
currentOffset
.
type
;
if
(
type
!=
TMQ_OFFSET__LOG
)
{
if
(
type
!=
TMQ_OFFSET__LOG
&&
!
OFFSET_IS_RESET_OFFSET
(
type
)
)
{
tscError
(
"consumer:0x%"
PRIx64
" offset type:%d not wal version, seek not allowed"
,
tmq
->
consumerId
,
type
);
return
TSDB_CODE_INVALID_PARA
;
}
if
(
offset
<
pOffsetInfo
->
walVerBegin
||
offset
>
pOffsetInfo
->
walVerEnd
)
{
if
(
type
==
TMQ_OFFSET__LOG
&&
(
offset
<
pOffsetInfo
->
walVerBegin
||
offset
>
pOffsetInfo
->
walVerEnd
)
)
{
tscError
(
"consumer:0x%"
PRIx64
" invalid seek params, offset:%"
PRId64
", valid range:[%"
PRId64
", %"
PRId64
"]"
,
tmq
->
consumerId
,
offset
,
pOffsetInfo
->
walVerBegin
,
pOffsetInfo
->
walVerEnd
);
return
TSDB_CODE_INVALID_PARA
;
...
...
source/dnode/vnode/src/tq/tq.c
浏览文件 @
4b9613f2
...
...
@@ -1280,6 +1280,8 @@ int32_t tqProcessTaskDispatchRsp(STQ* pTq, SRpcMsg* pMsg) {
int32_t
tqProcessTaskDropReq
(
STQ
*
pTq
,
int64_t
sversion
,
char
*
msg
,
int32_t
msgLen
)
{
SVDropStreamTaskReq
*
pReq
=
(
SVDropStreamTaskReq
*
)
msg
;
tqDebug
(
"vgId:%d receive msg to drop stream task:0x%x"
,
TD_VID
(
pTq
->
pVnode
),
pReq
->
taskId
);
streamMetaRemoveTask
(
pTq
->
pStreamMeta
,
pReq
->
taskId
);
return
0
;
}
...
...
source/dnode/vnode/src/tsdb/tsdbRead.c
浏览文件 @
4b9613f2
...
...
@@ -3440,6 +3440,7 @@ static int32_t buildBlockFromBufferSequentially(STsdbReader* pReader) {
if
(
!
hasNexTable
)
{
return
TSDB_CODE_SUCCESS
;
}
pBlockScanInfo
=
pStatus
->
pTableIter
;
}
initMemDataIterator
(
*
pBlockScanInfo
,
pReader
);
...
...
source/libs/stream/src/streamMeta.c
浏览文件 @
4b9613f2
...
...
@@ -268,12 +268,14 @@ void streamMetaRemoveTask(SStreamMeta* pMeta, int32_t taskId) {
SStreamTask
**
ppTask
=
(
SStreamTask
**
)
taosHashGet
(
pMeta
->
pTasks
,
&
taskId
,
sizeof
(
int32_t
));
if
(
ppTask
)
{
SStreamTask
*
pTask
=
*
ppTask
;
taosHashRemove
(
pMeta
->
pTasks
,
&
taskId
,
sizeof
(
int32_t
));
tdbTbDelete
(
pMeta
->
pTaskDb
,
&
taskId
,
sizeof
(
int32_t
),
pMeta
->
txn
);
atomic_store_8
(
&
pTask
->
status
.
taskStatus
,
TASK_STATUS__DROPPING
);
int32_t
num
=
taosArrayGetSize
(
pMeta
->
pTaskList
);
qDebug
(
"s-task:%s set the drop task flag, remain running s-task:%d"
,
pTask
->
id
.
idStr
,
num
-
1
);
for
(
int32_t
i
=
0
;
i
<
num
;
++
i
)
{
int32_t
*
pTaskId
=
taosArrayGet
(
pMeta
->
pTaskList
,
i
);
if
(
*
pTaskId
==
taskId
)
{
...
...
@@ -283,6 +285,8 @@ void streamMetaRemoveTask(SStreamMeta* pMeta, int32_t taskId) {
}
streamMetaReleaseTask
(
pMeta
,
pTask
);
}
else
{
qDebug
(
"vgId:%d failed to find the task:0x%x, it may be dropped already"
,
pMeta
->
vgId
,
taskId
);
}
taosWUnLockLatch
(
&
pMeta
->
lock
);
...
...
tests/script/tsim/query/udfpy.sim
浏览文件 @
4b9613f2
...
...
@@ -281,17 +281,17 @@ if $data20 != 8.000000000 then
return -1
endi
sql create aggregate function pycumsum as '/tmp/pyudf/pycumsum.py' outputtype double bufSize 128 language 'python';
sql select pycumsum(f2) from udf.t2
print ======= pycumsum
print $rows $data00
if $rows != 1 then
return -1
endi
if $data00 != 20.000000000 then
return -1
endi
sql drop function pycumsum
#
sql create aggregate function pycumsum as '/tmp/pyudf/pycumsum.py' outputtype double bufSize 128 language 'python';
#
sql select pycumsum(f2) from udf.t2
#
print ======= pycumsum
#
print $rows $data00
#
if $rows != 1 then
#
return -1
#
endi
#
if $data00 != 20.000000000 then
#
return -1
#
endi
#
sql drop function pycumsum
sql create or replace function bit_and as '/tmp/udf/libbitand.so' outputtype int
sql select func_version from information_schema.ins_functions where name='bit_and'
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录