Repository navigation
Fix endpoint slicing when the node count does not divide the endpoint count - #227
Merged
Merged
Conversation
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.
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.
Summary
With
--slice-endpoints(enginestorage.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: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:
Changes
ConfigSliceUtil.sliceStorageNodeAddrs: assigns groupito node slicej, the slice its log line already names, instead of to slicei. It is a one-line fix. The only caller isLoadStepClientBase.sliceConfig, for the base configuration and each context configuration.CHANGELOG.md: anUnreleased→Fixedentry.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'sstorage-net-node-addrs.spt-baseand:bundle:assembleDistpass.