[PR #968] [MERGED] [Store] feat: store key-value data in buckets #1928

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

📋 Pull Request Information

Original PR: https://github.com/kvcache-ai/Mooncake/pull/968
Author: @zhuxinjie-nz
Created: 10/26/2025
Status: ✅ Merged
Merged: 10/31/2025
Merged by: @ykwd

Base: main ← Head: sequential-storage-dev


📝 Commits (10+)

  • c749715 [Store] feat: implement a SequentialStorageBackend to store key-value data in buckets for efficient data management and maintenance.
  • 754fa85 fix(store): The test directory for StorageBackendTest does not exist.
  • 80aca15 Store: Fix test data path issue in StorageBackendTest
  • 5b4c4e1 Store: Fix a memory leak issue in StorageBackendTest
  • 6653ffa Limit thread number in ci make to avoid ci failure out of not enough disk space
  • 33d43c2 Limit thread number in ci make to avoid ci failure out of not enough disk space
  • f08ef11 Remove previous build output to avoid ci failure out of not enough disk space
  • 20a79fc try to optimize ci disk space
  • f6d861c Store: Implement SharedMutex Thread Safety Analysis and apply it to StorageBackend
  • c25c9ad Store: Rename SequentialStorageBackend to BucketStorageBackend

📊 Changes

10 files changed (+1378 additions, -47 deletions)

View changed files

📝 .github/workflows/ci.yml (+9 -4)
📝 mooncake-store/include/mutex.h (+132 -3)
📝 mooncake-store/include/storage_backend.h (+190 -3)
📝 mooncake-store/include/types.h (+5 -0)
📝 mooncake-store/include/utils.h (+2 -0)
📝 mooncake-store/src/storage_backend.cpp (+543 -36)
📝 mooncake-store/src/utils.cpp (+6 -0)
📝 mooncake-store/tests/CMakeLists.txt (+2 -1)
➕ mooncake-store/tests/mutex_test.cpp (+176 -0)
➕ mooncake-store/tests/storage_backend_test.cpp (+313 -0)

📄 Description

Summary

Implement a SequentialStorageBackend to store key-value data in buckets for efficient data management and maintenance.

Motivation

  • Group KV data into buckets to avoid creating too many small files.
  • Add metadata support in file storage for KV data to enable LRU/LFU/creation-time-based eviction later.

Behavior & Compatibility

  • The SequentialStorageBackend currently supports only low-level bucket I/O and is not fully integrated into the pipeline. No impact on Mooncake in its current state.
  • The follow-up implementation approach is inconsistent with the current StorageBackend's design pattern.Key inconsistencies include:
    1. On write: create buckets by synchronizing the offloading queue with the master via a heartbeat mechanism, enabling better scalability for independently deployed clients and supporting high-availability client scenarios.
    2. On read: enable distributed read capability for bucket data via global metadata registration, coordinated through the Transfer Engine.

🔄 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/968 **Author:** [@zhuxinjie-nz](https://github.com/zhuxinjie-nz) **Created:** 10/26/2025 **Status:** ✅ Merged **Merged:** 10/31/2025 **Merged by:** [@ykwd](https://github.com/ykwd) **Base:** `main` ← **Head:** `sequential-storage-dev` --- ### 📝 Commits (10+) - [`c749715`](https://github.com/kvcache-ai/Mooncake/commit/c749715cf3d54a98a9161d8c36d60c739ab3eb5a) [Store] feat: implement a SequentialStorageBackend to store key-value data in buckets for efficient data management and maintenance. - [`754fa85`](https://github.com/kvcache-ai/Mooncake/commit/754fa85a8ddefb582e4933ce945ed7f629f4e9a9) fix(store): The test directory for StorageBackendTest does not exist. - [`80aca15`](https://github.com/kvcache-ai/Mooncake/commit/80aca15a53c8e70524df30605b8506eb1074508b) Store: Fix test data path issue in StorageBackendTest - [`5b4c4e1`](https://github.com/kvcache-ai/Mooncake/commit/5b4c4e1eb69276ac85910e7266683a8c9c266b7e) Store: Fix a memory leak issue in StorageBackendTest - [`6653ffa`](https://github.com/kvcache-ai/Mooncake/commit/6653ffaf7205dfd6ee75aa74d9d944d547014f6a) Limit thread number in ci make to avoid ci failure out of not enough disk space - [`33d43c2`](https://github.com/kvcache-ai/Mooncake/commit/33d43c26603472c60f921f61cd0196dcd35fa05f) Limit thread number in ci make to avoid ci failure out of not enough disk space - [`f08ef11`](https://github.com/kvcache-ai/Mooncake/commit/f08ef1105f2b2a85232f74d579e6b7c954a89e0d) Remove previous build output to avoid ci failure out of not enough disk space - [`20a79fc`](https://github.com/kvcache-ai/Mooncake/commit/20a79fcdecfc9766e764cd698fdf3ea643020353) try to optimize ci disk space - [`f6d861c`](https://github.com/kvcache-ai/Mooncake/commit/f6d861c42ad15101289ee324cf8a9c0adfe1b750) Store: Implement SharedMutex Thread Safety Analysis and apply it to StorageBackend - [`c25c9ad`](https://github.com/kvcache-ai/Mooncake/commit/c25c9adc3f2e43d9aa513f560a182e74c6eeff8b) Store: Rename SequentialStorageBackend to BucketStorageBackend ### 📊 Changes **10 files changed** (+1378 additions, -47 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/ci.yml` (+9 -4) 📝 `mooncake-store/include/mutex.h` (+132 -3) 📝 `mooncake-store/include/storage_backend.h` (+190 -3) 📝 `mooncake-store/include/types.h` (+5 -0) 📝 `mooncake-store/include/utils.h` (+2 -0) 📝 `mooncake-store/src/storage_backend.cpp` (+543 -36) 📝 `mooncake-store/src/utils.cpp` (+6 -0) 📝 `mooncake-store/tests/CMakeLists.txt` (+2 -1) ➕ `mooncake-store/tests/mutex_test.cpp` (+176 -0) ➕ `mooncake-store/tests/storage_backend_test.cpp` (+313 -0) </details> ### 📄 Description ### Summary Implement a SequentialStorageBackend to store key-value data in buckets for efficient data management and maintenance. ### Motivation - Group KV data into buckets to avoid creating too many small files. - Add metadata support in file storage for KV data to enable LRU/LFU/creation-time-based eviction later. ### Behavior & Compatibility - The SequentialStorageBackend currently supports only low-level bucket I/O and is not fully integrated into the pipeline. No impact on Mooncake in its current state. - The follow-up implementation approach is inconsistent with the current StorageBackend's design pattern.Key inconsistencies include: 1. On write: create buckets by synchronizing the offloading queue with the master via a heartbeat mechanism, enabling better scalability for independently deployed clients and supporting high-availability client scenarios. 2. On read: enable distributed read capability for bucket data via global metadata registration, coordinated through the Transfer Engine. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-29 21:31:27 +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#1928
No description provided.