Skip to content

Conversation

@guanshengliang
Copy link
Contributor

Description

Please briefly describe the code changes in this pull request.

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?

@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 changes from the 3.3.6 release branch into the main branch, focusing on two key areas: improving client connection metadata and refining internal arbiter group synchronization. It enables more detailed client-side connector information to be captured and monitored, while also enhancing the robustness and clarity of the arbiter's leader election and heartbeat mechanisms. Additionally, it includes a minor bug fix for data processing stability.

Highlights

  • Enhanced Client Connection Tracking: Introduced a new connection option (TSDB_OPTION_CONNECTION_CONNECTOR_INFO) allowing clients to provide detailed connector information. This data, along with the native version, is now tracked by the server, exposed via system tables, and included in client heartbeat requests.
  • Arbiter Group Synchronization Improvements: Refactored the arbiter group's leader assignment and acknowledgment logic by renaming fields for better clarity (dnodeId to assignedDnodeId, acked to assignAcked) and ensuring proper heartbeat timestamp initialization during decoding.
  • Documentation Updates: Updated both English and Chinese documentation for the C/C++ connector to reflect the new TSDB_OPTION_CONNECTION_CONNECTOR_INFO option and its usage, including maximum length specifications.
  • Minor Bug Fix: Added a null pointer check in tqRead.c to prevent potential crashes when processing row data, specifically when accessing pLastBlock->info.rows.
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 appears to be a merge from a release branch, incorporating several features and fixes. The main addition is the TSDB_OPTION_CONNECTION_CONNECTOR_INFO connection option, which is well-documented and tested. The PR also includes a valuable refactoring in the arbitrator group logic for improved clarity, and a critical bug fix in tqRead.c that prevents a potential null pointer dereference. Overall, the changes are positive and improve the codebase. I have one minor suggestion to correct a typo in a comment within a public header file.

TSDB_OPTION_CONNECTION_TIMEZONE, // timezone, Same as the scope supported by the system
TSDB_OPTION_CONNECTION_USER_IP, // user ip
TSDB_OPTION_CONNECTION_USER_APP, // user app, max lengthe is 23, truncated if longer than 23
TSDB_OPTION_CONNECTION_CONNECTOR_INFO, // connector info, max lengthe is 255, truncated if longer than 255
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

There's a typo in the comment. lengthe should be length. You may also want to correct the same typo on the preceding line.

  TSDB_OPTION_CONNECTION_CONNECTOR_INFO, // connector info, max length is 255, truncated if longer than 255

@guanshengliang guanshengliang merged commit 8152576 into main Nov 6, 2025
13 of 15 checks passed
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.

4 participants