[PR #374] [MERGED] [Store] Add features: lease and eviction #1523

Closed
opened 2026-10-29 21:28:10 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/kvcache-ai/Mooncake/pull/374
Author: @ykwd
Created: 5/16/2025
Status: ✅ Merged
Merged: 5/21/2025
Merged by: @stmatengss

Base: main ← Head: feature/lease_and_lru


📝 Commits (10+)

  • 6dcf81c [Store] New feature: lease and LRU eviction
  • 87797b1 Merge branch 'main' into feature/lease_and_lru
  • 7e1d783 Slightly adjust the ordering of the unit test cases
  • 5884888 Fix failed client_integration_test due to new the lease feature
  • 717fd04 Modify test_distributed_object_store.py: adjust unit test behaviour accordingly
  • e936ecc bugfix: don't evict objects whose put are still not complete
  • a31f80b Refactor the codes according to review comments
  • 953934d Add eviction related metrics in master;
  • 208cc94 Fix a typo
  • d8d33af Refactor some codes;

📊 Changes

13 files changed (+510 additions, -93 deletions)

View changed files

📝 doc/en/mooncake-store-preview.md (+14 -0)
📝 doc/zh/mooncake-store-preview.md (+14 -0)
📝 docs/source/design/mooncake-store-preview.md (+14 -0)
📝 mooncake-store/include/master_metric_manager.h (+10 -0)
📝 mooncake-store/include/master_service.h (+46 -3)
📝 mooncake-store/include/rpc_service.h (+3 -2)
📝 mooncake-store/include/types.h (+3 -0)
📝 mooncake-store/src/master.cpp (+17 -4)
📝 mooncake-store/src/master_metric_manager.cpp (+21 -0)
📝 mooncake-store/src/master_service.cpp (+156 -76)
📝 mooncake-store/tests/client_integration_test.cpp (+5 -0)
📝 mooncake-store/tests/master_service_test.cpp (+191 -2)
📝 mooncake-wheel/tests/test_distributed_object_store.py (+16 -6)

📄 Description

Object eviction: When the buffer is full, all subsequent put requests will fail. To avoid this, we propose to make the system monitor the buffer usage. When it is full, an eviction task will be triggered to free some space. Currently, an LRU-like eviction strategy is used to select the victims. In the future, we may support various eviction strategies based on user configuration.

Lease: Due to remove requests or eviction tasks, an object may be erased from the buffer while it is still read by a client. This may result in severe problems. So we propose to add a lease to an object whenever it gets a read request from the client. The object is guaranteed to remain intact as long as the lease has not expired.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/kvcache-ai/Mooncake/pull/374 **Author:** [@ykwd](https://github.com/ykwd) **Created:** 5/16/2025 **Status:** ✅ Merged **Merged:** 5/21/2025 **Merged by:** [@stmatengss](https://github.com/stmatengss) **Base:** `main` ← **Head:** `feature/lease_and_lru` --- ### 📝 Commits (10+) - [`6dcf81c`](https://github.com/kvcache-ai/Mooncake/commit/6dcf81ca6bdded98acd1767150f7e2810ce4c748) [Store] New feature: lease and LRU eviction - [`87797b1`](https://github.com/kvcache-ai/Mooncake/commit/87797b1b6ac5ecade3881a2f79e24dafb9bf6bb5) Merge branch 'main' into feature/lease_and_lru - [`7e1d783`](https://github.com/kvcache-ai/Mooncake/commit/7e1d783dba9547db4ec545a75bd6771f65efb24d) Slightly adjust the ordering of the unit test cases - [`5884888`](https://github.com/kvcache-ai/Mooncake/commit/5884888fff7c8b9bf39aceb40fff28f42e1215cb) Fix failed client_integration_test due to new the lease feature - [`717fd04`](https://github.com/kvcache-ai/Mooncake/commit/717fd0483cd123a2f2e74813e4a97b47c12ea251) Modify test_distributed_object_store.py: adjust unit test behaviour accordingly - [`e936ecc`](https://github.com/kvcache-ai/Mooncake/commit/e936ecc8b2d8dffe7be11fcafeb876a35f8eec3e) bugfix: don't evict objects whose put are still not complete - [`a31f80b`](https://github.com/kvcache-ai/Mooncake/commit/a31f80b5eaaa091bbb7b85b95106b57d427a6cda) Refactor the codes according to review comments - [`953934d`](https://github.com/kvcache-ai/Mooncake/commit/953934d39a2bccb6baeea1e5aefab85b1a2e7da7) Add eviction related metrics in master; - [`208cc94`](https://github.com/kvcache-ai/Mooncake/commit/208cc9428255e074e052640f498e897ebc5a4542) Fix a typo - [`d8d33af`](https://github.com/kvcache-ai/Mooncake/commit/d8d33af64edb61b4f558a05f0fe0677dd404dc81) Refactor some codes; ### 📊 Changes **13 files changed** (+510 additions, -93 deletions) <details> <summary>View changed files</summary> 📝 `doc/en/mooncake-store-preview.md` (+14 -0) 📝 `doc/zh/mooncake-store-preview.md` (+14 -0) 📝 `docs/source/design/mooncake-store-preview.md` (+14 -0) 📝 `mooncake-store/include/master_metric_manager.h` (+10 -0) 📝 `mooncake-store/include/master_service.h` (+46 -3) 📝 `mooncake-store/include/rpc_service.h` (+3 -2) 📝 `mooncake-store/include/types.h` (+3 -0) 📝 `mooncake-store/src/master.cpp` (+17 -4) 📝 `mooncake-store/src/master_metric_manager.cpp` (+21 -0) 📝 `mooncake-store/src/master_service.cpp` (+156 -76) 📝 `mooncake-store/tests/client_integration_test.cpp` (+5 -0) 📝 `mooncake-store/tests/master_service_test.cpp` (+191 -2) 📝 `mooncake-wheel/tests/test_distributed_object_store.py` (+16 -6) </details> ### 📄 Description Object eviction: When the buffer is full, all subsequent put requests will fail. To avoid this, we propose to make the system monitor the buffer usage. When it is full, an eviction task will be triggered to free some space. Currently, an LRU-like eviction strategy is used to select the victims. In the future, we may support various eviction strategies based on user configuration. Lease: Due to remove requests or eviction tasks, an object may be erased from the buffer while it is still read by a client. This may result in severe problems. So we propose to add a lease to an object whenever it gets a read request from the client. The object is guaranteed to remain intact as long as the lease has not expired. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-29 21:28:10 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
kvcache-ai/Mooncake#1523
No description provided.