temporalio / temporalio/temporal
getAnyClient with cachingRedirector problem
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 23.2k
- Forks
- 1.9k
- Avg merge
- 2d 8h
- Merged PRs (30d)
- 228
Description
Expected Behavior
ListQueues (and other methods using getAnyClient) handles history hosts failures.
Actual Behavior
cachingRedirector handles history failures in its redirectLoop and removes failed hosts from the cache
https://github.com/temporalio/temporal/blob/86817057833b6c44d47c8da6920b7af783348355/client/history/caching_redirector.go#L110-L113
However, ListQueues does not use redirectLoop and calls corresponding client's method directly.
https://github.com/temporalio/temporal/blob/86817057833b6c44d47c8da6920b7af783348355/client/history/client.go#L298-L308
That causes a broken host not to be removed from the cache.
Steps to Reproduce the Problem
- Use
cachingRedirector - Turn off a history host
- Call
ListQueues
Specifications
- Version:
- Platform:
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in client/history/caching_redirector.go around redirectLoop, then compare the ListQueues path in client/history/client.go around lines 298-308. Reproduce the issue by using cachingRedirector, turning off a history host, and calling ListQueues; done means the failed host is removed from the cache as it is for other getAnyClient methods.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend, distributed-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100