Link Disconnection

Function Description

You can call the Disconnect API to disconnect and clean up communication links.

Scenario

When a node in the Prefill or Decode cluster is abnormal, you can clean up the abnormal link by disconnecting it. If the ratio of Prefill and Decode nodes in the cluster needs to be adjusted, disconnect the established links.

Example

Initiate a disconnection request on the client.

1
2
3
4
5
6
AscendString remote_engine = "ip:port"; // Replace it with the local engine of the target server.
auto ret = engine.Disconnect(remote_engine);
if (ret != SUCCESS) {
    printf("[ERROR] Disconnect failed, ret = %u\n", ret);
    return -1;
}

Exception Handling

For more troubleshooting methods, see HIXL Error Codes.