[PR #235] [MERGED] [Bugfix]: fix redis access error during multi-threaded runtime. #1416

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

📋 Pull Request Information

Original PR: https://github.com/kvcache-ai/Mooncake/pull/235
Author: @ssssnow
Created: 4/11/2025
Status: ✅ Merged
Merged: 4/12/2025
Merged by: @stmatengss

Base: main ← Head: gm/fix_multi_threads_err


📝 Commits (1)

  • 66da57c [Bugfix]: fix redis access error during multi-threaded runtime.

📊 Changes

1 file changed (+24 additions, -2 deletions)

View changed files

📝 mooncake-transfer-engine/src/transfer_metadata_plugin.cpp (+24 -2)

📄 Description

Add lock for meta plugin when USE_REDIS is enabled

When compiled with -DUSE_REDIS=ON, the metadata plugin will use Redis as the default storage method. However, hiredis (introduced in transfer_metadata_plugin.cpp) is not thread-safe.

This change adds a lock to prevent errors (which we have actually encountered in our scenario) during multi-threaded runtime.


🔄 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/235 **Author:** [@ssssnow](https://github.com/ssssnow) **Created:** 4/11/2025 **Status:** ✅ Merged **Merged:** 4/12/2025 **Merged by:** [@stmatengss](https://github.com/stmatengss) **Base:** `main` ← **Head:** `gm/fix_multi_threads_err` --- ### 📝 Commits (1) - [`66da57c`](https://github.com/kvcache-ai/Mooncake/commit/66da57c0b0a2e84c8fde069a154ec4b4b8ecf149) [Bugfix]: fix redis access error during multi-threaded runtime. ### 📊 Changes **1 file changed** (+24 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `mooncake-transfer-engine/src/transfer_metadata_plugin.cpp` (+24 -2) </details> ### 📄 Description # Add lock for meta plugin when USE_REDIS is enabled When compiled with -DUSE_REDIS=ON, the metadata plugin will use Redis as the default storage method. However, hiredis (introduced in `transfer_metadata_plugin.cpp`) is not thread-safe. This change adds a lock to prevent errors (which we have actually encountered in our scenario) during multi-threaded runtime. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-29 21:27:16 +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#1416
No description provided.