[PR #840] [MERGED] refactor(store): use dedicated thread for signal handling #1862

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

📋 Pull Request Information

Original PR: https://github.com/kvcache-ai/Mooncake/pull/840
Author: @xiaguan
Created: 9/15/2025
Status: ✅ Merged
Merged: 9/16/2025
Merged by: @xiaguan

Base: main ← Head: fix_mem_leak


📝 Commits (8)

  • 2accd86 refactor(store): use dedicated thread for signal handling and atomic cleanup
  • 2d85f95 refactor(store): switch PyClient to shared_ptr and improve resource management
  • e1e819a Merge commit '42a9d64a66' into fix_mem_leak
  • 7b95e6f refactor(ResourceTracker): use leaked heap object to avoid static destruction order issues
  • e88aec8 test: increase unittest verbosity to show running tests
  • 6999906 try fix ci
  • 23c0752 fix setup after close
  • 55e8c3c fix comments

📊 Changes

6 files changed (+181 additions, -87 deletions)

View changed files

📝 mooncake-integration/integration_utils.h (+4 -1)
📝 mooncake-integration/store/store_py.cpp (+46 -36)
📝 mooncake-store/include/pybind_client.h (+22 -8)
📝 mooncake-store/src/pybind_client.cpp (+103 -37)
📝 mooncake-store/tests/pybind_client_test.cpp (+4 -4)
📝 mooncake-wheel/tests/test_distributed_object_store.py (+2 -1)

📄 Description

Previous signal handler could potentially deadlock.

This PR uses a thread to process the signal, avoiding this issue.


🔄 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/840 **Author:** [@xiaguan](https://github.com/xiaguan) **Created:** 9/15/2025 **Status:** ✅ Merged **Merged:** 9/16/2025 **Merged by:** [@xiaguan](https://github.com/xiaguan) **Base:** `main` ← **Head:** `fix_mem_leak` --- ### 📝 Commits (8) - [`2accd86`](https://github.com/kvcache-ai/Mooncake/commit/2accd8601fcfe3b52f77a1a11fb16de327c44f6a) refactor(store): use dedicated thread for signal handling and atomic cleanup - [`2d85f95`](https://github.com/kvcache-ai/Mooncake/commit/2d85f95e20a8c02aafbe68056515390fc6e043a9) refactor(store): switch PyClient to shared_ptr and improve resource management - [`e1e819a`](https://github.com/kvcache-ai/Mooncake/commit/e1e819a8b5b5d7187bd97007b2e1453910df1e3b) Merge commit '42a9d64a66a28befe0ecbdc5b85f4bae21dd5242' into fix_mem_leak - [`7b95e6f`](https://github.com/kvcache-ai/Mooncake/commit/7b95e6f8fa880bff30524fbbac0fd00ccc676401) refactor(ResourceTracker): use leaked heap object to avoid static destruction order issues - [`e88aec8`](https://github.com/kvcache-ai/Mooncake/commit/e88aec816b903db00f90dcec9fa87aeef3f395d5) test: increase unittest verbosity to show running tests - [`6999906`](https://github.com/kvcache-ai/Mooncake/commit/6999906bb6a47228e339553638bba8e7ed4826df) try fix ci - [`23c0752`](https://github.com/kvcache-ai/Mooncake/commit/23c07521dacf3af4e1621b67c25cce898db51ec3) fix setup after close - [`55e8c3c`](https://github.com/kvcache-ai/Mooncake/commit/55e8c3c8e426a4156f91686b3d5f7b036add7209) fix comments ### 📊 Changes **6 files changed** (+181 additions, -87 deletions) <details> <summary>View changed files</summary> 📝 `mooncake-integration/integration_utils.h` (+4 -1) 📝 `mooncake-integration/store/store_py.cpp` (+46 -36) 📝 `mooncake-store/include/pybind_client.h` (+22 -8) 📝 `mooncake-store/src/pybind_client.cpp` (+103 -37) 📝 `mooncake-store/tests/pybind_client_test.cpp` (+4 -4) 📝 `mooncake-wheel/tests/test_distributed_object_store.py` (+2 -1) </details> ### 📄 Description Previous signal handler could potentially deadlock. This PR uses a thread to process the signal, avoiding this issue. --- <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:56 +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#1862
No description provided.