Skip to content

Conversation

@guanshengliang
Copy link
Contributor

Description

Please briefly describe the code changes in this pull request.

Jira: https://jira.taosdata.com:18080/browse/TD-

Checklist

Please check the items in the checklist if applicable.

  • Is the user manual updated?
  • Are the test cases passed and automated?
  • Is there no significant decrease in test coverage?

Tony2h and others added 8 commits December 4, 2025 14:07
* fix(log): replace distutils.log with warnings for logging

* fix(logging): replace warnings.warn with print in TDLog class

* fix(log): replace print with warnings.warn in success method

* fix(tests): update grep command to include binary files for success check

* fix(tests): add space in grep command for consistency in success check

---------

Co-authored-by: WANG Xu <[email protected]>
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @guanshengliang, 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 series of updates from the 3.3.6 branch into the main development branch. The changes primarily focus on enhancing system table schemas by introducing a new is_ready status for vgroups and renaming a column in vnodes. It also refines the vnode synchronization and restoration mechanisms, modernizes Python test scripts by addressing deprecated imports, and expands the existing test suite with new data querying tests.

Highlights

  • System Table Schema Updates: The vgroups system table schema now includes an is_ready boolean column, and the restored column in the vnodes system table schema has been renamed to applied.
  • Vgroup Readiness Logic: New logic has been introduced to determine and expose the is_ready status for vgroups, based on the restoration state of both leader and follower nodes.
  • Sync Pipeline Simplification: The conditional logic for marking a synchronization node's restoration as complete has been streamlined, ensuring more precise state management.
  • Python Dependency Cleanup: Multiple Python test scripts have been updated to remove deprecated distutils.log imports, improving compatibility with newer Python versions.
  • Test Suite Expansion: A new pytest entry has been added to the CI configuration, specifically for testing ORDER BY functionality with select lists.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a 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 merges changes from the 3.3.6 release branch into main. The changes are diverse, including schema updates for system tables, logic adjustments for vgroup readiness and sync pipeline restoration, and cleanup of deprecated Python imports. Additionally, a new test case has been added and a test script has been updated.

My review has identified a potential logic bug in how a vgroup's "ready" state is determined, which could affect single-replica vgroups. I've also noted a possible typo in the path of a newly added test case in the CI configuration. Please see the detailed comments for suggestions.

}
}

if (isLeaderRestored && hasFollowerRestored) isReady = true;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The logic for determining if a vgroup is ready appears incorrect for single-replica vgroups. When pVgroup->replica == 1, hasFollowerRestored will always be false, causing isReady to be false even if the leader is restored. A single-replica vgroup should be considered ready if its only member (the leader) is restored.

    isReady = isLeaderRestored && (pVgroup->replica == 1 || hasFollowerRestored);

## 04-OrderBy
,,y,.,./ci/pytest.sh pytest cases/09-DataQuerying/04-OrderBy/test_orderby_double.py
,,y,.,./ci/pytest.sh pytest cases/09-DataQuerying/04-OrderBy/test_orderby_subquery.py
,,y,.,./ci/pytest.sh pytest cases/07-DataQuerying/04-OrderBy/test_order_by_select_list.py
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The path for the newly added test case, cases/07-DataQuerying/04-OrderBy/test_order_by_select_list.py, seems to use a different directory number (07-DataQuerying) compared to the surrounding tests which are in 09-DataQuerying. This might be a typo. Please verify if the path is correct. If it's a typo, it should probably be cases/09-DataQuerying/04-OrderBy/test_order_by_select_list.py.

,,y,.,./ci/pytest.sh pytest cases/09-DataQuerying/04-OrderBy/test_order_by_select_list.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants