Skip to content

Commit

Permalink
Update replication timestamp with no task (#3487)
Browse files Browse the repository at this point in the history
* Update replication timestamp with no task

* Add comment
  • Loading branch information
yux0 authored Oct 17, 2022
1 parent a4fe3a7 commit dc84e87
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions service/history/replication/task_processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,11 @@ func (p *taskProcessorImpl) paginationFn(_ []byte) ([]interface{}, []byte, error
tasks = append(tasks, task)
}
p.maxRxReceivedTaskID = resp.GetLastRetrievedMessageId()
if len(tasks) == 0 {
// Update processed timestamp to the source cluster time when there is no replication task
p.maxRxProcessedTimestamp = timestamp.TimeValue(resp.GetSyncShardStatus().GetStatusTime())
}

if resp.GetHasMore() {
p.rxTaskBackoff = time.Duration(0)
} else {
Expand Down

0 comments on commit dc84e87

Please # to comment.