Skip to content

feature: console supports creation and modification of transaction groups for Raft clusters#7878

Merged
funky-eyes merged 24 commits intoapache:2.xfrom
funky-eyes:20251218
Dec 22, 2025
Merged

feature: console supports creation and modification of transaction groups for Raft clusters#7878
funky-eyes merged 24 commits intoapache:2.xfrom
funky-eyes:20251218

Conversation

@funky-eyes
Copy link
Contributor

Ⅰ. Describe what this PR did

raft cluster:
image

other cluster:
image

change vgroup
other cluster -> raft cluster
image

raft cluster -> other cluster
image

Ⅱ. Does this pull request fix one issue?

Ⅲ. Why don't you add test cases (unit test/integration test)?

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

@codecov
Copy link

codecov bot commented Dec 19, 2025

Codecov Report

❌ Patch coverage is 75.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 71.06%. Comparing base (d22e883) to head (a473ff2).
⚠️ Report is 4 commits behind head on 2.x.

Files with missing lines Patch % Lines
...ata/server/controller/VGroupMappingController.java 75.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##                2.x    #7878      +/-   ##
============================================
+ Coverage     71.03%   71.06%   +0.03%     
  Complexity      797      797              
============================================
  Files          1300     1300              
  Lines         49601    49602       +1     
  Branches       5871     5873       +2     
============================================
+ Hits          35233    35250      +17     
+ Misses        11455    11441      -14     
+ Partials       2913     2911       -2     
Files with missing lines Coverage Δ
...ata/server/controller/VGroupMappingController.java 95.45% <75.00%> (+85.93%) ⬆️

... and 12 files with indirect coverage changes

Impacted file tree graph

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
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 adds console support for creating and modifying transaction groups (vgroups) for Raft clusters in the naming server. The changes extend the V2 API to distinguish between RAFT and default cluster types, allowing unit-specific vgroup management for RAFT clusters while maintaining backward compatibility with other cluster types.

Key Changes:

  • Enhanced the V2 namespace API to include cluster type, units, and unit-specific vgroup information
  • Added logic to automatically select a unit when creating/changing vgroups in RAFT clusters
  • Updated frontend components to display and manage unit selection for RAFT clusters
  • Refactored the NamespaceData class from inner class to standalone BO class

Reviewed changes

Copilot reviewed 15 out of 16 changed files in this pull request and generated 14 comments.

Show a summary per file
File Description
namingserver/src/main/java/org/apache/seata/namingserver/manager/NamingManager.java Core logic for handling vgroup operations with RAFT cluster support, including automatic unit selection and namespace data collection enhancements
namingserver/src/main/java/org/apache/seata/namingserver/entity/vo/v2/NamespaceVO.java Changed from Map<String, List> to Map<String, ClusterVO> to support richer cluster metadata
namingserver/src/main/java/org/apache/seata/namingserver/entity/vo/v2/ClusterVO.java New VO class containing vgroups, units, unitVgroups map, and cluster type information
namingserver/src/main/java/org/apache/seata/namingserver/entity/bo/NamespaceData.java Extracted inner helper class to standalone BO with added unitVgroupsMap for unit-level vgroup tracking
namingserver/src/test/java/org/apache/seata/namingserver/NamingManagerTest.java Updated assertions to work with new ClusterVO structure instead of direct vgroup lists
namingserver/src/test/java/org/apache/seata/namingserver/NamingControllerV2Test.java Updated test to verify ClusterVO structure including units and vgroups
namingserver/src/main/resources/application.yml Removed trailing blank line (formatting)
namingserver/pom.xml Added explicit maven-compiler-plugin configuration for Java 8
console/src/main/resources/static/console-fe/src/service/transactionInfo.ts Changed HTTP method to POST with form-urlencoded data and added qs import for parameter serialization
console/src/main/resources/static/console-fe/src/service/clusterManager.ts Added changeGroup function (but with incorrect request format)
console/src/main/resources/static/console-fe/src/reducers/locale.ts Changed locale type from ILocale to any to accommodate dynamic structure
console/src/main/resources/static/console-fe/src/pages/TransactionInfo/TransactionInfo.tsx Major updates to support unit selection in vgroup create/change dialogs based on cluster type
console/src/main/resources/static/console-fe/src/pages/GlobalLockInfo/GlobalLockInfo.tsx Updated to parse new ClusterVO structure from namespace API response
console/src/main/resources/static/console-fe/src/pages/ClusterManager/ClusterManager.tsx Updated to handle clusterTypes in namespace options
console/src/main/resources/static/console-fe/src/module.d.ts Changed GlobalProps locale type from ILocale to any
console/src/main/resources/static/console-fe/src/app.tsx Fixed setState to use functional form with prevState

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

funky-eyes and others added 11 commits December 21, 2025 20:01
…er/NamingManager.java

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…er/NamingManager.java

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…Manager/ClusterManager.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…tionInfo/TransactionInfo.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…tionInfo/TransactionInfo.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…er/NamingManager.java

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…er/NamingManager.java

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
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 16 out of 17 changed files in this pull request and generated 11 comments.


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

funky-eyes and others added 4 commits December 21, 2025 21:06
…tionInfo/TransactionInfo.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…erManager.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…Manager/ClusterManager.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@funky-eyes funky-eyes added type: feature Category issues or prs related to feature request. module/console labels Dec 22, 2025
@funky-eyes funky-eyes added this to the 2.6.0 milestone Dec 22, 2025
@funky-eyes funky-eyes changed the title [WIP]feature: console supports creation and modification of transaction groups for Raft clusters feature: console supports creation and modification of transaction groups for Raft clusters Dec 22, 2025
Copy link
Member

@xingfudeshi xingfudeshi left a comment

Choose a reason for hiding this comment

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

LGTM

@funky-eyes funky-eyes merged commit 5219ca3 into apache:2.x Dec 22, 2025
8 checks passed
YvCeung pushed a commit to YvCeung/incubator-seata that referenced this pull request Dec 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module/console module/namingserver type: feature Category issues or prs related to feature request.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants