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

Add feature flag to not fail in flight decision #3167

Merged
merged 10 commits into from
Apr 7, 2020
Merged

Add feature flag to not fail in flight decision #3167

merged 10 commits into from
Apr 7, 2020

Conversation

yux0
Copy link
Contributor

@yux0 yux0 commented Apr 3, 2020

What changed?
Check if there is buffered event prior to add a decision task fail.

Why?
We fail the decision to make sure the versions of events inside one batch are the same. However, this blocks replicating missing workflow from another cluster.

For example:

  1. Event 1 - 10 are generated in cluster A with version X
  2. Event 11-20 are generated in cluster B with version X+10
  3. Cluster A gets deconstructed and lost all data
  4. Cluster A should recover this workflow from cluster B

How did you test it?
local two clusters test

Potential risks
In the worst case, the versions inside one batch will be different.

@yux0 yux0 requested review from yycptt and a team April 3, 2020 21:17
@yux0 yux0 changed the title Fail decision Check if hasBufferedEvent before failing the decision Apr 3, 2020
@coveralls
Copy link

coveralls commented Apr 3, 2020

Coverage Status

Coverage increased (+0.5%) to 69.473% when pulling ea0e7d2 on fail-decision into 315ce05 on master.

@yux0 yux0 changed the title Check if hasBufferedEvent before failing the decision Add feature flag to not fail in flight decision Apr 6, 2020
@yycptt
Copy link
Contributor

yycptt commented Apr 7, 2020

Please add some comments in the code explaining the idea of this pr. I guess we may need to re-visit this solution in the future.

@yux0 yux0 merged commit d098eac into master Apr 7, 2020
@yux0 yux0 deleted the fail-decision branch April 7, 2020 17:54
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