Skip to content

Conversation

@WenyXu
Copy link
Member

@WenyXu WenyXu commented Oct 22, 2025

I hereby agree to the terms of the GreptimeDB CLA.

Refer to a related PR or issue link (optional)

#7021

What's changed and what's your intention?

This PR refactors the instruction handler of datanode and adds support for batch region downgrade operations, as preparatory work for batch region migration.

Key Changes

  • Renamed Instruction::DowngradeRegion to Instruction::DowngradeRegions with Vec<DowngradeRegion> support
  • Renamed InstructionReply::DowngradeRegion to InstructionReply::DowngradeRegions with Vec<DowngradeRegionReply> return type
  • Added region_id field to DowngradeRegionReply for identifying individual responses in batch operations
  • Implemented parallel processing of multiple region downgrades using join_all
  • Updated all related tests and mock utilities to work with the new batch format

PR Checklist

Please convert it to a draft if some of the following conditions are not met.

  • I have written the necessary rustdoc comments.
  • I have added the necessary unit tests and integration tests.
  • This PR requires documentation updates.
  • API changes are backward compatible.
  • Schema or data changes are backward compatible.

@github-actions github-actions bot added size/L docs-not-required This change does not impact docs. labels Oct 22, 2025
Signed-off-by: WenyXu <wenymedia@gmail.com>
Signed-off-by: WenyXu <wenymedia@gmail.com>
Signed-off-by: WenyXu <wenymedia@gmail.com>
@WenyXu WenyXu force-pushed the downgrade_regions branch from f8b5d38 to 933e5fc Compare October 23, 2025 03:23
@github-actions github-actions bot added size/XL and removed size/L labels Oct 23, 2025
Signed-off-by: WenyXu <wenymedia@gmail.com>
Signed-off-by: WenyXu <wenymedia@gmail.com>
@WenyXu WenyXu requested a review from fengjiachun October 23, 2025 07:25
@WenyXu WenyXu marked this pull request as ready for review October 23, 2025 07:31
@WenyXu WenyXu requested review from a team and MichaelScofield as code owners October 23, 2025 07:31
Signed-off-by: WenyXu <wenymedia@gmail.com>
Copy link
Collaborator

@fengjiachun fengjiachun left a comment

Choose a reason for hiding this comment

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

Rest LGTM

@MichaelScofield MichaelScofield added this pull request to the merge queue Oct 24, 2025
Merged via the queue into GreptimeTeam:main with commit 7da2f5e Oct 24, 2025
78 of 79 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs-not-required This change does not impact docs. size/XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants