-
Notifications
You must be signed in to change notification settings - Fork 880
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
Update shard replication timestamp with max generated task #3158
Conversation
} | ||
|
||
func (p *ackMgrImpl) GetMaxTaskID() int64 { | ||
func (p *ackMgrImpl) GetMaxTaskInfo() (int64, time.Time) { |
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: should we define a struct
for return value?
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.
don't think it is necessary here.
@@ -121,7 +121,7 @@ func (a *activities) checkReplicationOnce(ctx context.Context, waitRequest waitR | |||
// Caught up to the last checked IDs, and within allowed lagging range | |||
if clusterInfo.AckedTaskId >= waitRequest.WaitForTaskIds[shard.ShardId] && | |||
(shard.MaxReplicationTaskId-clusterInfo.AckedTaskId <= waitRequest.AllowedLaggingTasks || | |||
shard.ShardLocalTime.Sub(*clusterInfo.AckedTaskVisibilityTime) <= waitRequest.AllowedLagging) { | |||
shard.MaxReplicationTaskVisibilityTime.Sub(*clusterInfo.AckedTaskVisibilityTime) <= waitRequest.AllowedLagging) { |
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.
do we have any integration tests which can validate the result here?
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.
Added a unit test in ack manager. The e2e is covered with int test.
* Update shard replication timestamp with max generated task
…o#3158) * Update shard replication timestamp with max generated task
What changed?
Update shard replication timestamp with max generated task
Why?
The namespace migration workflow use the task timestamp to calculate replication lag. We should use the timestamp from replication stack instead of real timestamp.
How did you test it?
Potential risks
Is hotfix candidate?