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

Switch force-replication to scan over visibility #2386

Merged
merged 7 commits into from
Jan 20, 2022

Conversation

yiminc
Copy link
Member

@yiminc yiminc commented Jan 18, 2022

What changed?
Scan visibility instead of core execution table.

Why?
Scan table API on SQL persistence is not implemented and also to avoid tombstone issue on Cassandra.

How did you test it?
Manual test. Also integration test (will be in follow up PR).

Potential risks
No

Is hotfix candidate?
No

@yiminc yiminc requested a review from a team January 18, 2022 19:45
service/worker/migration/workflow.go Outdated Show resolved Hide resolved
service/worker/migration/workflow.go Outdated Show resolved Hide resolved
service/worker/migration/workflow.go Outdated Show resolved Hide resolved
service/worker/migration/workflow.go Outdated Show resolved Hide resolved
service/worker/migration/workflow.go Outdated Show resolved Hide resolved
service/worker/migration/workflow.go Show resolved Hide resolved
for i := startIndex; i < len(request.Executions); i++ {
rateLimiter.Wait(ctx)
we := request.Executions[i]
err := a.genReplicationTaskForOneWorkflow(ctx, definition.NewWorkflowKey(request.NamespaceID, we.WorkflowId, we.RunId))
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
err := a.genReplicationTaskForOneWorkflow(ctx, definition.NewWorkflowKey(request.NamespaceID, we.WorkflowId, we.RunId))
err := a.generateWorkflowReplicationTask(ctx, definition.NewWorkflowKey(request.NamespaceID, we.WorkflowId, we.RunId))

please...


defaultListWorkflowsPageSize = 1000
defaultPageCountPerExecution = 200
maxPageCountPerExecution = 1000

minimumAllowedLaggingSeconds = 5
minimumHandoverTimeoutSeconds = 30
Copy link
Member

Choose a reason for hiding this comment

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

Not a part of this PR, but why not time.Duration?

Copy link
Member Author

Choose a reason for hiding this comment

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

It is easier to write in JSON format just a number than time.Duration. But yes, it can be updated to use time.Duration.

@yiminc yiminc enabled auto-merge (squash) January 20, 2022 20:36
@yiminc yiminc merged commit b8a36d6 into temporalio:master Jan 20, 2022
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