-
Notifications
You must be signed in to change notification settings - Fork 287
feat(store): add batch exist support for master #542
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for batch existence checks for keys in both server and client code (including a Python interface), which will help reduce latency in high-volume key lookup scenarios. Key changes include:
- Introducing new methods BatchExistKey/BatchIsExist in MasterService, MasterClient, Client, and their respective tests.
- Updating related RPC and Python binding interfaces to accommodate batch exist operations.
- Formatting changes and minor improvements, such as additional key parameter validation.
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
mooncake-wheel/tests/test_distributed_object_store.py | Added test for batch is_exist operations. |
mooncake-store/tests/master_service_test.cpp | New tests for BatchExistKey and formatting updates. |
mooncake-store/tests/client_integration_test.cpp | Added and updated tests for batch is_exist operations. |
mooncake-store/src/master_service.cpp | Added BatchExistKey and enhanced PutStart validation. |
mooncake-store/src/master_client.cpp | Implemented BatchExistKey with proper error handling and logging. |
mooncake-store/src/client.cpp | Added BatchIsExist method with duplicate-check validation. |
mooncake-store/include/rpc_service.h | Introduced new structure and handler for BatchExistKey. |
mooncake-store/include/master_service.h, master_client.h, client.h | Updated headers with new batch exist API declarations. |
mooncake-integration/store/store_py.h, store_py.cpp | Added Python binding for batch exist functionality. |
Comments suppressed due to low confidence (1)
mooncake-store/include/rpc_service.h:100
- The structure name 'BatchExistReponse' appears to be misspelled. Consider renaming it to 'BatchExistResponse' for improved clarity and consistency with common naming conventions.
struct BatchExistReponse {
Signed-off-by: Jinyang Su <[email protected]>
84ce245
to
3284749
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work. This pr looks good to me. By the way, since there are many API changes recently, are our docs already obsolete?
I have implemented a similar interface here: #511 |
This change is in preparation for future optimizations like LMCache/LMCache#891. The LMCache scheduler often checks the existence of many keys at once, and using this new interface can significantly reduce latency for those lookups.
Upcoming TODO:
Add support for meta-only clients (which don't need to interact with the actual data).