Skip to content

Fix endpoint slicing when the node count does not divide the endpoint count - #227

Merged
mikehorgan-dell merged 1 commit into
mainfrom
fix/endpoint-slicing
Oct 27, 2026
Merged

mikehorgan-dell merged 1 commit into
mainfrom
fix/endpoint-slicing

Conversation

@mikehorgan-dell

Copy link
Copy Markdown
Member

Summary

With --slice-endpoints (engine storage.net.node.slice), the nodes of a distributed run, the entry node included, split into groups, and each group targets its own share of the endpoints. When the node count did not divide the endpoint count, the groups were computed correctly but assigned to the wrong nodes. Only the first nodes got a share, one each, and the later nodes kept every endpoint, although the log listed a group for each node:

  • 4 nodes, 2 endpoints: the first two nodes got one endpoint each, and the third and fourth targeted both.
  • 4 nodes, 6 endpoints: the third and fourth nodes targeted all six.

Each node now targets the group the log lists for it. With 4 nodes and 2 endpoints, the first two target the first endpoint and the last two the second.

Unchanged:

  • runs whose node count divides the endpoint count;
  • runs whose two counts share no factor, where every node still targets every endpoint.

Changes

  • ConfigSliceUtil.sliceStorageNodeAddrs: assigns group i to node slice j, the slice its log line already names, instead of to slice i. It is a one-line fix. The only caller is LoadStepClientBase.sliceConfig, for the base configuration and each context configuration.
  • CHANGELOG.md: an Unreleased → Fixed entry.

Testing

  • ConfigSliceUtilTest.sliceStorageNodeAddrsAssignsEverySliceItsGroup: a parameterized test over (nodes, endpoints) = (1,1), (2,4), (4,2), (4,4), (4,6), (3,2), (2,3), asserting every slice's storage-net-node-addrs.
    • With the old assignment restored, (4,2) and (4,6) fail and the other five pass.
    • (3,2) and (2,3) share no factor, so keeping every endpoint is the expected result there.
  • Engine: 3,049 tests, 0 failures, 9 skipped. Spotless, strict Error Prone on spt-base and :bundle:assembleDist pass.
  • Not run: a distributed lab run. The change is confined to the slice assignment, which the test table covers directly.

With storage.net.node.slice, sliceStorageNodeAddrs assigned each
endpoint group to configSlices.get(i) inside its loop over the group's
slices j, so only slice i got group i and every later slice kept the
full endpoint list whenever the slice count did not divide the
endpoint count. Assign the group to slice j, which is also the slice
the log line names, and cover the method with a table test that checks
every slice's list.
@mikehorgan-dell
mikehorgan-dell merged commit 06134fb into main Oct 27, 2026
6 checks passed
@mikehorgan-dell
mikehorgan-dell deleted the fix/endpoint-slicing branch October 27, 2026 19:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant