Skip to content

client/thread: fix multi-PV get()/put() reporting timeout against wrong PV#223

Open
jacquelinegarrahan wants to merge 1 commit into
epics-base:masterfrom
jacquelinegarrahan:fix/thread-multi-pv-timeout-index
Open

client/thread: fix multi-PV get()/put() reporting timeout against wrong PV#223
jacquelinegarrahan wants to merge 1 commit into
epics-base:masterfrom
jacquelinegarrahan:fix/thread-multi-pv-timeout-index

Conversation

@jacquelinegarrahan

Copy link
Copy Markdown

The timeout branch of the collection loop wrote result[i]/name[i] using the
loop variable i, which after value, i = done.get(...) holds the index of
the last PV that succeeded (or the leftover enumerate index if none had).
Because done is a single shared queue, this reported the timeout against the
wrong PV: a fast PV's good value was overwritten with a TimeoutError while the
PV that actually timed out was returned as None (or, with throw=True, the
raised TimeoutError named the wrong PV).

Track the set of outstanding indices explicitly and, on timeout, mark every
still-pending PV. The same bug and fix apply to both get() and put().

Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com

…ng PV

The timeout branch of the collection loop wrote result[i]/name[i] using the
loop variable `i`, which after `value, i = done.get(...)` holds the index of
the last PV that *succeeded* (or the leftover enumerate index if none had).
Because `done` is a single shared queue, this reported the timeout against the
wrong PV: a fast PV's good value was overwritten with a TimeoutError while the
PV that actually timed out was returned as None (or, with throw=True, the
raised TimeoutError named the wrong PV).

Track the set of outstanding indices explicitly and, on timeout, mark every
still-pending PV. The same bug and fix apply to both get() and put().

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant