Skip to content

Commit a4fbd91

Browse files
committed
don't return when INfo() returns non-exist to avoid race condition
1 parent 912d700 commit a4fbd91

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

cpp/src/plasma/client.cc

+8-1
Original file line numberDiff line numberDiff line change
@@ -1109,7 +1109,7 @@ Status PlasmaClient::Impl::GetQueue(const ObjectID& object_id, int64_t timeout_m
11091109

11101110
if (manager_conn_ >= 0) {
11111111
// This needs to check w/ Plasma Managger.
1112-
1112+
/*
11131113
int object_status;
11141114
RETURN_NOT_OK(Info(object_id, &object_status));
11151115
if (object_status == ObjectStatus_Nonexistent) {
@@ -1121,6 +1121,13 @@ Status PlasmaClient::Impl::GetQueue(const ObjectID& object_id, int64_t timeout_m
11211121
// TODO: here we should probably retry until object id is available locally,
11221122
// or use Wait() before issuing another Get().
11231123
}
1124+
*/
1125+
int object_status;
1126+
RETURN_NOT_OK(Info(object_id, &object_status));
1127+
if (object_status != ObjectStatus_Local) {
1128+
// TODO: need to make sure it's ok for local queue.
1129+
RETURN_NOT_OK(FetchQueue(object_id));
1130+
}
11241131
}
11251132

11261133
RETURN_NOT_OK(Get(object_ids, timeout_ms, &object_buffers));

0 commit comments

Comments
 (0)