merge: from 3.3.6 to 3.3.8 - #34477
Conversation
Summary of ChangesHello @wangmm0220, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly refactors and enhances the Time-series Message Queue (TMQ) system's ability to manage and filter tables based on tag conditions. It introduces a more modular approach to handling table list updates, separating add, delete, and comprehensive update operations. A key improvement is the robust integration with Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Pull request overview
This pull request merges changes from version 3.3.6 to 3.3.8, focusing on improving TMQ (TDengine Message Queue) table list management when tags are altered. The changes refactor the table update mechanism to better handle scenarios where tag values change, which affects topic subscriptions with tag-based filtering.
Changes:
- Refactored TMQ table list management to split operations into separate add, update, and delete functions
- Added new test cases for TMQ behavior when tags are frequently altered
- Optimized tag filtering logic to avoid unnecessary reprocessing and improve performance
Reviewed changes
Copilot reviewed 13 out of 14 changed files in this pull request and generated 21 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/system-test/7-tmq/tmq_alter_tag_frequency.py | New test for TMQ behavior with frequent tag alterations |
| test/cases/17-DataSubscription/02-Consume/test_tmq_update_tablelist.py | New test for table list updates in TMQ subscriptions |
| tests/parallel_test/cases.task | Added new test case to parallel test suite |
| test/ci/cases.task | Added new test case to CI pipeline |
| source/libs/executor/src/executor.c | Refactored table list management - split single function into add/delete/update operations |
| source/libs/executor/src/executil.c | Refactored tag filtering logic with optimizations for tbname conditions |
| source/libs/executor/inc/executil.h | Updated function signatures for tag filtering |
| source/dnode/vnode/src/vnd/vnodeSvr.c | Updated function calls to use new split API and added alterTagForTmq helper |
| source/dnode/vnode/src/tq/tqRead.c | Major refactoring - split tqUpdateTbUidList into three functions |
| source/dnode/vnode/src/tq/tqPush.c | Changed log level from debug to info |
| source/dnode/vnode/src/meta/metaQuery.c | Added optimization to skip already-fetched tag values |
| source/dnode/vnode/src/inc/vnodeInt.h | Updated function signatures for new split API |
| source/client/src/clientTmq.c | Added periodic logging for vgroup skip counts |
| include/libs/executor/executor.h | Public API updates for table list management |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Code Review
This pull request introduces a significant refactoring of the TMQ table list update mechanism, primarily to support dynamic updates when table tags are altered. The changes are well-structured, separating the logic for adding, deleting, and updating table lists into distinct functions, which improves clarity and maintainability. The implementation for ALTER TAG handling includes optimizations to only re-evaluate tables when necessary. I've also noticed and appreciate the inclusion of important memory leak fixes and new test cases for this new functionality.
I have a few minor suggestions for improvement regarding an outdated comment, use of a magic number, and a note on error handling logic that could lead to inconsistencies. Overall, this is a solid set of changes for a complex feature.
Description
Issue(s)
Checklist
Please check the items in the checklist if applicable.