-
Notifications
You must be signed in to change notification settings - Fork 805
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
bugfix: reset mutable state #804
Conversation
@@ -106,6 +106,7 @@ func (r *conflictResolver) reset(replayEventID int64, startTime time.Time) (*mut | |||
resetMutableStateBuilder.executionInfo.StartTimestamp = startTime | |||
// the last updated time is not important here, since this should be updated with event time afterwards | |||
resetMutableStateBuilder.executionInfo.LastUpdatedTimestamp = startTime | |||
resetMutableStateBuilder.updateReplicationStateLastEventID(sourceCluster, replayEventID) |
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.
I think just setting the lastWriteEventID won't be enough. We also need to set the lastWriteVersion correctly too.
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.
those are updated in #806
@@ -142,7 +142,7 @@ func (r *historyReplicator) ApplyEvents(request *h.ReplicateEventsRequest) (retE | |||
request.GetSourceCluster(), request.GetVersion(), request.GetFirstEventId(), request.GetNextEventId()) | |||
|
|||
resolver := newConflictResolver(r.shard, context, r.historyMgr, r.logger) | |||
msBuilder, err = resolver.reset(ri.GetLastEventId(), msBuilder.executionInfo.StartTimestamp) | |||
msBuilder, err = resolver.reset(request.GetSourceCluster(), ri.GetLastEventId(), msBuilder.executionInfo.StartTimestamp) |
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.
I think it is incorrect to pass in the source cluster on the replication task. It needs to be inferred from the lastWriteVersion.
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.
those are updated in #806
close in favor of #806 |
No description provided.