mirror of
https://github.com/wassname/ray.git
synced 2026-07-08 10:54:11 +08:00
Fix the bug of unregistered workers in worker pool (#7343)
* Fix * Fix * Fix complie * Fix lint * Fix linting * Fix testDeleteObject * Fix linting * Update src/ray/raylet/worker_pool.cc Co-Authored-By: Hao Chen <chenh1024@gmail.com> * Update src/ray/raylet/worker_pool.cc Co-Authored-By: Hao Chen <chenh1024@gmail.com> * Update src/ray/raylet/worker_pool.h Co-Authored-By: Hao Chen <chenh1024@gmail.com> * Update src/ray/raylet/worker_pool.cc Co-Authored-By: Hao Chen <chenh1024@gmail.com> * Address comments. * FIx linting Co-authored-by: Hao Chen <chenh1024@gmail.com>
This commit is contained in:
@@ -33,6 +33,10 @@ public class TestUtils {
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean isDirectActorCallEnabled() {
|
||||
return ActorCreationOptions.DEFAULT_USE_DIRECT_CALL;
|
||||
}
|
||||
|
||||
public static void skipTestIfDirectActorCallEnabled() {
|
||||
skipTestIfDirectActorCallEnabled(true);
|
||||
}
|
||||
|
||||
@@ -25,9 +25,14 @@ public class PlasmaFreeTest extends BaseTest {
|
||||
Ray.internal().free(ImmutableList.of(helloId.getId()), true, false);
|
||||
|
||||
final boolean result = TestUtils.waitForCondition(() ->
|
||||
TestUtils.getRuntime().getObjectStore()
|
||||
.wait(ImmutableList.of(helloId.getId()), 1, 0).get(0) == false, 50);
|
||||
Assert.assertTrue(result);
|
||||
!TestUtils.getRuntime().getObjectStore()
|
||||
.wait(ImmutableList.of(helloId.getId()), 1, 0).get(0), 50);
|
||||
if (TestUtils.isDirectActorCallEnabled()) {
|
||||
// Direct call will not delete object from im-memory store.
|
||||
Assert.assertFalse(result);
|
||||
} else {
|
||||
Assert.assertTrue(result);
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user