-
Notifications
You must be signed in to change notification settings - Fork 5k
enh(stream): merge from main #33284
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
enh(stream): merge from main #33284
Conversation
Refactor test_subscribeDb0.py to improve readability and maintainability.
feat: unique getBuildPath invoke and ignore .git branch name contain …
* fix: test case * fix: exception desc
* enh(stream): add max wait config for stream batch request * enh: add runner low latency handling --------- Co-authored-by: Jinqing Kuang <[email protected]>
* docs: add error code prefix define introduct * docs: modify english docs * docs: remove show error code command * docs: add TDengine TSDB Error Code chapter * docs: remove tips area * docs: rename title to TDengine TSDB Business Error * docs: rename error code struct * Update docs/en/14-reference/09-error-code.md Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * Update docs/zh/14-reference/09-error-code.md Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * docs: linux error codes url link to chrom --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
…#33266) * chore(jdbc): update jdbc version * docs: add connection type descriptions in 05-connector * docs: add WebSocket error codes for C# connector * docs: add rust connector error codes * docs: modify conector and error code page --------- Co-authored-by: t_max <[email protected]> Co-authored-by: qevolg <[email protected]>
* enh: add wrapper hint * fix: build error * fix: build error for bit move * fix: update copyright to 2025 * fix: accept review advise for ci * fix: markdown blank remove * fix: restore 09-error-code.md from main branch
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 integrates a broad set of changes from the main development branch, primarily focusing on improving the clarity and maintainability of TDengine's documentation, enhancing the robustness of error handling mechanisms, and refining the core logic for stream processing. It also includes significant updates to the test suite to reflect these changes and ensure continued stability. Highlights
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request appears to be a large merge from the main branch, incorporating a wide variety of changes. Key updates include a significant refactoring of the documentation to centralize information on connectors and error codes, which improves maintainability. The REST connector seems to be deprecated in favor of WebSocket, and this is reflected in the documentation. The C/C++ codebase has received several critical bug fixes, addressing memory leaks and improving correctness. A new feature for low-latency stream processing has been added. Additionally, error handling for the client wrapper has been improved with user-friendly hints.
While the changes are largely positive, I've identified a critical security vulnerability in one of the new Java examples due to SQL injection risk. I've also noted a place in the stream processing logic where error handling could be made more transparent with a comment. Please see the specific comments for details.
For future merges, providing a summary of the key changes in the pull request description would be very helpful for reviewers, even for merge commits.
| @Update("drop stable if exists meters") | ||
| void dropTable(); | ||
|
|
||
| @Select("select count(*) from meters where tbname = '${tbname}'") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using string interpolation (${...}) in SQL queries is vulnerable to SQL injection. This is a critical security risk because it allows attackers to execute arbitrary SQL commands. You should use parameter binding (#{...}) instead, which lets MyBatis use prepared statements to safely substitute values.
| @Select("select count(*) from meters where tbname = '${tbname}'") | |
| @Select("select count(*) from meters where tbname = #{tbname}") |
| if (code == TSDB_CODE_PAR_TABLE_NOT_EXIST || code == TSDB_CODE_TDB_TABLE_NOT_EXIST){ | ||
| code = TDB_CODE_SUCCESS; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This logic swallows TABLE_NOT_EXIST errors and treats them as success. While this might be intentional for stream processing to be robust against dropped source tables, it can hide bugs where a table is unexpectedly missing. To improve maintainability and prevent future confusion, please add a comment explaining why this error is being safely ignored.
Description
Please briefly describe the code changes in this pull request.
Checklist
Please check the items in the checklist if applicable.