Feature/cpm server endpoints #7812
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Ⅰ. Describe what this PR did
Endpoint Exposure
1. Server-Side Monitoring Data Endpoints
1) Modifications
server/src/main/java/org/apache/seata/server/config/ServerConfig.javaPurpose: Provides the key component configurations required for server-side connection-pool monitoring.
2)Newly Added
server/src/main/java/org/apache/seata/server/controller/ConnectionPoolController.javaPurpose: Provides REST API endpoints for retrieving and updating connection-pool metrics.
These APIs are consumed by the frontend service.
server/src/main/java/org/apache/seata/server/metrics/ConnectionPoolService.javaPurpose: Provides the server-side implementation for retrieving connection-pool metrics.
It obtains cached metrics from
ConnectionPoolInfoCacheand returns them to callers.Supporting classes:
server/src/main/java/org/apache/seata/server/common/HttpClient.javacore/src/main/java/org/apache/seata/core/model/ApiResponse.javacore/src/main/java/org/apache/seata/core/model/PoolConfigUpdateRequest.javaVO
server/src/main/java/org/apache/seata/server/metrics/vo/ConnectionPoolConfigVO.java2.Client-Side Configuration Update Endpoint
1)Newly Added
seata-spring-autoconfigure/seata-spring-autoconfigure-client/src/main/java/org/apache/seata/spring/boot/autoconfigure/controller/ClientConnectionPoolController.javaPurpose: Provides connection-pool configuration update endpoints on the client side.
These APIs are invoked by the Seata server.
Ⅱ. Does this pull request fix one issue?
Yes, it fix #7575
Ⅴ. Special notes for reviews