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

chore: update command interface for cluster and search families #4258

Merged
merged 1 commit into from
Dec 5, 2024
Merged

Conversation

romange
Copy link
Collaborator

@romange romange commented Dec 4, 2024

No description provided.

@romange romange requested a review from chakaz December 4, 2024 22:46
} else {
return builder->SendError(kClusterNotConfigured);
auto shard_infos = GetShardInfos(cntx);
if (shard_infos) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Super nit, but I think it'd be slightly more elegant to first return on errors (i.e. if (!shard_infos) { SendError(); })

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

i agree, i just automatically followed the previous flow.

@@ -124,6 +124,17 @@ void ClusterFamily::Shutdown() {
});
}

std::optional<ClusterShardInfos> ClusterFamily::GetShardInfos(ConnectionContext* cntx) const {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nice! :)

@romange romange merged commit c2f8349 into main Dec 5, 2024
9 checks passed
@romange romange deleted the Pr1 branch December 5, 2024 07:12
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