-
Notifications
You must be signed in to change notification settings - Fork 6.1k
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
Gcs Asio integration #1633
Gcs Asio integration #1633
Conversation
Test FAILed. |
Test PASSed. |
Test FAILed. |
Test PASSed. |
@@ -5,8 +5,8 @@ project(plasma) | |||
# Recursively include common | |||
include(${CMAKE_CURRENT_LIST_DIR}/../common/cmake/Common.cmake) | |||
|
|||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --std=c99 -D_XOPEN_SOURCE=500 -D_POSIX_C_SOURCE=200809L -O3") | |||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++11 -D_XOPEN_SOURCE=500 -D_POSIX_C_SOURCE=200809L -O3 -Werror -Wall") |
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 was the reason for removing these? Just wondering!
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 was not compatible with asio (errors in the include file popped up). I'm not sure why we needed it in the first place, but things seem to be working without it. We should keep an eye on it though in case any problems come up.
src/ray/gcs/client.h
Outdated
@@ -23,6 +24,7 @@ class RAY_EXPORT AsyncGcsClient { | |||
|
|||
Status Connect(const std::string &address, int port); | |||
Status Attach(plasma::EventLoop &event_loop); | |||
Status AttachToAsio(boost::asio::io_service &io_service); |
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.
Does it make sense to also call this Attach
but keep the different signature?
src/ray/gcs/client.cc
Outdated
@@ -24,6 +24,12 @@ Status Attach(plasma::EventLoop &event_loop) { | |||
return Status::OK(); | |||
} | |||
|
|||
Status AsyncGcsClient::AttachToAsio(boost::asio::io_service &io_service) { | |||
asio_client_.reset( |
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.
Maybe leave a note that we should only be attached to one event loop at a time (asio vs the plasma::EventLoop
)?
src/ray/gcs/client_test.cc
Outdated
RAY_CHECK_OK( | ||
client_.object_table().Add(job_id_, object_id, data, &ObjectAddedAsio)); | ||
RAY_CHECK_OK(client_.object_table().Lookup(job_id_, object_id, &LookupAsio)); | ||
io_service.run(); |
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.
Could we wrap this in a generic EventLoop
class for testing purposes so we don't have to duplicate the test cases for asio vs other event loops? If it's too complicated, maybe this is fine for now.
Test PASSed. |
Test PASSed. |
Test PASSed. |
Test PASSed. |
Test PASSed. |
This PR introduces glue code and tests to connect the (new) GCS client API in the asio event loop.