temporalio / temporalio/temporal

getAnyClient with cachingRedirector problem

Open
#6,541 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

potential-bug
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

  1. Use cachingRedirector
  2. Turn off a history host
  3. Call ListQueues

Specifications

  • Version:
  • Platform:

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.