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

Gcs Asio integration #1633

Merged
merged 10 commits into from
Mar 4, 2018
Merged

Gcs Asio integration #1633

merged 10 commits into from
Mar 4, 2018

Conversation

pcmoritz
Copy link
Contributor

@pcmoritz pcmoritz commented Mar 1, 2018

This PR introduces glue code and tests to connect the (new) GCS client API in the asio event loop.

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/4064/
Test FAILed.

@AmplabJenkins
Copy link

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/4063/
Test PASSed.

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/4071/
Test FAILed.

@AmplabJenkins
Copy link

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/4072/
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")
Copy link
Contributor

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!

Copy link
Contributor Author

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.

@@ -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);
Copy link
Contributor

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?

@@ -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(
Copy link
Contributor

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)?

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();
Copy link
Contributor

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.

@AmplabJenkins
Copy link

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/4096/
Test PASSed.

@AmplabJenkins
Copy link

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/4109/
Test PASSed.

@AmplabJenkins
Copy link

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/4112/
Test PASSed.

@AmplabJenkins
Copy link

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/4113/
Test PASSed.

@AmplabJenkins
Copy link

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/4123/
Test PASSed.

@robertnishihara robertnishihara merged commit a683cf2 into ray-project:master Mar 4, 2018
@robertnishihara robertnishihara deleted the asio-gcs branch March 4, 2018 22:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants