forked from kvcache-ai/Mooncake
-
Notifications
You must be signed in to change notification settings - Fork 0
Implement peer client #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
swallowCXY
wants to merge
24
commits into
P2P-Mooncake-Store
Choose a base branch
from
cxy/client_rpc
base: P2P-Mooncake-Store
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
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
[WIP]client rpc接口定义和data_manager初步实现
同步上游tiered backend 更新 + 更新data_manager UT
stub implementation and format change
clang-formatting
add lock contention test
Adhere to the clang-format coding style
Implement client rpc service
Added two test cases to verify that removing read locks from DataManager::Get and ReadRemoteData is safe: - ConcurrentGetAndDelete: Tests concurrent Get/Delete operations - HandleKeepsDataAliveAfterDelete: Verifies handle keeps data alive after deletion These tests validate that TieredBackend's internal locking and shared_ptr reference counting provide sufficient thread safety. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add tests for read lock removal safety verification
8a3f5d1 to
ca16744
Compare
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.
Description
Implemented the
PeerClientclass , supporting peer-to-peer RPC communication between clients for remote data read and write operations.Main Features:
coro_io::client_poolsto manage connection pools, supporting multiple endpointsMC_RPC_PROTOCOLenvironment variable)invoke_rpcandinvoke_batch_rpctemplate methods, providing a unified RPC call interface and error handlingRpcNameTraitsto provide RPC method names for easier logging and performance monitoringType of Change
How Has This Been Tested?
RPC call path is tested locally with the following test cases:
ConnectSuccess: Tests successful connection scenariosConnectInvalidEndpoint: Tests handling of invalid endpointsConnectTwice: Tests handling of duplicate connectionsReadRemoteDataSuccess: Tests remote data readingReadRemoteDataKeyNotFound: Tests error handling when a key does not existReadRemoteDataEmptyKey: Tests validation for empty key parametersReadRemoteDataEmptyBuffers: Tests validation for empty buffer parametersWriteRemoteDataSuccess: Tests remote data writingWriteRemoteDataEmptyKey: Test validation for writing with an empty keyWriteRemoteDataEmptyBuffers: Test validation for writing with empty buffersBatchReadRemoteDataSuccess: Test batch readingBatchReadRemoteDataKeyCountMismatch: Test batch reading with mismatched parametersBatchWriteRemoteDataSuccess: Test batch writingBatchWriteRemoteDataKeyCountMismatch: Test batch writing with mismatched parametersOperationsWithoutConnect: Test error handling when operations are performed without connectionTieredBackendandDataManagerfor integration testingcoro_rpc_serverin a separate thread to simulate the server[----------] 15 tests from PeerClientTest (1732 ms total)
[----------] Global test environment tear-down
[==========] 15 tests from 1 test suite ran. (1732 ms total)
[ PASSED ] 15 tests.
Checklist