[PR #778] [MERGED] [Store] Check If Get Completed Within Lease #1817

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

📋 Pull Request Information

Original PR: https://github.com/kvcache-ai/Mooncake/pull/778
Author: @ykwd
Created: 8/22/2025
Status: ✅ Merged
Merged: 9/24/2025
Merged by: @ykwd

Base: main ← Head: dev/read-timeout


📝 Commits (10+)

📊 Changes

24 files changed (+783 additions, -271 deletions)

View changed files

📝 doc/en/mooncake-store.md (+3 -1)
📝 doc/zh/mooncake-store.md (+3 -1)
📝 docs/source/design/mooncake-store.md (+4 -1)
📝 mooncake-store/include/client.h (+45 -21)
📝 mooncake-store/include/master_client.h (+4 -3)
📝 mooncake-store/include/master_config.h (+53 -0)
📝 mooncake-store/include/master_service.h (+2 -9)
📝 mooncake-store/include/rpc_service.h (+3 -2)
➕ mooncake-store/include/rpc_types.h (+43 -0)
📝 mooncake-store/include/types.h (+6 -23)
📝 mooncake-store/src/client.cpp (+57 -20)
📝 mooncake-store/src/master_client.cpp (+6 -6)
📝 mooncake-store/src/master_service.cpp (+6 -14)
📝 mooncake-store/src/pybind_client.cpp (+99 -94)
📝 mooncake-store/src/rpc_service.cpp (+8 -7)
📝 mooncake-store/src/types.cpp (+1 -0)
📝 mooncake-store/tests/client_integration_test.cpp (+3 -4)
📝 mooncake-store/tests/e2e/client_wrapper.cpp (+6 -4)
📝 mooncake-store/tests/e2e/client_wrapper.h (+1 -1)
📝 mooncake-store/tests/master_service_ssd_test.cpp (+8 -8)

...and 4 more files

📄 Description

If the data transfer during a get operation is not completed within the lease time, there is a risk that the retrieved data may be incorrect. Currently, the default lease TTL is set to 5 seconds. Under normal circumstances, where network communication is stable, this situation is unlikely to occur. But when the network condition is not stable, the overhead is too heavy, or when there are delays due to thread scheduling, the time for data retrieval may be longer than expected. This mechanism can serve as a safeguard to ensure data consistency in extreme cases.


🔄 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/778 **Author:** [@ykwd](https://github.com/ykwd) **Created:** 8/22/2025 **Status:** ✅ Merged **Merged:** 9/24/2025 **Merged by:** [@ykwd](https://github.com/ykwd) **Base:** `main` ← **Head:** `dev/read-timeout` --- ### 📝 Commits (10+) - [`5be365b`](https://github.com/kvcache-ai/Mooncake/commit/5be365b013ddfc3426bc8c9bd938045c0bc01559) Grant lease in GetReplicaListByRegex - [`6ec4bf6`](https://github.com/kvcache-ai/Mooncake/commit/6ec4bf6323c26bc1eab0aafd5f84592035271596) A temp version - [`6685938`](https://github.com/kvcache-ai/Mooncake/commit/66859382631078a181e8182b998fb2c4b71c53f6) Simplify the logic - [`ba47e51`](https://github.com/kvcache-ai/Mooncake/commit/ba47e5163d9a998d370aeead41dfd5bf53cc99a4) First version - [`39a3ed0`](https://github.com/kvcache-ai/Mooncake/commit/39a3ed09c3c846ad87ddd8fd07723648bde3e282) Merge main - [`2cd4e55`](https://github.com/kvcache-ai/Mooncake/commit/2cd4e553403d215d03ed0a0640eaee35d8c7c3c6) Eliminate unused var warning - [`c69ea33`](https://github.com/kvcache-ai/Mooncake/commit/c69ea333e4efa553cfd1868d16c01ec94b972290) refactor the code - [`372cfbb`](https://github.com/kvcache-ai/Mooncake/commit/372cfbb2a627969047e0701fa93050a058498ae7) Format code - [`3d1978b`](https://github.com/kvcache-ai/Mooncake/commit/3d1978b2a4d62a7d5d1b9d6a52e76ece8e9b791a) Add unit test: temp version - [`493c672`](https://github.com/kvcache-ai/Mooncake/commit/493c6723b5dfd2d044dff9bfa41284576b00d638) Format code. Add a unit test ### 📊 Changes **24 files changed** (+783 additions, -271 deletions) <details> <summary>View changed files</summary> 📝 `doc/en/mooncake-store.md` (+3 -1) 📝 `doc/zh/mooncake-store.md` (+3 -1) 📝 `docs/source/design/mooncake-store.md` (+4 -1) 📝 `mooncake-store/include/client.h` (+45 -21) 📝 `mooncake-store/include/master_client.h` (+4 -3) 📝 `mooncake-store/include/master_config.h` (+53 -0) 📝 `mooncake-store/include/master_service.h` (+2 -9) 📝 `mooncake-store/include/rpc_service.h` (+3 -2) ➕ `mooncake-store/include/rpc_types.h` (+43 -0) 📝 `mooncake-store/include/types.h` (+6 -23) 📝 `mooncake-store/src/client.cpp` (+57 -20) 📝 `mooncake-store/src/master_client.cpp` (+6 -6) 📝 `mooncake-store/src/master_service.cpp` (+6 -14) 📝 `mooncake-store/src/pybind_client.cpp` (+99 -94) 📝 `mooncake-store/src/rpc_service.cpp` (+8 -7) 📝 `mooncake-store/src/types.cpp` (+1 -0) 📝 `mooncake-store/tests/client_integration_test.cpp` (+3 -4) 📝 `mooncake-store/tests/e2e/client_wrapper.cpp` (+6 -4) 📝 `mooncake-store/tests/e2e/client_wrapper.h` (+1 -1) 📝 `mooncake-store/tests/master_service_ssd_test.cpp` (+8 -8) _...and 4 more files_ </details> ### 📄 Description If the data transfer during a get operation is not completed within the lease time, there is a risk that the retrieved data may be incorrect. Currently, the default lease TTL is set to 5 seconds. Under normal circumstances, where network communication is stable, this situation is unlikely to occur. But when the network condition is not stable, the overhead is too heavy, or when there are delays due to thread scheduling, the time for data retrieval may be longer than expected. This mechanism can serve as a safeguard to ensure data consistency in extreme cases. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-29 21:30:35 +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#1817
No description provided.