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

fix the error message for verifyVersion #5797

Merged
merged 1 commit into from
Jan 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/graph/service/GraphFlags.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ DEFINE_uint32(ft_request_retry_times, 3, "Retry times if fulltext request failed
DEFINE_bool(enable_client_white_list, true, "Turn on/off the client white list.");
DEFINE_string(client_white_list,
nebula::getOriginVersion() + ":3.0.0",
"A white list for different client versions, separate with colon.");
"A white list for different client handshakeKey, separate with colon.");

#endif

Expand Down
6 changes: 2 additions & 4 deletions src/graph/service/GraphService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -263,10 +263,8 @@ folly::Future<cpp2::VerifyClientVersionResp> GraphService::future_verifyClientVe
uniqueWhiteList.append(version);
});
resp.error_code_ref() = nebula::cpp2::ErrorCode::E_CLIENT_SERVER_INCOMPATIBLE;
resp.error_msg_ref() = folly::stringPrintf(
"Graph client version(%s) is not accepted, current graph client white list: %s.",
req.get_version().c_str(),
uniqueWhiteList.c_str());
resp.error_msg_ref() = folly::stringPrintf("Graph client handshakeKey(%s) is not accepted.",
req.get_version().c_str());
} else {
resp.error_code_ref() = nebula::cpp2::ErrorCode::SUCCEEDED;
}
Expand Down
2 changes: 1 addition & 1 deletion src/graph/service/test/StandAloneTestGraphFlags.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ DEFINE_uint32(ft_request_retry_times, 3, "Retry times if fulltext request failed
DEFINE_bool(enable_client_white_list, true, "Turn on/off the client white list.");
DEFINE_string(client_white_list,
nebula::getOriginVersion() + ":3.0.0",
"A white list for different client versions, separate with colon.");
"A white list for different client handshakeKey, separate with colon.");
8 changes: 3 additions & 5 deletions src/meta/processors/admin/VerifyClientVersionProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
DEFINE_bool(enable_client_white_list, true, "Turn on/off the client white list.");
DEFINE_string(client_white_list,
nebula::getOriginVersion() + ":3.0.0",
"A white list for different client versions, separate with colon.");
"A white list for different client handshakeKey, separate with colon.");

namespace nebula {
namespace meta {
Expand All @@ -21,10 +21,8 @@ void VerifyClientVersionProcessor::process(const cpp2::VerifyClientVersionReq& r
if (FLAGS_enable_client_white_list &&
whiteList.find(req.get_client_version()) == whiteList.end()) {
resp_.code_ref() = nebula::cpp2::ErrorCode::E_CLIENT_SERVER_INCOMPATIBLE;
resp_.error_msg_ref() = folly::stringPrintf(
"Meta client version(%s) is not accepted, current meta client white list: %s.",
req.get_client_version().c_str(),
FLAGS_client_white_list.c_str());
resp_.error_msg_ref() = folly::stringPrintf("Meta client handshakeKey(%s) is not accepted.",
req.get_client_version().c_str());
}

onFinished();
Expand Down
Loading