Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure minimal context timeout for shard context APIs #2660

Merged
merged 2 commits into from Mar 28, 2022

Conversation

yycptt
Copy link
Member

@yycptt yycptt commented Mar 28, 2022

What changed?

  • Ensure minimal 1s context timeout for shard context APIs that may lead to shard movement.

Why?

  • Context timeout errors in some shard context APIs will result in shard ownership lost and the processing for the entire shard will be blocked until the shard is re-acquired. Those context may from user calls or background task processing, and we don't have good control over what's the remaining time for making the shard context API call. To minimize the impact of this persistence context change, a minimal context timeout (1s) will be enforced on shard context methods that may lead to re-acquire shard.
  • Prepare for the next set of changes for actually using persistence context timeout passed into persistence store implementation.

How did you test it?

  • Existing test

Potential risks

  • Very low, the context is not actually used by persistence implementations

Is hotfix candidate?

  • no

@yycptt yycptt requested review from wxing1292 and yiminc March 28, 2022 20:24
@yycptt yycptt requested a review from a team as a code owner March 28, 2022 20:24
@yycptt yycptt merged commit f066d97 into temporalio:master Mar 28, 2022
@yycptt yycptt deleted the ensure-shard-context branch March 28, 2022 22:44
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.

None yet

2 participants