Skip to content

autosharding: implementation of picker and sliceMap - #13024

Open
shivaspeaks wants to merge 15 commits into
grpc:masterfrom
shivaspeaks:autosharding-part2-picker
Open

autosharding: implementation of picker and sliceMap#13024
shivaspeaks wants to merge 15 commits into
grpc:masterfrom
shivaspeaks:autosharding-part2-picker

Conversation

@shivaspeaks

@shivaspeaks shivaspeaks commented Sep 2, 2026

Copy link
Copy Markdown
Member

@shivaspeaks shivaspeaks changed the title Autosharding part2 picker autosharding: implementation of picker and sliceMap Sep 2, 2026
@shivaspeaks
shivaspeaks marked this pull request as ready for review September 3, 2026 02:48
@shivaspeaks
shivaspeaks requested a review from sauravzg September 3, 2026 02:48

@sauravzg sauravzg left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the source. A lot of comments are sent in a particular place but apply to the entire PR, so you may have to make changes at multiple places.

Comment thread autosharding/src/main/java/io/grpc/autosharding/PickerEndpoint.java
Comment thread autosharding/src/main/java/io/grpc/autosharding/SliceMap.java Outdated
Comment thread autosharding/src/main/java/io/grpc/autosharding/PickerEndpoint.java Outdated
Comment thread autosharding/src/main/java/io/grpc/autosharding/SliceMap.java Outdated
Comment thread autosharding/src/main/java/io/grpc/autosharding/SliceMap.java Outdated
Comment thread autosharding/src/main/java/io/grpc/autosharding/AutoShardingPicker.java Outdated
Comment thread autosharding/src/main/java/io/grpc/autosharding/AutoShardingPicker.java Outdated
Comment thread autosharding/src/main/java/io/grpc/autosharding/AutoShardingPicker.java Outdated
Comment thread autosharding/src/main/java/io/grpc/autosharding/AutoShardingPicker.java Outdated
Comment thread autosharding/src/main/java/io/grpc/autosharding/AutoShardingPicker.java Outdated
}
}

private boolean isPoolInFallback(List<Integer> indices) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe we may be able to optimise the precomputation , we iterate over all endpoints for all slices, which may not be optimal despite not being in the critical per prc path.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what precomputation you mean.
I can think of one O(N) fast path for a flat endpoint list first.

@sauravzg

sauravzg commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Please resolve the comments that you have fixed and add me again to take a look. Thanks.

@shivaspeaks
shivaspeaks requested a review from sauravzg September 4, 2026 12:56
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.

2 participants