acelyc111 commented on code in PR #1825:
URL:
https://github.com/apache/incubator-pegasus/pull/1825#discussion_r1442655693
##########
src/runtime/test/host_port_test.cpp:
##########
@@ -166,6 +172,41 @@ TEST(host_port_test, rpc_group_host_port)
ASSERT_FALSE(g->contains(hp2));
ASSERT_EQ(0u, g->members().size());
ASSERT_EQ(invalid_hp, g->leader());
+
+ // operator <
+ host_port hp_grp1;
+ hp_grp1.assign_group("test_group");
+ if (reinterpret_cast<uint64_t>(hp_grp.group_host_port().get()) <
Review Comment:
The relationship between hp_grp and hp_grp1 definite IMO, so the judgement
is not needed.
##########
src/runtime/rpc/rpc_host_port.cpp:
##########
@@ -157,19 +157,28 @@ std::string host_port::to_string() const
case HOST_TYPE_IPV4:
return fmt::format("{}:{}", _host, _port);
case HOST_TYPE_GROUP:
- return fmt::format("address group {}", group_host_port()->name());
+ return fmt::format("host_port group {}", group_host_port()->name());
default:
- return "invalid address";
+ return "invalid host_port";
}
}
+// hostname has a maximum of 253 ASCII characters
+// uint_16 port maximum is 65535
+// 253 + 1(colon) + 5 = 259
+static __thread fixed_size_buffer_pool<8, 259> bf;
Review Comment:
It would be better to align the memory address, say 64*N, i.e. 320.
--
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]