Files
Alfred Landrumandrodrigozhou 1ebf5f6484 add configurable ownership caching to history client (#4652)
<!-- Describe what has changed in this PR -->
**What changed?**
This adds configurable behavior for the history client to cache shard
ownership information, instead of checking membership for each request.
Cache entries are evicted either for shard ownership lost errors, or for
any error that might indicate the history instance is no longer
available, including timeouts.

The new behavior is not enabled by default.

<!-- Tell your future self why have you made these changes -->
**Why?**
History requests could timeout awaiting shard acquisition at a new
owner, even though the old owner still has ownership. By continuing to
send requests to owners until they signal ownership lost, we can avoid
the unnecessary timeouts and retries.

<!-- How have you verified this change? Tested locally? Added a unit
test? Checked in staging env? -->
**How did you test it?**
New unit tests are added & verified. These changes were also tested in a
staging environment.

<!-- Assuming the worst case, what can be broken when deploying this
change to production? -->
**Potential risks**
The behavior is not enabled by default, so there's no risk with just the
code in place.

<!-- Is this PR a hotfix candidate or require that a notification be
sent to the broader community? (Yes/No) -->
**Is hotfix candidate?**
No.
2023-08-07 18:41:00 -05:00
..
2023-06-16 11:57:16 -07:00