diff --git a/src/local_scheduler/local_scheduler.cc b/src/local_scheduler/local_scheduler.cc index 279c2bb8b86..5234e58ff8a 100644 --- a/src/local_scheduler/local_scheduler.cc +++ b/src/local_scheduler/local_scheduler.cc @@ -364,12 +364,12 @@ LocalSchedulerState *LocalSchedulerState_init( /* Connect to Plasma. This method will retry if Plasma hasn't started yet. */ state->plasma_conn = new plasma::PlasmaClient(); if (plasma_manager_socket_name != NULL) { - ARROW_CHECK_OK(state->plasma_conn->Connect(plasma_store_socket_name, - plasma_manager_socket_name, - PLASMA_DEFAULT_RELEASE_DELAY)); + ARROW_CHECK_OK(state->plasma_conn->Connect( + plasma_store_socket_name, plasma_manager_socket_name, + plasma::kPlasmaDefaultReleaseDelay)); } else { - ARROW_CHECK_OK(state->plasma_conn->Connect(plasma_store_socket_name, "", - PLASMA_DEFAULT_RELEASE_DELAY)); + ARROW_CHECK_OK(state->plasma_conn->Connect( + plasma_store_socket_name, "", plasma::kPlasmaDefaultReleaseDelay)); } /* Subscribe to notifications about sealed objects. */ int plasma_fd; diff --git a/src/plasma/plasma_manager.cc b/src/plasma/plasma_manager.cc index d6f7f006e86..98111372e8f 100644 --- a/src/plasma/plasma_manager.cc +++ b/src/plasma/plasma_manager.cc @@ -468,8 +468,8 @@ PlasmaManagerState *PlasmaManagerState_init(const char *store_socket_name, PlasmaManagerState *state = new PlasmaManagerState(); state->loop = event_loop_create(); state->plasma_conn = new plasma::PlasmaClient(); - ARROW_CHECK_OK(state->plasma_conn->Connect(store_socket_name, "", - PLASMA_DEFAULT_RELEASE_DELAY)); + ARROW_CHECK_OK(state->plasma_conn->Connect( + store_socket_name, "", plasma::kPlasmaDefaultReleaseDelay)); if (redis_primary_addr) { /* Get the manager port as a string. */ std::string manager_address_str = diff --git a/src/plasma/test/client_tests.cc b/src/plasma/test/client_tests.cc index 551a5b1bd66..b42e3481cd0 100644 --- a/src/plasma/test/client_tests.cc +++ b/src/plasma/test/client_tests.cc @@ -16,10 +16,10 @@ SUITE(plasma_client_tests); TEST plasma_status_tests(void) { PlasmaClient client1; ARROW_CHECK_OK(client1.Connect("/tmp/store1", "/tmp/manager1", - PLASMA_DEFAULT_RELEASE_DELAY)); + plasma::kPlasmaDefaultReleaseDelay)); PlasmaClient client2; ARROW_CHECK_OK(client2.Connect("/tmp/store2", "/tmp/manager2", - PLASMA_DEFAULT_RELEASE_DELAY)); + plasma::kPlasmaDefaultReleaseDelay)); ObjectID oid1 = ObjectID::from_random(); /* Test for object non-existence. */ @@ -55,10 +55,10 @@ TEST plasma_status_tests(void) { TEST plasma_fetch_tests(void) { PlasmaClient client1; ARROW_CHECK_OK(client1.Connect("/tmp/store1", "/tmp/manager1", - PLASMA_DEFAULT_RELEASE_DELAY)); + plasma::kPlasmaDefaultReleaseDelay)); PlasmaClient client2; ARROW_CHECK_OK(client2.Connect("/tmp/store2", "/tmp/manager2", - PLASMA_DEFAULT_RELEASE_DELAY)); + plasma::kPlasmaDefaultReleaseDelay)); ObjectID oid1 = ObjectID::from_random(); /* Test for object non-existence. */ @@ -130,7 +130,7 @@ bool is_equal_data_123(const uint8_t *data1, TEST plasma_nonblocking_get_tests(void) { PlasmaClient client; ARROW_CHECK_OK(client.Connect("/tmp/store1", "/tmp/manager1", - PLASMA_DEFAULT_RELEASE_DELAY)); + plasma::kPlasmaDefaultReleaseDelay)); ObjectID oid = ObjectID::from_random(); ObjectID oid_array[1] = {oid}; ObjectBuffer obj_buffer; @@ -163,10 +163,10 @@ TEST plasma_nonblocking_get_tests(void) { TEST plasma_wait_for_objects_tests(void) { PlasmaClient client1; ARROW_CHECK_OK(client1.Connect("/tmp/store1", "/tmp/manager1", - PLASMA_DEFAULT_RELEASE_DELAY)); + plasma::kPlasmaDefaultReleaseDelay)); PlasmaClient client2; ARROW_CHECK_OK(client2.Connect("/tmp/store2", "/tmp/manager2", - PLASMA_DEFAULT_RELEASE_DELAY)); + plasma::kPlasmaDefaultReleaseDelay)); ObjectID oid1 = ObjectID::from_random(); ObjectID oid2 = ObjectID::from_random(); #define NUM_OBJ_REQUEST 2 @@ -235,9 +235,9 @@ TEST plasma_wait_for_objects_tests(void) { TEST plasma_get_tests(void) { PlasmaClient client1, client2; ARROW_CHECK_OK(client1.Connect("/tmp/store1", "/tmp/manager1", - PLASMA_DEFAULT_RELEASE_DELAY)); + plasma::kPlasmaDefaultReleaseDelay)); ARROW_CHECK_OK(client2.Connect("/tmp/store2", "/tmp/manager2", - PLASMA_DEFAULT_RELEASE_DELAY)); + plasma::kPlasmaDefaultReleaseDelay)); ObjectID oid1 = ObjectID::from_random(); ObjectID oid2 = ObjectID::from_random(); ObjectBuffer obj_buffer1; @@ -277,9 +277,9 @@ TEST plasma_get_tests(void) { TEST plasma_get_multiple_tests(void) { PlasmaClient client1, client2; ARROW_CHECK_OK(client1.Connect("/tmp/store1", "/tmp/manager1", - PLASMA_DEFAULT_RELEASE_DELAY)); + plasma::kPlasmaDefaultReleaseDelay)); ARROW_CHECK_OK(client2.Connect("/tmp/store2", "/tmp/manager2", - PLASMA_DEFAULT_RELEASE_DELAY)); + plasma::kPlasmaDefaultReleaseDelay)); ObjectID oid1 = ObjectID::from_random(); ObjectID oid2 = ObjectID::from_random(); ObjectID obj_ids[NUM_OBJ_REQUEST]; diff --git a/src/plasma/test/manager_tests.cc b/src/plasma/test/manager_tests.cc index f256f6b8a0c..c3cf9fa1f3a 100644 --- a/src/plasma/test/manager_tests.cc +++ b/src/plasma/test/manager_tests.cc @@ -77,9 +77,9 @@ plasma_mock *init_plasma_mock(plasma_mock *remote_mock) { mock->write_conn = get_manager_connection(remote_mock->state, manager_addr, mock->port); wait_for_pollin(mock->manager_remote_fd); - mock->read_conn = - ClientConnection_listen(mock->loop, mock->manager_remote_fd, - mock->state, PLASMA_DEFAULT_RELEASE_DELAY); + mock->read_conn = ClientConnection_listen( + mock->loop, mock->manager_remote_fd, mock->state, + plasma::kPlasmaDefaultReleaseDelay); } else { mock->write_conn = NULL; mock->read_conn = NULL; @@ -269,24 +269,22 @@ TEST object_notifications_test(void) { ASSERT(!is_local); /* Check that the object is local after receiving an object notification. */ - uint8_t *notification = plasma::create_object_info_buffer(&info); - int64_t size = *((int64_t *) notification); - send(fd[1], notification, sizeof(int64_t) + size, 0); + auto notification = plasma::create_object_info_buffer(&info); + int64_t size = *((int64_t *) notification.get()); + send(fd[1], notification.get(), sizeof(int64_t) + size, 0); process_object_notification(local_mock->loop, fd[0], local_mock->state, 0); is_local = is_object_local(local_mock->state, object_id); ASSERT(is_local); - delete[] notification; /* Check that the object is not local after receiving a notification about * the object deletion. */ info.is_deletion = true; notification = plasma::create_object_info_buffer(&info); - size = *((int64_t *) notification); - send(fd[1], notification, sizeof(int64_t) + size, 0); + size = *((int64_t *) notification.get()); + send(fd[1], notification.get(), sizeof(int64_t) + size, 0); process_object_notification(local_mock->loop, fd[0], local_mock->state, 0); is_local = is_object_local(local_mock->state, object_id); ASSERT(!is_local); - delete[] notification; /* Clean up. */ close(fd[0]); diff --git a/src/ray/object_manager/object_store_notification_manager.cc b/src/ray/object_manager/object_store_notification_manager.cc index b66e0f4141b..874a222bc2a 100644 --- a/src/ray/object_manager/object_store_notification_manager.cc +++ b/src/ray/object_manager/object_store_notification_manager.cc @@ -15,8 +15,8 @@ namespace ray { ObjectStoreNotificationManager::ObjectStoreNotificationManager( boost::asio::io_service &io_service, const std::string &store_socket_name) : store_client_(), socket_(io_service) { - ARROW_CHECK_OK( - store_client_.Connect(store_socket_name.c_str(), "", PLASMA_DEFAULT_RELEASE_DELAY)); + ARROW_CHECK_OK(store_client_.Connect(store_socket_name.c_str(), "", + plasma::kPlasmaDefaultReleaseDelay)); ARROW_CHECK_OK(store_client_.Subscribe(&c_socket_)); boost::system::error_code ec; diff --git a/src/ray/object_manager/test/object_manager_stress_test.cc b/src/ray/object_manager/test/object_manager_stress_test.cc index c6078cf471a..f0931973b8d 100644 --- a/src/ray/object_manager/test/object_manager_stress_test.cc +++ b/src/ray/object_manager/test/object_manager_stress_test.cc @@ -146,8 +146,8 @@ class TestObjectManagerBase : public ::testing::Test { server2.reset(new MockServer(main_service, om_config_2, gcs_client_2)); // connect to stores. - ARROW_CHECK_OK(client1.Connect(store_id_1, "", PLASMA_DEFAULT_RELEASE_DELAY)); - ARROW_CHECK_OK(client2.Connect(store_id_2, "", PLASMA_DEFAULT_RELEASE_DELAY)); + ARROW_CHECK_OK(client1.Connect(store_id_1, "", plasma::kPlasmaDefaultReleaseDelay)); + ARROW_CHECK_OK(client2.Connect(store_id_2, "", plasma::kPlasmaDefaultReleaseDelay)); } void TearDown() { diff --git a/src/ray/object_manager/test/object_manager_test.cc b/src/ray/object_manager/test/object_manager_test.cc index c9ec618dff3..c1d83bc116e 100644 --- a/src/ray/object_manager/test/object_manager_test.cc +++ b/src/ray/object_manager/test/object_manager_test.cc @@ -136,8 +136,8 @@ class TestObjectManager : public ::testing::Test { server2.reset(new MockServer(main_service, om_config_2, gcs_client_2)); // connect to stores. - ARROW_CHECK_OK(client1.Connect(store_id_1, "", PLASMA_DEFAULT_RELEASE_DELAY)); - ARROW_CHECK_OK(client2.Connect(store_id_2, "", PLASMA_DEFAULT_RELEASE_DELAY)); + ARROW_CHECK_OK(client1.Connect(store_id_1, "", plasma::kPlasmaDefaultReleaseDelay)); + ARROW_CHECK_OK(client2.Connect(store_id_2, "", plasma::kPlasmaDefaultReleaseDelay)); } void TearDown() { diff --git a/src/ray/raylet/object_manager_integration_test.cc b/src/ray/raylet/object_manager_integration_test.cc index 059af7fec29..b7f2889ac47 100644 --- a/src/ray/raylet/object_manager_integration_test.cc +++ b/src/ray/raylet/object_manager_integration_test.cc @@ -68,8 +68,8 @@ class TestObjectManagerBase : public ::testing::Test { GetNodeManagerConfig("raylet_2", store_sock_2), om_config_2, gcs_client_2)); // connect to stores. - ARROW_CHECK_OK(client1.Connect(store_sock_1, "", PLASMA_DEFAULT_RELEASE_DELAY)); - ARROW_CHECK_OK(client2.Connect(store_sock_2, "", PLASMA_DEFAULT_RELEASE_DELAY)); + ARROW_CHECK_OK(client1.Connect(store_sock_1, "", plasma::kPlasmaDefaultReleaseDelay)); + ARROW_CHECK_OK(client2.Connect(store_sock_2, "", plasma::kPlasmaDefaultReleaseDelay)); } void TearDown() { diff --git a/thirdparty/scripts/build_arrow.sh b/thirdparty/scripts/build_arrow.sh index f2fbb5c1d43..402b4d65453 100755 --- a/thirdparty/scripts/build_arrow.sh +++ b/thirdparty/scripts/build_arrow.sh @@ -44,10 +44,10 @@ if [[ ! -d $TP_DIR/../python/ray/pyarrow_files/pyarrow ]]; then pushd $TP_DIR/build/arrow git fetch origin master - # The PR for this commit is https://github.com/apache/arrow/pull/1939. We + # The PR for this commit is https://github.com/apache/arrow/pull/2073. We # include the link here to make it easier to find the right commit because # Arrow often rewrites git history and invalidates certain commits. - git checkout 5f9cf9c96709f92e9ac4828cf3e106a165576ce7 + git checkout 1d9d8939efe54a640b46fcbe8e14e5b347c7a422 cd cpp if [ ! -d "build" ]; then