Skip to content

Commit 8741298

Browse files
author
sampan
committed
Fix comment wording and line lengths
Signed-off-by: sampan <sampan@anyscale.com>
1 parent cbd2e82 commit 8741298

1 file changed

Lines changed: 10 additions & 8 deletions

File tree

python/ray/tests/test_gcs_pubsub.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -258,8 +258,10 @@ def test_pubsub_subscriptions_bounded_for_regular_cluster(ray_start_cluster):
258258
cluster = ray_start_cluster
259259
cluster.wait_for_nodes()
260260

261-
# Spin up several workers. and block them so that ray is forced to create new workers for each task
262-
# we avoid using a signal actor for this because it would create a subscription for each worker.
261+
# Spin up several workers and block them, so Ray is forced to create a new
262+
# worker per task. We avoid a signal actor here because a worker holding an
263+
# actor handle takes out a subscription of its own, which would make the
264+
# counts below scale with num_workers and mask what this test guards.
263265
barrier_dir = tempfile.mkdtemp()
264266

265267
@ray.remote(num_cpus=0.5)
@@ -293,12 +295,12 @@ def f(self):
293295
session_dir = ray._private.worker.global_worker.node.address_info["session_dir"]
294296
gcs_log_path = os.path.join(session_dir, "logs", "gcs_server.out")
295297

296-
# 3 raylets (num_nodes=3) + 1 driver + 1 generator actor's worker + 2 from the
297-
# dashboard head(its node-info and actor subscribers each mint their own
298-
# subscriber id (gcs_pubsub.py _SubscriberBase.__init__), so one process
299-
# holds two long-poll connections). The exact value matters less than the
300-
# invariant it pins: it must not grow with num_workers (verified unchanged
301-
# at num_workers=6 and num_workers=12).
298+
# num_nodes raylets + the driver + the generator actor's worker + 2 from the
299+
# dashboard head. The dashboard counts twice because its node-info and actor
300+
# subscribers each mint their own subscriber id (see _SubscriberBase.__init__
301+
# in gcs_pubsub.py), so one process holds two long-poll connections.
302+
# The exact value matters less than the invariant it pins: it must not grow
303+
# with num_workers (verified unchanged at num_workers=6 and 12).
302304
expected_long_polling_subscribers = num_nodes + 4
303305

304306
def check():

0 commit comments

Comments
 (0)