Rename PortCursors to PortAllocator and key it by the node's ip - #1871
Open
fzyzcjy wants to merge 1 commit into
Open
Rename PortCursors to PortAllocator and key it by the node's ip#1871fzyzcjy wants to merge 1 commit into
fzyzcjy wants to merge 1 commit into
Conversation
Contributor
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
fzyzcjy
force-pushed
the
tom/refactor-miles/op5-6
branch
from
July 28, 2026 13:31
1a69a48 to
cd1e679
Compare
fzyzcjy
force-pushed
the
tom/refactor-miles/op5-7
branch
2 times, most recently
from
August 3, 2026 23:45
97cf640 to
c98cff5
Compare
fzyzcjy
force-pushed
the
tom/refactor-miles/op5-6
branch
from
August 4, 2026 00:39
08f925f to
72e9dc1
Compare
fzyzcjy
force-pushed
the
tom/refactor-miles/op5-7
branch
from
August 4, 2026 00:39
c98cff5 to
6e7d155
Compare
fzyzcjy
force-pushed
the
tom/refactor-miles/op5-6
branch
from
August 4, 2026 06:58
72e9dc1 to
b5d7950
Compare
fzyzcjy
requested review from
Rockdu,
Shi-Dong,
Zhichenzzz,
guapisolo,
jybsuper and
yushengsu-thu
as code owners
August 4, 2026 06:58
fzyzcjy
force-pushed
the
tom/refactor-miles/op5-7
branch
2 times, most recently
from
August 6, 2026 07:03
7637998 to
82c96d8
Compare
fzyzcjy
force-pushed
the
tom/refactor-miles/op5-6
branch
2 times, most recently
from
August 10, 2026 06:08
7e18bb5 to
b58d9bb
Compare
fzyzcjy
force-pushed
the
tom/refactor-miles/op5-7
branch
2 times, most recently
from
August 10, 2026 16:07
0294ac2 to
2aba180
Compare
fzyzcjy
force-pushed
the
tom/refactor-miles/op5-6
branch
from
August 10, 2026 16:07
b58d9bb to
00e79b2
Compare
fzyzcjy
force-pushed
the
tom/refactor-miles/op5-7
branch
from
August 10, 2026 16:34
2aba180 to
063dbde
Compare
fzyzcjy
force-pushed
the
tom/refactor-miles/op5-6
branch
2 times, most recently
from
August 12, 2026 02:48
25fba13 to
5ac66ca
Compare
fzyzcjy
force-pushed
the
tom/refactor-miles/op5-7
branch
from
August 12, 2026 02:48
063dbde to
1c68f0e
Compare
fzyzcjy
force-pushed
the
tom/refactor-miles/op5-6
branch
from
August 12, 2026 14:31
5ac66ca to
cba2bd6
Compare
fzyzcjy
force-pushed
the
tom/refactor-miles/op5-7
branch
2 times, most recently
from
August 12, 2026 23:56
5a2046a to
bd8fd4a
Compare
fzyzcjy
force-pushed
the
tom/refactor-miles/op5-7
branch
from
August 13, 2026 01:13
bd8fd4a to
a15b461
Compare
fzyzcjy
force-pushed
the
tom/refactor-miles/op5-6
branch
from
August 13, 2026 03:25
80b8bb3 to
6c8cf30
Compare
fzyzcjy
force-pushed
the
tom/refactor-miles/op5-7
branch
2 times, most recently
from
August 13, 2026 06:01
359da2b to
ee3d09b
Compare
fzyzcjy
force-pushed
the
tom/refactor-miles/op5-6
branch
from
August 13, 2026 06:01
6c8cf30 to
ebd2ff3
Compare
The cursor dict was keyed by ``node_index = local_rank // num_engines_per_node`` -- an arithmetic proxy for "which machine", derived from an assumed rank layout and restarting at zero for every group. The node ip is the machine's actual identity and needs no such assumption. Nothing misbehaves today: the dict is rebuilt on every call, and groups are kept apart by ``next_base_port()``, one high-water mark taken across all nodes. That guard is safe but coarse -- it drags every node's cursor up to the busiest node's. The rekey is what makes a per-node cursor mean anything once the allocator becomes shared and long-lived: keyed by a per-group index, one shared dict would alias two groups' distinct machines onto a single cursor, and conversely split one machine into two cursors whenever the two groups computed different indices for it. Reading the ip costs one extra ``_get_current_node_ip_and_free_port`` round trip per node.
fzyzcjy
force-pushed
the
tom/refactor-miles/op5-6
branch
from
August 14, 2026 04:46
ebd2ff3 to
8ed35a7
Compare
fzyzcjy
force-pushed
the
tom/refactor-miles/op5-7
branch
from
August 14, 2026 04:46
ee3d09b to
729ed18
Compare
guapisolo
approved these changes
Aug 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #1837