-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Add init of GraphService and check it #415
Conversation
src/common/network/NetworkUtils.cpp
Outdated
@@ -230,6 +230,9 @@ StatusOr<HostAddr> NetworkUtils::toHostAddr(folly::StringPiece ipPort) { | |||
} | |||
|
|||
StatusOr<std::vector<HostAddr>> NetworkUtils::toHosts(const std::string& peersStr) { | |||
if (peersStr.empty()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should NOT forbid empty peersStr.
Because in some cases, we actually pass in empty string.
Unit testing passed. |
1 similar comment
Unit testing passed. |
src/graph/ExecutionEngine.cpp
Outdated
@@ -25,9 +25,10 @@ ExecutionEngine::~ExecutionEngine() { | |||
|
|||
Status ExecutionEngine::init(std::shared_ptr<folly::IOThreadPoolExecutor> ioExecutor) { | |||
auto addrs = network::NetworkUtils::toHosts(FLAGS_meta_server_addrs); | |||
if (!addrs.ok()) { | |||
if (!addrs.ok() || addrs.value().empty()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If FLAGS_meta_server_addrs is not empty, in which case "toHosts" return empty array?
src/graph/test/TestEnv.cpp
Outdated
@@ -28,7 +28,11 @@ void TestEnv::SetUp() { | |||
using ThriftServer = apache::thrift::ThriftServer; | |||
server_ = std::make_unique<ThriftServer>(); | |||
server_->getIOThreadPool()->setNumThreads(1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what about multiple threads tests?
Unit testing passed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's ok if add one more cases for the empty case.
Unit testing failed. |
Unit testing passed. |
the pr is so long time, close it |
* Add session context definition * Add local seesion command * Add show local queries command and depracate show all queries * Fix ut * Fix pytest * Add tck case * Save multiple sessions in the cluster fixture in TCK * Add tck case * Format Co-authored-by: Yichen Wang <[email protected]>
close #557