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

Enforce persistence context timeout in application layer: Part 3 #3631

Merged
merged 7 commits into from
Oct 13, 2020

Conversation

yycptt
Copy link
Contributor

@yycptt yycptt commented Oct 12, 2020

What changed?
Enforce persistence context timeout in shard context, execution context and execution cache

  • Note context timeout errors in some shard context methods may result in rangeID change and shard movement. To minimize the impact, all persistence APIs for renew shard rangeID will still use context.Background(), and a minimal context timeout (1s) will be enforced on shard context methods that may lead to shard movement.

Context.Background() is used in unit tests if the test is not testing timeout case.

Why?
#3519

How did you test it?
Integration test.

Potential risks
May result in more persistence context timeout, rangeID change more frequently and more shard movement when persistence latency is high.

@yycptt yycptt requested review from yux0 and a team October 12, 2020 21:28
@coveralls
Copy link

coveralls commented Oct 12, 2020

Coverage Status

Coverage increased (+0.007%) to 65.175% when pulling 39c7a3e on yycptt:app-level-ctx-3 into f4a9df2 on uber:master.

@yycptt yycptt merged commit da72f32 into cadence-workflow:master Oct 13, 2020
@yycptt yycptt deleted the app-level-ctx-3 branch October 13, 2020 21:31
github-actions bot pushed a commit to vytautas-karpavicius/cadence that referenced this pull request Feb 4, 2021
…ence-workflow#3631)

Enforce persistence context timeout in shard context, execution context and execution cache

Note context timeout errors in some shard context methods may result in rangeID change and shard movement. To minimize the impact, all persistence APIs for renew shard rangeID will still use context.Background(), and a minimal context timeout (1s) will be enforced on shard context methods that may lead to shard movement.
yux0 pushed a commit to yux0/cadence that referenced this pull request May 4, 2021
…ence-workflow#3631)

Enforce persistence context timeout in shard context, execution context and execution cache

Note context timeout errors in some shard context methods may result in rangeID change and shard movement. To minimize the impact, all persistence APIs for renew shard rangeID will still use context.Background(), and a minimal context timeout (1s) will be enforced on shard context methods that may lead to shard movement.
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.

3 participants