Skip to content

Commit 467ce6f

Browse files
author
Yuhong Guo
committed
Merge with master and fix CI failure.
1 parent 6a35510 commit 467ce6f

File tree

5 files changed

+14
-11
lines changed

5 files changed

+14
-11
lines changed

src/common/redis_module/ray_redis_module.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@ RedisModuleString *FormatPubsubChannel(
9191
// Format the pubsub channel enum to a string. TablePubsub_MAX should be more
9292
// than enough digits, but add 1 just in case for the null terminator.
9393
char pubsub_channel[static_cast<int>(TablePubsub::MAX) + 1];
94-
sprintf(pubsub_channel, "%d", ParseTablePubsub(pubsub_channel_str));
94+
sprintf(pubsub_channel, "%d",
95+
static_cast<int>(ParseTablePubsub(pubsub_channel_str)));
9596
return RedisString_Format(ctx, "%s:%S", pubsub_channel, id);
9697
}
9798

src/local_scheduler/local_scheduler_client.cc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,14 +214,16 @@ std::pair<std::vector<ObjectID>, std::vector<ObjectID>> local_scheduler_wait(
214214
fbb, to_flatbuf(fbb, object_ids), num_returns, timeout_milliseconds,
215215
wait_local);
216216
fbb.Finish(message);
217-
write_message(conn->conn, ray::protocol::MessageType_WaitRequest,
217+
write_message(conn->conn,
218+
static_cast<int64_t>(ray::protocol::MessageType::WaitRequest),
218219
fbb.GetSize(), fbb.GetBufferPointer());
219220
// Read result.
220221
int64_t type;
221222
int64_t reply_size;
222223
uint8_t *reply;
223224
read_message(conn->conn, &type, &reply_size, &reply);
224-
RAY_CHECK(type == ray::protocol::MessageType_WaitReply);
225+
RAY_CHECK(static_cast<ray::protocol::MessageType>(type) ==
226+
ray::protocol::MessageType::WaitReply);
225227
auto reply_message = flatbuffers::GetRoot<ray::protocol::WaitReply>(reply);
226228
// Convert result.
227229
std::pair<std::vector<ObjectID>, std::vector<ObjectID>> result;

src/ray/object_manager/object_directory.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,8 @@ ray::Status ObjectDirectory::LookupLocations(const ObjectID &object_id,
148148
JobID job_id = JobID::nil();
149149
ray::Status status = gcs_client_->object_table().Lookup(
150150
job_id, object_id,
151-
[this, callback](gcs::AsyncGcsClient *client, const ObjectID &object_id,
152-
const std::vector<ObjectTableDataT> &location_history) {
151+
[callback](gcs::AsyncGcsClient *client, const ObjectID &object_id,
152+
const std::vector<ObjectTableDataT> &location_history) {
153153
// Build the set of current locations based on the entries in the log.
154154
std::unordered_set<ClientID> client_ids;
155155
std::vector<ClientID> locations_vector =

src/ray/object_manager/test/object_manager_test.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,6 @@ class TestObjectManager : public TestObjectManagerBase {
289289
}
290290

291291
void TestWaitWhileSubscribed(UniqueID sub_id, ObjectID object_1, ObjectID object_2) {
292-
int num_objects = 2;
293292
int required_objects = 1;
294293
int timeout_ms = 1000;
295294

@@ -300,7 +299,7 @@ class TestObjectManager : public TestObjectManagerBase {
300299

301300
RAY_CHECK_OK(server1->object_manager_.AddWaitRequest(
302301
wait_id, object_ids, timeout_ms, required_objects, false,
303-
[this, sub_id, object_1, object_ids, num_objects, start_time](
302+
[this, sub_id, object_1, object_ids, start_time](
304303
const std::vector<ray::ObjectID> &found,
305304
const std::vector<ray::ObjectID> &remaining) {
306305
int64_t elapsed = (boost::posix_time::second_clock::local_time() - start_time)

src/ray/raylet/node_manager.cc

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ void NodeManager::ProcessClientMessage(
460460
worker->MarkUnblocked();
461461
}
462462
} break;
463-
case protocol::MessageType_WaitRequest: {
463+
case protocol::MessageType::WaitRequest: {
464464
// Read the data.
465465
auto message = flatbuffers::GetRoot<protocol::WaitRequest>(message_data);
466466
std::vector<ObjectID> object_ids = from_flatbuf(*message->object_ids());
@@ -470,14 +470,15 @@ void NodeManager::ProcessClientMessage(
470470

471471
ray::Status status = object_manager_.Wait(
472472
object_ids, wait_ms, num_required_objects, wait_local,
473-
[this, client](std::vector<ObjectID> found, std::vector<ObjectID> remaining) {
473+
[client](std::vector<ObjectID> found, std::vector<ObjectID> remaining) {
474474
// Write the data.
475475
flatbuffers::FlatBufferBuilder fbb;
476476
flatbuffers::Offset<protocol::WaitReply> wait_reply = protocol::CreateWaitReply(
477477
fbb, to_flatbuf(fbb, found), to_flatbuf(fbb, remaining));
478478
fbb.Finish(wait_reply);
479-
RAY_CHECK_OK(client->WriteMessage(protocol::MessageType_WaitReply,
480-
fbb.GetSize(), fbb.GetBufferPointer()));
479+
RAY_CHECK_OK(
480+
client->WriteMessage(static_cast<int64_t>(protocol::MessageType::WaitReply),
481+
fbb.GetSize(), fbb.GetBufferPointer()));
481482
});
482483
RAY_CHECK_OK(status);
483484
} break;

0 commit comments

Comments
 (0)