Dram pool merge#1032
Open
ayaka836 wants to merge 3 commits into
Open
Conversation
yuanzhg078
reviewed
Jun 17, 2026
Comment on lines
+187
to
+206
| Status TcpControlPlane::connectPeer(const ManagerID& manager_id, | ||
| const ControlEndpoint& endpoint, | ||
| MetadataExchangeHandler metadata_request_handler) { | ||
| TcpControlPlane channel; | ||
| auto status = channel.connect(endpoint); | ||
| if (status != Status::Ok) { | ||
| return status; | ||
| } | ||
|
|
||
| status = SendControlHello(channel.impl_->socket, impl_->endpoint); | ||
| if (status != Status::Ok) { | ||
| channel.close(); | ||
| return status; | ||
| } | ||
|
|
||
| status = addPeer(manager_id, std::move(channel)); | ||
| if (status != Status::Ok) { | ||
| return status; | ||
| } | ||
| status = startPeerReceive(manager_id, std::move(metadata_request_handler)); |
Contributor
There was a problem hiding this comment.
The startPeerReceive function is invoked twice consecutively with identical arguments; the second call is redundant and should be removed to avoid unintended side effects or resource conflicts.
4387724 to
a967e45
Compare
yuanzhg078
reviewed
Jun 17, 2026
| : manager_id_(std::move(manager_id)) { | ||
| (void)parseManagerID(manager_id_, local_endpoint_); | ||
| control_ = std::make_shared<TcpControlPlane>(); | ||
| (void)control_->init(ControlPlaneInitAttrs{}); |
Contributor
There was a problem hiding this comment.
The constructor discards all init/listen errors with (void) , creating zombie objects — please either throw on failure or use an explicit Status init() .
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Purpose
Modifications
transport部分代码

p2p: add core transport interfaces:基类和部分通用函数定义
p2p: add transport manager:北向接口类transport manager实现
control: add tcp control plane:tcp控制面实现
manager交互流程
控制面流程

Test