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 additional service protection against data inconsistency #1450

Merged
merged 3 commits into from Apr 15, 2021

Conversation

wxing1292
Copy link
Contributor

@wxing1292 wxing1292 commented Apr 9, 2021

What changed?

  • Trigger TrimHistoryBranch operation if GetWorkflowExecutionHistory sees dataloss error
  • Rename last_history_node_txn_id to last_first_event_txn_id

Why?
Additional service protection, also see #1449

How did you test it?
Existing tests

Potential risks
N/A

Is hotfix candidate?
No

@wxing1292 wxing1292 requested a review from alexshtin April 9, 2021 23:45
* Trigger TrimHistoryBranch operation if GetWorkflowExecutionHistory sees dataloss error
* Rename last_history_node_txn_id to last_first_event_txn_id
@wxing1292 wxing1292 marked this pull request as ready for review April 14, 2021 17:51
@wxing1292 wxing1292 requested a review from a team April 14, 2021 17:51
@wxing1292 wxing1292 changed the title Add additional service protection again data inconsistency Add additional service protection against data inconsistency Apr 14, 2021
@wxing1292 wxing1292 enabled auto-merge (squash) April 14, 2021 19:58
@alexshtin alexshtin disabled auto-merge April 15, 2021 19:30
@@ -590,6 +592,19 @@ func (wh *WorkflowHandler) GetWorkflowExecutionHistory(ctx context.Context, requ
continuationToken.IsWorkflowRunning = isWorkflowRunning
continuationToken.PersistenceToken = nil
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you list potential functions that might return *serviceerror.DataLoss here. And also some sort of TODO comment to move this close to history store.

@wxing1292 wxing1292 enabled auto-merge (squash) April 15, 2021 19:37
@wxing1292 wxing1292 merged commit 57d9851 into temporalio:master Apr 15, 2021
@wxing1292 wxing1292 deleted the events-chaining-wire branch April 15, 2021 19:59
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