feat(tmq): optimize the logic of changing tablelist for stb sub#35133
feat(tmq): optimize the logic of changing tablelist for stb sub#35133guanshengliang merged 10 commits into3.0from
Conversation
- Refactor tq module: merge tqRead.c/tqSink.c into tqScan.c and new tqInterface.c - Rename Tmq functions to QuerySub/StbSub naming convention - Add dynamic table list change support for super table subscription - Handle table-not-exist scenarios gracefully in meta queries - Remove deprecated TDMT_VND_TMQ_SEEK message and pFilterOutTbUid mechanism - Add metaGetTbnameByIdIfTableNotExist and getIdInner for fallback lookups
feat(tmq): update table list wher alter tag & split big files in tmq
- Fix double mutex unlock in tmqMgmtClose (C1) - Fix use-after-free in tqProcessAlterTbMsg log after destroyAlterTbReq (C2) - Fix null pointer check: TQ_NULL_GO_TO_END(pBuf) -> TQ_NULL_GO_TO_END(*pBuf) (C3) - Add buffer overflow checks in WAL body rewriting (H2) - Eliminate duplicate tqGetUidSuid calls in tqAlterMultiTag using SAlterTagUidCache (M2) - Improve naming: getSchemaInner -> getSchemaWithVer, metaGetSuidByUid -> metaGetSuidByUidIfTableNotExist - Add missing newline at end of tqInterface.c
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
There was a problem hiding this comment.
Pull request overview
This PR refactors and optimizes TMQ “query subscription” table-list update/tag-filtering logic (notably for STB subscriptions), including version-aware tag retrieval, plus related test/CI adjustments.
Changes:
- Refactor executor/vnode/tq APIs from TMQ-scanner naming to “QuerySub” and add
versionplumbing for tag-based filtering. - Add schema/type-mod persistence support via
schema_ext.dband make tag-fetch APIs version-aware. - Enable/extend TMQ taosx/alter-tag/update-tablelist test coverage and wire
tqInterface.cinto vnode build.
Reviewed changes
Copilot reviewed 51 out of 52 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| utils/test/c/tmq_ts7402.c | Updates expected TMQ meta JSON for TS-7402 test. |
| test/ci/cases.task | Enables test_tmq_taosx.py in CI task list. |
| test/cases/17-DataSubscription/02-Consume/test_tmq_update_tablelist.py | Adjusts tablelist-update subscription test flow and cleanup behavior. |
| test/cases/17-DataSubscription/02-Consume/test_tmq_taosx.py | Expands taosx TMQ validation (stb/db sub) and checks command execution results. |
| test/cases/17-DataSubscription/02-Consume/test_tmq_bugs.py | Adds debugflag setup for TS-7402 bug reproduction. |
| test/cases/17-DataSubscription/02-Consume/test_tmq_batch_alter_tag.py | Updates expected meta JSON for batch alter-tag case; modifies verification. |
| source/libs/executor/src/executor.c | Renames/update QuerySub tablelist APIs; threads version into tag filtering. |
| source/libs/executor/src/executil.c + inc/executil.h | Adds version to doFilterByTagCond; switches to version-aware tag fetch API. |
| include/libs/executor/storageapi.h + vnodeApi.c | Renames meta API hook to getTableTagsByUidVersion. |
| source/dnode/vnode/src/meta/* + inc/meta.h + inc/vnodeInt.h | Adds schema_ext.db, exposes schemasHasTypeMod, makes schema/tag retrieval version/ignore-exist aware. |
| source/dnode/vnode/src/tq/* + inc/tq.h | Refactors tq interfaces (moves logic into tqInterface.c, removes seek path, renames handle encode/decode/destroy). |
| source/client/src/* + source/client/inc/clientTmq.h | Splits TMQ client code into dedicated commit/conf/offset modules. |
| source/dnode/vnode/CMakeLists.txt | Removes tqSink/tqRead sources and adds tqInterface.c. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
代码审查报告
变更概述本 PR 围绕 TMQ STB(超级表)订阅的表列表管理进行重构与优化:
发现的问题🔴 [高危]
|
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 51 out of 52 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 50 out of 51 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Description
Issue(s)
Checklist
Please check the items in the checklist if applicable.