apple / apple/swift-distributed-actors

Optimize Ask Timeout Error rendering

Open
#752 2 comments 0 reactions 0 assignees View on GitHub
1 - triaged help wanted size/S
Dominant language
Swift
Stars
679
Forks
84
PR merge metrics
No merged PRs in 30d

Description

Those can be quite frequent: `// "error": timedOut(DistributedActors.TimeoutError(message: "No response received for ask to [sact://@127.0.0.1:8888/system/cluster/swim] within timeout [240ms]. Ask was initiated from function [ping(payload:timeout:sequenceNumber:context:onResponse:)] in [/Users/ktoso/code/actors/Sources/DistributedActors/Cluster/SWIM/SWIMPeer+Actor.swift:59] and expected response of type [(extension in DistributedActors):SWIM.SWIM.Message].", timeout: TimeAmount(240ms, nanoseconds: 240000000)))`

and today we render a full string eagerly for TimeoutError.

We should instead carry the information to build this String inside timeout error.

Contributor guide

Open the contributing guide

Research direction

Start by locating TimeoutError and the timeout rendering path; the example originates at Sources/DistributedActors/Cluster/SWIM/SWIMPeer+Actor.swift:59 in ping(payload:timeout:sequenceNumber:context:onResponse:). Confirm how the timeout data is currently assembled, then verify that the error carries the needed information and builds its string only when rendered.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
distributed-systems
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.