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

CrossDC bugfixes to replication task generation and conflict resolver #799

Merged
merged 4 commits into from
May 30, 2018

Conversation

samarabbas
Copy link
Contributor

@samarabbas samarabbas commented May 30, 2018

Replication information captured for replication task has the wrong
last event id, as it is captured before CloseSession on mutable state.

Update stale replication task detection to use LastWriteEventID instead
of Current version. Otherwise this results in throwing away tasks when
they could potentially be applied.

Fix broken conflict resolution logic to set mutable state fields like
next event id, lastFirstEventID, etc which were not set as a result of
applying history events and need to be set explicitly.

fix #792 #796

Replication information captured for replication task has the wrong
last event id, as it is captured before CloseSession on mutable state.

Update stale replication task detection to use LastWriteEventID instead
of Current version.  Otherwise this results in throwing away tasks when
they could potentially be applied.

Fix broken conflict resolution logic to set mutable state fields like
next event id, lastFirstEventID, etc which were not set as a result of
applying history events and need to be set explicitly.
@samarabbas samarabbas requested a review from wxing1292 May 30, 2018 19:29
@samarabbas
Copy link
Contributor Author

fixes #792

if batchSize > eventsToApply {
history.Events = history.Events[0:eventsToApply]
}

Copy link
Contributor

Choose a reason for hiding this comment

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

missing a

eventsToApply -= int64(len(history.Events))

here

wxing1292 pushed a commit that referenced this pull request May 30, 2018
@samarabbas samarabbas merged commit 4ae0147 into cadence-workflow:master May 30, 2018
@samarabbas samarabbas deleted the more-xdc-bugfixes branch May 30, 2018 20:38
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.

Cross DC - Investigate MS Builder Being Reset After Conflict Resolution
2 participants