-
Notifications
You must be signed in to change notification settings - Fork 812
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
Ut conflict resolver #806
Ut conflict resolver #806
Changes from 1 commit
018d597
85cef17
3cb63ce
1f726bd
ab296cb
d49d82e
ad84e1c
99748b5
e6bd69b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -324,7 +324,9 @@ func (e *mutableStateBuilder) updateReplicationStateVersion(version int64) { | |
|
||
// Assumption: It is expected CurrentVersion on replication state is updated at the start of transaction when | ||
// mutableState is loaded for this workflow execution. | ||
func (e *mutableStateBuilder) updateReplicationStateLastEventID(clusterName string, lastEventID int64) { | ||
func (e *mutableStateBuilder) updateReplicationStateLastEventID(clusterName string, lastWriteVersion, | ||
lastEventID int64) { | ||
e.replicationState.LastWriteVersion = lastWriteVersion | ||
e.replicationState.LastWriteVersion = e.replicationState.CurrentVersion | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this line should be deleted. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. and the active workflow, when calling this function, should use the current version There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fixed. |
||
// TODO: Rename this to NextEventID to stay consistent naming convention with rest of code base | ||
e.replicationState.LastWriteEventID = lastEventID | ||
|
@@ -2137,7 +2139,7 @@ func (e *mutableStateBuilder) ReplicateWorkflowExecutionContinuedAsNewEvent(sour | |
} | ||
|
||
if newStateBuilder.replicationState != nil { | ||
newStateBuilder.updateReplicationStateLastEventID(sourceClusterName, di.ScheduleID) | ||
newStateBuilder.updateReplicationStateLastEventID(sourceClusterName, startedEvent.GetVersion(), di.ScheduleID) | ||
} | ||
|
||
newTransferTasks := []persistence.Task{&persistence.DecisionTask{ | ||
|
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 you should read the version from last event rather than rely on CurrentVersion.