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

bugfix: reset mutable state #804

Closed
wants to merge 2 commits into from
Closed

bugfix: reset mutable state #804

wants to merge 2 commits into from

Conversation

wxing1292
Copy link
Contributor

No description provided.

@wxing1292 wxing1292 requested a review from samarabbas May 31, 2018 17:27
@@ -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)
Copy link
Contributor

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.

Copy link
Contributor Author

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)
Copy link
Contributor

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.

Copy link
Contributor Author

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

@wxing1292
Copy link
Contributor Author

close in favor of #806

@wxing1292 wxing1292 closed this Jun 3, 2018
@wxing1292 wxing1292 deleted the bugfix-reset branch June 5, 2018 21:14
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.

2 participants