-
Notifications
You must be signed in to change notification settings - Fork 4.1k
contextutil: RunWithTimeout error message is misleading #79424
Copy link
Copy link
Closed
Labels
C-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
Description
contextutil.RunWithTimeout gives error messages like:
operation "send-snapshot" timed out after 1h0m0s (took 10s): ‹rpc error: code = DeadlineExceeded desc = context deadline exceeded›
Where 1h0m0s is the timeout passed to RunWithTimeout(). However, this is misleading, because either the caller or callee can have set their own context timeout that is smaller than the timeout given to RunWithTimeout.
This is even worse in older releases, where the "(took 10s)" part is not present, leading readers to believe the operation actually took 1 hour.
Jira issue: CRDB-14833
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
C-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.