mirror of
https://github.com/wassname/ray.git
synced 2026-07-13 11:12:12 +08:00
Heartbeat table uses gcs pub-sub instead of redis accessor (#8655)
This commit is contained in:
@@ -529,29 +529,6 @@ def test_version_mismatch(shutdown_only):
|
||||
ray.__version__ = ray_version
|
||||
|
||||
|
||||
def test_warning_monitor_died(ray_start_2_cpus):
|
||||
@ray.remote
|
||||
def f():
|
||||
pass
|
||||
|
||||
# Wait for the monitor process to start.
|
||||
ray.get(f.remote())
|
||||
time.sleep(1)
|
||||
|
||||
# Cause the monitor to raise an exception by pushing a malformed message to
|
||||
# Redis. This will probably kill the raylet and the raylet_monitor in
|
||||
# addition to the monitor.
|
||||
fake_id = 20 * b"\x00"
|
||||
malformed_message = "asdf"
|
||||
redis_client = ray.worker.global_worker.redis_client
|
||||
redis_client.execute_command(
|
||||
"RAY.TABLE_ADD", ray.gcs_utils.TablePrefix.Value("HEARTBEAT_BATCH"),
|
||||
ray.gcs_utils.TablePubsub.Value("HEARTBEAT_BATCH_PUBSUB"), fake_id,
|
||||
malformed_message)
|
||||
|
||||
wait_for_errors(ray_constants.MONITOR_DIED_ERROR, 1)
|
||||
|
||||
|
||||
def test_export_large_objects(ray_start_regular):
|
||||
import ray.ray_constants as ray_constants
|
||||
|
||||
|
||||
@@ -58,8 +58,8 @@ def test_internal_config(ray_start_cluster_head):
|
||||
def setup_monitor(address):
|
||||
monitor = Monitor(
|
||||
address, None, redis_password=ray_constants.REDIS_DEFAULT_PASSWORD)
|
||||
monitor.subscribe(ray.gcs_utils.XRAY_HEARTBEAT_BATCH_CHANNEL)
|
||||
monitor.subscribe(ray.gcs_utils.XRAY_JOB_CHANNEL) # TODO: Remove?
|
||||
monitor.psubscribe(ray.gcs_utils.XRAY_HEARTBEAT_BATCH_PATTERN)
|
||||
monitor.psubscribe(ray.gcs_utils.XRAY_JOB_PATTERN) # TODO: Remove?
|
||||
monitor.update_raylet_map(_append_port=True)
|
||||
return monitor
|
||||
|
||||
|
||||
Reference in New Issue
Block a user