[PR #355] [MERGED] fix(master): Fix negative storage size metrics after removeAll #1505

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

📋 Pull Request Information

Original PR: https://github.com/kvcache-ai/Mooncake/pull/355
Author: @maobaolong
Created: 5/12/2025
Status: ✅ Merged
Merged: 5/14/2025
Merged by: @stmatengss

Base: main ← Head: fixStorageSizeAfterRemoveAll


📝 Commits (1)

  • 18f45a2 Fix negative storage size metrics after removeAll

📊 Changes

1 file changed (+0 additions, -1 deletions)

View changed files

📝 mooncake-store/src/master_service.cpp (+0 -1)

📄 Description

I0512 23:15:16.652259  1527 allocator.cpp:16] buf_handle_deallocated segment_name=192.168.100.219:12986 size=11
I0512 23:15:16.652276  1527 master_service.cpp:339] action=remove_all_objects, removed_count=1, total_freed_size=11
I0512 23:15:16.652279  1527 scoped_vlog_timer.h:77] RemoveAll response: {"removed_count":1}, latency=64us

I0512 23:15:26.011116  1521 rpc_service.h:78] Master Metrics: Storage: -11.00 B / 75.02 GB (-0.0%) | Keys: 0 | Requests (Success/Total): Put=2/2, Get=0/0, Exist=0/0, Del=0/0, DelAll=1/1

How to test

  • start master
/usr/local/lib/python3.12/dist-packages/mooncake/mooncake_master -max_threads 64 -v=1 -metrics_port=8081
  • start mooncake-store-service
python3 /usr/local/lib/python3.12/dist-packages/mooncake/mooncake_store_service.py --config=./mooncake.json
  • start test
curl -X PUT -H "Content-Type: application/json" -d '{"key":"test1", "value":"sample data"}' http://localhost:8088/api/put
curl -X DELETE http://localhost:8080/api/remove_all

🔄 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/355 **Author:** [@maobaolong](https://github.com/maobaolong) **Created:** 5/12/2025 **Status:** ✅ Merged **Merged:** 5/14/2025 **Merged by:** [@stmatengss](https://github.com/stmatengss) **Base:** `main` ← **Head:** `fixStorageSizeAfterRemoveAll` --- ### 📝 Commits (1) - [`18f45a2`](https://github.com/kvcache-ai/Mooncake/commit/18f45a282b4d6a7fdb023437bcc5036259102737) Fix negative storage size metrics after removeAll ### 📊 Changes **1 file changed** (+0 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `mooncake-store/src/master_service.cpp` (+0 -1) </details> ### 📄 Description ``` I0512 23:15:16.652259 1527 allocator.cpp:16] buf_handle_deallocated segment_name=192.168.100.219:12986 size=11 I0512 23:15:16.652276 1527 master_service.cpp:339] action=remove_all_objects, removed_count=1, total_freed_size=11 I0512 23:15:16.652279 1527 scoped_vlog_timer.h:77] RemoveAll response: {"removed_count":1}, latency=64us I0512 23:15:26.011116 1521 rpc_service.h:78] Master Metrics: Storage: -11.00 B / 75.02 GB (-0.0%) | Keys: 0 | Requests (Success/Total): Put=2/2, Get=0/0, Exist=0/0, Del=0/0, DelAll=1/1 ``` # How to test - start master ```console /usr/local/lib/python3.12/dist-packages/mooncake/mooncake_master -max_threads 64 -v=1 -metrics_port=8081 ``` - start mooncake-store-service ``` python3 /usr/local/lib/python3.12/dist-packages/mooncake/mooncake_store_service.py --config=./mooncake.json ``` - start test ``` curl -X PUT -H "Content-Type: application/json" -d '{"key":"test1", "value":"sample data"}' http://localhost:8088/api/put curl -X DELETE http://localhost:8080/api/remove_all ``` --- <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:02 +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#1505
No description provided.