empiredan commented on code in PR #1300:
URL:
https://github.com/apache/incubator-pegasus/pull/1300#discussion_r1055169098
##########
src/shell/commands/detect_hotkey.cpp:
##########
@@ -32,21 +33,21 @@ bool
generate_hotkey_request(dsn::replication::detect_hotkey_request &req,
int partition_index,
std::string &err_info)
{
- if (!strcasecmp(hotkey_type.c_str(), "read")) {
+ if (dsn::utils::iequals(hotkey_type.c_str(), "read")) {
Review Comment:
Actually `string_view` is used not only for the string of the printable
characters, but also binary bytes. Once `string_view` is used as the type of
the parameters, we have to reimplement comparison ignoring cases based on
`string_view` where binary bytes such as '\0' should be skipped. Therefore here
we just declare other functions one parameter of which is declared as
`std::string`. Comparing two `std::string`-typed strings we can use
`boost::iequals`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]