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

ISSUE-133: follower forward add cluster verification #134

Merged
merged 1 commit into from
Dec 23, 2024

Conversation

DongbinCheng
Copy link
Collaborator

No description provided.

HanSJTU
HanSJTU previously approved these changes Dec 23, 2024
@DongbinCheng DongbinCheng merged commit af2597e into eBay:master Dec 23, 2024
2 checks passed
if (clusterIter != clientMeta.end()) {
auto myClusterId = std::to_string(app::AppInfo::groupId());
if ((clusterIter->second).compare(myClusterId.c_str()) != 0) {
SPDLOG_WARN("req clusterId does not match this clusterid {}, reject the request", myClusterId);
Copy link
Collaborator

Choose a reason for hiding this comment

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

it's better to put req clusterId {} in the warning as well.

@@ -71,6 +73,9 @@ class ForwardClientBase {
SPDLOG_WARN("ForwardClient for {} is nullptr", mPeerId);
return false;
}
// use lowercase letters(a-z), digits(0-9), hyphen(-) and underscores(_) in header key
call->mContext.AddMetadata("req_source", "forward");
Copy link
Collaborator

Choose a reason for hiding this comment

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

it's better to define "req_source", "forward" as static constexpr, and use them in both RequestCallData.h and ForwardClient

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.

3 participants