Skip to content

feat(taosc): optimize encoder/decoder logic for SClientHbReq#34880

Merged
guanshengliang merged 6 commits into3.0from
feat/6861675093
Mar 21, 2026
Merged

feat(taosc): optimize encoder/decoder logic for SClientHbReq#34880
guanshengliang merged 6 commits into3.0from
feat/6861675093

Conversation

@wangmm0220
Copy link
Copy Markdown
Contributor

Description

Issue(s)

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?

Copilot AI review requested due to automatic review settings March 20, 2026 06:21
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR aims to optimize the SClientHbReq/SClientHbBatchReq encoding/decoding path (primarily by relying on tStartEncode/tEndEncode framing instead of extra length-calculation logic) and adds unit tests to cover codec + compatibility scenarios.

Changes:

  • Refactor SClientHbReq codec to use tStartEncode/tStartDecode framing and adjust fields being encoded/decoded.
  • Simplify SClientHbBatchReq codec loop by removing per-item pre-length computation / sub-decoder logic.
  • Add new GTest coverage for SClientHbBatchReq encode/decode and compatibility scenarios.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 7 comments.

File Description
source/common/src/msg/tmsg.c Refactors SClientHbReq/SClientHbBatchReq encoding/decoding logic and field layout.
source/common/test/tmsgTest.cpp Pulls new batch HB tests into the existing tmsgTest binary.
source/common/test/SClientHbBatchReq.cpp Adds new unit tests + “old/new” codec helpers for heartbeat batch compatibility.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings March 20, 2026 06:29
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@guanshengliang guanshengliang merged commit f38b839 into 3.0 Mar 21, 2026
10 of 14 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