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 activity retry policy properties to replication #7055

Merged
merged 6 commits into from
Jan 10, 2025
Merged

Conversation

ychebotarev
Copy link
Contributor

@ychebotarev ychebotarev commented Jan 7, 2025

What changed?

Add the following activity retry policy properties to the activity replication logic:

  • InitialInterval
  • MaximumInterval
  • MaximumAttempts
  • BackoffCoefficient

Why?

Before there was assumption that activity retry policy can't change. Because of that it was not replicated.
Now we can change activity retry policy via UpdateActivity API. Those changes should be replicated.

How did you test it?

Add func tests that check few updated properties.

Potential risks

Increasing replication size.

Is hotfix candidate?

No

@ychebotarev ychebotarev requested a review from a team as a code owner January 7, 2025 20:50
@ychebotarev ychebotarev requested review from bergundy and yycptt January 7, 2025 20:54
@@ -155,6 +155,10 @@ func (r *ActivityStateReplicatorImpl) SyncActivityState(
LastAttemptCompleteTime: request.LastAttemptCompleteTime,
Stamp: request.Stamp,
Paused: request.Paused,
RetryInitialInterval: request.RetryInitialInterval,
Copy link
Contributor

Choose a reason for hiding this comment

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

also need it for SyncActivitiesState?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure I understand this comment. Any action required?

Copy link
Member

Choose a reason for hiding this comment

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

we don't need to change SyncActivitiesState. historyservice.SyncActivitiesRequest is using ActivitySyncInfo so not extra conversion is needed.
historyservice.SyncActivityRequest though explicitly lists all the fields so need this extra conversion.

@ychebotarev ychebotarev requested a review from yux0 January 9, 2025 23:00
@@ -155,6 +155,10 @@ func (r *ActivityStateReplicatorImpl) SyncActivityState(
LastAttemptCompleteTime: request.LastAttemptCompleteTime,
Stamp: request.Stamp,
Paused: request.Paused,
RetryInitialInterval: request.RetryInitialInterval,
Copy link
Member

Choose a reason for hiding this comment

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

we don't need to change SyncActivitiesState. historyservice.SyncActivitiesRequest is using ActivitySyncInfo so not extra conversion is needed.
historyservice.SyncActivityRequest though explicitly lists all the fields so need this extra conversion.

@ychebotarev ychebotarev requested a review from yycptt January 10, 2025 00:32
@hai719
Copy link
Contributor

hai719 commented Jan 10, 2025

Do we need to change the SyncActivityRequest here?

@yycptt
Copy link
Member

yycptt commented Jan 10, 2025

Do we need to change the SyncActivityRequest here?

Do we want to support new features in the old rpc based replication stack?
I feel no, because I think the reason the rpc based replication still exists are for supporting migrating from very old server to cloud. But if customer are running those very old servers, it means they are not using those new features.

// stamp changed, should update activity
return true
}

if activityInfo.Stamp > stamp {
// stamp changed, should update activity
Copy link
Member

Choose a reason for hiding this comment

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

nit: fix the comment.

@ychebotarev ychebotarev merged commit c49995f into main Jan 10, 2025
49 checks passed
@ychebotarev ychebotarev deleted the y_repl branch January 10, 2025 04:02
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.

4 participants