zchuango opened a new pull request, #3645: URL: https://github.com/apache/brpc/pull/3645
### What problem does this PR solve? Issue Number: N/A Related Discussion: https://github.com/apache/brpc/discussions/3432 Related PR: https://github.com/apache/brpc/pull/3535 Problem Summary: PR #3535 introduces the common transport-level handshake framework and migrates RDMA and UBSHM to it. This PR extends the same framework to URMA. URMA previously managed TCP handshake I/O, framing, negotiation, state transitions and fallback inside its endpoint. Moving this orchestration into AdapterTransport gives the high-speed transports a consistent connection setup flow, while URMA retains ownership of its resources and data-plane operations. ### What is changed and the side effects? Changed: Handshake integration: - Add the URMA adapter to the common handshake framework. - Support the existing binary v2 (`URMA`) and protobuf v3 (`URM3`) wire formats. - Use the common session for negotiation, activation and TCP fallback. - Preserve disabled-Hello and disabled-ACK behavior for legacy peers and TCP-only servers. - Start CQ callbacks after the final ACK has been consumed and the TCP handshake parser has returned. URMA data-plane updates: - Configure standalone bonding and import the peer segment before its Jetty. - Apply placement and completion ordering to payload and credit SENDs. - Limit each CTP SEND to 4096 bytes and split larger RPCs across multiple WRs. - Retain the default 8192-byte buffer blocks. - Pin the main Socket before CQ callbacks access the endpoint. - Synchronize CQ dispatch with resource teardown and reject callbacks from an earlier reset generation. - Add bounded stream tracing and update the Chinese and English documentation. Side effects: - URMA connection setup uses the common AdapterTransport handshake. - Existing URMA v2/v3 wire formats remain compatible. - Resource unavailability or declined negotiation selects TCP. - Malformed handshake frames and established URMA transport errors close the connection. ### Validation Automated tests: - URMA: 59 tests; TCP fallback: 8 tests. - Common handshake: 28 tests; RDMA: 92 tests; UBSHM: 43 tests. - Legacy/common interoperability, final-ACK handoff and CQ lifecycle tests passed 100 shuffled repetitions with the mock provider. - CQ lifecycle tests also passed 100 shuffled repetitions under AddressSanitizer. - Large-attachment tests verify response contents byte-for-byte across event/polling and copy/zero-copy modes. - TCP-only fallback tests, Release library build/install and performance-example builds passed. Hardware tests: - Two-node v3 common-handshake tests using bonding_dev_0 in standalone mode. - Covered event/polling × copy/zero-copy. - Each run used 4 workers, queue depth 16, 128-byte echoed attachments and a 180-second duration. - Restarted the server during client traffic. - All four combinations recovered to approximately 1000 QPS, with cumulative error counts stabilizing after recovery. - Completion, import, protocol parsing, FATAL and TCP fallback log searches returned no matches. Development PR CI: all 24 checks passed at 91bf2d1f. ### Check List - [x] Build and run related regression tests. - [x] Add handshake compatibility, fallback and concurrent teardown tests. - [x] Update documentation and validate on URMA hardware. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
