Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable 'get_my_shard' API for UDL #76

Merged
merged 2 commits into from
Jul 30, 2024
Merged

Enable 'get_my_shard' API for UDL #76

merged 2 commits into from
Jul 30, 2024

Conversation

songweijia
Copy link
Contributor

Sometimes, a UDL logic needs to know which shard it is running on. Previously, the UDL had to get the view and the node ID to find the shard. Actually, this functionality is available in Derecho Group (but not in ExternalGroupClient) In this pull request, we expose this feature through ServiceClient::get_my_shard(), which will return -1 in case calling from an external client (or this current node does not belong to the subgroup).

This feature has been tested from both external clients and UDLs, and regression-tested as well.

@songweijia songweijia merged commit 7e54e48 into master Jul 30, 2024
1 check passed
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