Skip to content

[fix,refactor] Merge update_data_status thread/socket into request_handle to eliminate concurrency conflicts#116

Merged
0oshowero0 merged 5 commits into
Ascend:mainfrom
dodatboii:merge_controller_threads
Jun 5, 2026
Merged

[fix,refactor] Merge update_data_status thread/socket into request_handle to eliminate concurrency conflicts#116
0oshowero0 merged 5 commits into
Ascend:mainfrom
dodatboii:merge_controller_threads

Conversation

@dodatboii

@dodatboii dodatboii commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Previously, _update_data_status and _process_request ran on two separate threads listening on two different ROUTER sockets. When used in async frameworks, NOTIFY_DATA_UPDATE and metadata requests (GET_META, CLEAR_META, etc.) could interleave and cause data processing conflicts on shared partition state.

This change consolidates everything onto request_handle_socket and the single _process_request thread, so all controller requests are serialized naturally:

  • Drop data_status_update_socket and its port; ZMQServerInfo.ports now exposes only handshake_socket and request_handle_socket.
  • Remove _start_process_update_data_status and _update_data_status; move the NOTIFY_DATA_UPDATE branch into _process_request.
  • Remove data_status_lock logics.
  • Update storage manager to send NOTIFY_DATA_UPDATE to request_handle_socket.
  • Clean up data_status_update_socket port entries in test fixtures.

Note: this is a breaking change to the controller-storage wire protocol (port name removed). All storage managers must be upgraded together.

…r to eliminate concurrency conflicts

Previously, _update_data_status and _process_request ran on two separate
threads listening on two different ROUTER sockets. When used in async
frameworks, NOTIFY_DATA_UPDATE and metadata requests (GET_META, CLEAR_META,
etc.) could interleave and cause data processing conflicts on shared
partition state.

This change consolidates everything onto request_handle_socket and the
single _process_request thread, so all controller requests are serialized
naturally:
- Drop data_status_update_socket and its port; ZMQServerInfo.ports now
  exposes only handshake_socket and request_handle_socket.
- Remove _start_process_update_data_status and _update_data_status; move
  the NOTIFY_DATA_UPDATE branch into _process_request.
- Update storage manager to send NOTIFY_DATA_UPDATE to request_handle_socket.
- Clean up data_status_update_socket port entries in test fixtures.

Note: this is a breaking change to the controller-storage wire protocol
(port name removed). All storage managers must be upgraded together.

Signed-off-by: yxstev <zhangyixiang9@huawei.com>
@ascend-robot

Copy link
Copy Markdown

CLA Signature Pass

dodatboii, thanks for your pull request. All authors of the commits have signed the CLA. 👍

Signed-off-by: yxstev <zhangyixiang9@huawei.com>
@ascend-robot

Copy link
Copy Markdown

CLA Signature Pass

dodatboii, thanks for your pull request. All authors of the commits have signed the CLA. 👍

Signed-off-by: yxstev <zhangyixiang9@huawei.com>
@ascend-robot

Copy link
Copy Markdown

CLA Signature Pass

dodatboii, thanks for your pull request. All authors of the commits have signed the CLA. 👍

Signed-off-by: yxstev <zhangyixiang9@huawei.com>
@ascend-robot

Copy link
Copy Markdown

CLA Signature Pass

dodatboii, thanks for your pull request. All authors of the commits have signed the CLA. 👍

Signed-off-by: yxstev <zhangyixiang9@huawei.com>
@ascend-robot

Copy link
Copy Markdown

CLA Signature Pass

dodatboii, thanks for your pull request. All authors of the commits have signed the CLA. 👍

@0oshowero0 0oshowero0 changed the title [refactor] Merge data status update thread/socket into request handler to eliminate concurrency conflicts [fix,refactor] Merge update_data_status thread/socket into request_handle to eliminate concurrency conflicts Jun 5, 2026
@0oshowero0 0oshowero0 merged commit 170b8ed into Ascend:main Jun 5, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants