-
Notifications
You must be signed in to change notification settings - Fork 434
Refactor the kvcache backend to support infinistore #1037
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
Refactor the kvcache backend to support infinistore #1037
Conversation
Signed-off-by: Jiaxin Shan <seedjeffwan@gmail.com>
Signed-off-by: Jiaxin Shan <seedjeffwan@gmail.com>
Signed-off-by: Jiaxin Shan <seedjeffwan@gmail.com>
Signed-off-by: Jiaxin Shan <seedjeffwan@gmail.com>
Signed-off-by: Jiaxin Shan <seedjeffwan@gmail.com>
2dfaaad
to
c47eaf5
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.
Pull Request Overview
This PR refactors the kvcache backend to support infinistore by replacing the centralized/distributed controller with a KVBackendReconciler interface, building a common abstract DistributedReconciler for HPKV and Infinistore, and adding comprehensive test coverage and refactored common helpers.
- Removed centralized and distributed controller logic and replaced it with a per-backend reconciler design.
- Introduced a new DistributedReconciler, updated interfaces, and refactored helper functions and constants.
- Added extensive test cases for annotation processing, backend validation, and resource construction for each supported backend.
Reviewed Changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
pkg/utils/annotations.go & annotations_test.go | Added helper functions to extract annotations and tests verifying their correctness. |
pkg/controller/kvcache/kvcache_controller.go | Refactored the controller logic to derive the backend dynamically and delegate reconciliation to backend-specific handlers. |
pkg/controller/kvcache/backends/* | Introduced separate backend modules for Vineyard, HPKV, and Infinistore with their corresponding tests. |
pkg/constants/kvcache.go | Updated constants to support the new backend names and refactored labeling conventions. |
Other test files (e.g. infinistore_test.go, hpkv_test.go, distributed_test.go, common_test.go) | Added new test cases for validating the construction and reconciliation of backend-specific resources. |
c47eaf5
to
e9fbd4b
Compare
Signed-off-by: Jiaxin Shan <seedjeffwan@gmail.com>
e9fbd4b
to
fcda7cf
Compare
Signed-off-by: Jiaxin Shan <seedjeffwan@gmail.com>
Signed-off-by: Jiaxin Shan <seedjeffwan@gmail.com>
Signed-off-by: Jiaxin Shan <seedjeffwan@gmail.com>
8a2b32e
to
930deba
Compare
I will merge this change to unblock another one. If someone has more feedback, please left comment here and I will address them in next PR |
* Remove predicates and prepare for deletion event handling * Add kvcache backend package * Refactor orchestration logic to kvcache backends * Further abstract the distributed reconciler * Add KVBackend Concept for extensibility * Support kv cache backend in watcher * Fix unit tests from last change * Fix service port mapping issues --------- Signed-off-by: Jiaxin Shan <seedjeffwan@gmail.com>
Pull Request Description
Related Issues
Resolves: part of #948
Important: Before submitting, please complete the description above and review the checklist below.
Contribution Guidelines (Expand for Details)
We appreciate your contribution to aibrix! To ensure a smooth review process and maintain high code quality, please adhere to the following guidelines:
Pull Request Title Format
Your PR title should start with one of these prefixes to indicate the nature of the change:
[Bug]
: Corrections to existing functionality[CI]
: Changes to build process or CI pipeline[Docs]
: Updates or additions to documentation[API]
: Modifications to aibrix's API or interface[CLI]
: Changes or additions to the Command Line Interface[Misc]
: For changes not covered above (use sparingly)Note: For changes spanning multiple categories, use multiple prefixes in order of importance.
Submission Checklist
By submitting this PR, you confirm that you've read these guidelines and your changes align with the project's contribution standards.