-
Notifications
You must be signed in to change notification settings - Fork 1k
Fix sanitize mutable state after replication #3479
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
Conversation
@@ -849,7 +850,7 @@ func (r *HistoryReplicatorImpl) backfillHistory( | |||
} | |||
case *serviceerror.NotFound: | |||
default: | |||
return nil, err | |||
return nil, common.EmptyVersion, err |
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 the value is a "TxnID/TaskID"? Returning a "Version" looks quite confusing to me.
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.
Update to use a EmptyTaskID
mutableState.executionInfo.LastFirstEventTxnId = common.EmptyVersion | ||
mutableState.executionInfo.LastFirstEventTxnId = lastFirstEventTxnID | ||
mutableState.executionInfo.CloseVisibilityTaskId = common.EmptyVersion | ||
mutableState.executionInfo.CloseTransferTaskId = common.EmptyVersion |
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.
Shall we sanitize LastEventTaskId
field as well?
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.
No. This field is to calculate the vector clock. It should not be changed.
// EmptyTaskID is the id of the empty task | ||
EmptyTaskID int64 = 0 |
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.
nit: is this a dup of EmptyEventTaskID
defined above?
* Fix sanitize mutable state after replication
* Fix sanitize mutable state after replication
What changed?
Fix sanitize mutable state after replication
Why?
How did you test it?
local test
Potential risks
Is hotfix candidate?