Skip to content

Dram pool merge#1032

Open
ayaka836 wants to merge 3 commits into
ModelEngine-Group:feature_26h1from
ayaka836:dram_pool_merge
Open

Dram pool merge#1032
ayaka836 wants to merge 3 commits into
ModelEngine-Group:feature_26h1from
ayaka836:dram_pool_merge

Conversation

@ayaka836

Copy link
Copy Markdown
Contributor

Purpose

Modifications

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

控制面流程
image

Test

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));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

: manager_id_(std::move(manager_id)) {
(void)parseManagerID(manager_id_, local_endpoint_);
control_ = std::make_shared<TcpControlPlane>();
(void)control_->init(ControlPlaneInitAttrs{});

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The constructor discards all init/listen errors with (void) , creating zombie objects — please either throw on failure or use an explicit Status init() .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants