mirror of
https://github.com/deepseek-ai/3FS.git
synced 2026-11-05 00:47:47 +00:00
[PR #375] [MERGED] Fix connected_count metric underflow in TransportPool::get() #396
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
deepseek-ai/3FS#396
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/deepseek-ai/3FS/pull/375
Author: @yurekami
Created: 1/1/2026
Status: ✅ Merged
Merged: 1/1/2026
Merged by: @SF-Zhou
Base:
main← Head:fix/connected-count-underflow📝 Commits (1)
450eedeFix connected_count metric underflow in TransportPool::get()📊 Changes
1 file changed (+5 additions, -1 deletions)
View changed files
📝
src/common/net/TransportPool.cc(+5 -1)📄 Description
Summary
This PR fixes the
common.net.connected_countmetric underflow bug reported in #366.Root Cause
In
TransportPool::get(), when creating a new transport, the code always incrementedacceptedCountregardless of theaddr.ipvalue:However,
TransportPool::add()andTransportPool::remove()correctly checkaddr.ip:addr.ip == 0: UseacceptedCount(incoming/accepted connections)addr.ip != 0: UseconnectedCount(outgoing/connected connections)The Bug
get()creates a transport withaddr.ip != 0→ incrementsacceptedCount(wrong!)remove()is called for that transport → decrementsconnectedCount(correct)connectedCountunderflows → wraps toUINT32_MAX(4294967295)Fix
Added the same
addr.ipcheck that exists inadd()andremove():🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.