-
Notifications
You must be signed in to change notification settings - Fork 859
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
Wait for user data propagation in deployment workflow #6978
base: main
Are you sure you want to change the base?
Conversation
case <-ctx.Done(): | ||
return ctx.Err() | ||
case err := <-complete: | ||
return err |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we log the error? Also, I'm going to make task for adding metrics and alerts we need them for across the board for effective monitoring of user data processing and deployment WFs.
@@ -302,11 +311,19 @@ func (d *DeploymentWorkflowRunner) handleSyncState(ctx workflow.Context, args *d | |||
} | |||
} | |||
activityCtx := workflow.WithActivityOptions(ctx, defaultActivityOptions) | |||
err = workflow.ExecuteActivity(activityCtx, d.a.SyncUserData, syncReq).Get(ctx, nil) | |||
var syncRes deploymentspb.SyncUserDataResponse | |||
err = workflow.ExecuteActivity(activityCtx, d.a.SyncUserData, syncReq).Get(ctx, &syncRes) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think we'd need to limit the number of TQs we pass to each Activity call here? It seems 1000 TQs at one time can become very fragile.
if err != nil { | ||
// TODO: if this fails, should we roll back anything? | ||
return nil, err | ||
} | ||
// wait for propagation | ||
err = workflow.ExecuteActivity(activityCtx, d.a.CheckUserDataPropagation, &deploymentspb.CheckUserDataPropagationRequest{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same for this call. In here the problem would be more sever because there is another level of fanout to all partitions.
if err != nil { | ||
// TODO: if this fails, should we roll back anything? | ||
return nil, err | ||
} | ||
// wait for propagation | ||
err = workflow.ExecuteActivity(activityCtx, d.a.CheckUserDataPropagation, &deploymentspb.CheckUserDataPropagationRequest{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to path for this change, right?
What changed?
The deployment workflow waits for user data to propagate to all task queue partitions before updating its state.
Why?
We should ensure that the desired dispatch semantics will be in effect on all task queue partitions.
How did you test it?
existing tests, will add new one if this approach is good