Skip to content

Commit 8db5cab

Browse files
Refactor to deduplicate common code with route_and_send_request
Signed-off-by: Jeffrey Wang <jeffreywang@anyscale.com>
1 parent ceaac13 commit 8db5cab

2 files changed

Lines changed: 155 additions & 153 deletions

File tree

python/ray/serve/_private/request_router/replica_wrapper.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,11 @@ class ReplicaSelection:
407407
default=False, init=False
408408
) # Tracks if dispatch was called
409409

410+
# Set by dispatch once the result's done-callback is wired up. Read by
411+
# choose_replica's finally to decide whether to fire on_request_completed
412+
# manually (only one of the two paths should fire it).
413+
_completion_callback_registered: bool = field(default=False, init=False)
414+
410415
@property
411416
def address(self) -> str:
412417
"""Returns the replica address in host:port format."""

0 commit comments

Comments
 (0)