@@ -357,27 +357,27 @@ void GcsJobManager::HandleGetAllJobInfo(rpc::GetAllJobInfoRequest request,
357
357
num_finished_tasks->fetch_add (job_count) + job_count;
358
358
try_send_reply (updated_finished_tasks);
359
359
} else {
360
- for (int i = 0 ; i < reply->job_info_list_size (); i ++) {
361
- const auto &data = reply->job_info_list (i );
360
+ for (int jj = 0 ; jj < reply->job_info_list_size (); jj ++) {
361
+ const auto &data = reply->job_info_list (jj );
362
362
auto job_id = JobID::FromBinary (data.job_id ());
363
363
WorkerID worker_id = WorkerID::FromBinary (data.driver_address ().worker_id ());
364
364
365
365
// If job is dead, no need to get.
366
366
if (data.is_dead ()) {
367
- reply->mutable_job_info_list (i )->set_is_running_tasks (false );
367
+ reply->mutable_job_info_list (jj )->set_is_running_tasks (false );
368
368
core_worker_clients_.Disconnect (worker_id);
369
369
size_t updated_finished_tasks = num_finished_tasks->fetch_add (1 ) + 1 ;
370
370
try_send_reply (updated_finished_tasks);
371
371
} else {
372
372
// Get is_running_tasks from the core worker for the driver.
373
373
auto client = core_worker_clients_.GetOrConnect (data.driver_address ());
374
- auto request = std::make_unique<rpc::NumPendingTasksRequest>();
374
+ auto pending_task_req = std::make_unique<rpc::NumPendingTasksRequest>();
375
375
constexpr int64_t kNumPendingTasksRequestTimeoutMs = 1000 ;
376
376
RAY_LOG (DEBUG) << " Send NumPendingTasksRequest to worker " << worker_id
377
377
<< " , timeout " << kNumPendingTasksRequestTimeoutMs << " ms." ;
378
378
client->NumPendingTasks (
379
- std::move (request ),
380
- [job_id, worker_id, reply, i , num_finished_tasks, try_send_reply](
379
+ std::move (pending_task_req ),
380
+ [job_id, worker_id, reply, jj , num_finished_tasks, try_send_reply](
381
381
const Status &status,
382
382
const rpc::NumPendingTasksReply &num_pending_tasks_reply) {
383
383
RAY_LOG (DEBUG).WithField (worker_id)
@@ -386,10 +386,11 @@ void GcsJobManager::HandleGetAllJobInfo(rpc::GetAllJobInfoRequest request,
386
386
RAY_LOG (WARNING).WithField (job_id).WithField (worker_id)
387
387
<< " Failed to get num_pending_tasks from core worker: " << status
388
388
<< " , is_running_tasks is unset." ;
389
- reply->mutable_job_info_list (i )->clear_is_running_tasks ();
389
+ reply->mutable_job_info_list (jj )->clear_is_running_tasks ();
390
390
} else {
391
391
bool is_running_tasks = num_pending_tasks_reply.num_pending_tasks () > 0 ;
392
- reply->mutable_job_info_list (i)->set_is_running_tasks (is_running_tasks);
392
+ reply->mutable_job_info_list (jj)->set_is_running_tasks (
393
+ is_running_tasks);
393
394
}
394
395
size_t updated_finished_tasks = num_finished_tasks->fetch_add (1 ) + 1 ;
395
396
try_send_reply (updated_finished_tasks);
0 commit comments