Report acked replication task timestamp (#2173)

Report back acked replication task timestamp
So source cluster could know how far the remote cluster is lagging behind on replication queue.
This commit is contained in:
Yimin Chen
2021-11-15 10:58:36 -08:00
committed by GitHub
parent 170bde6aca
commit 43ac47ffb4
14 changed files with 342 additions and 166 deletions

View File

@@ -71,7 +71,8 @@ type ReplicationTask struct {
// *ReplicationTask_SyncActivityTaskAttributes
// *ReplicationTask_HistoryMetadataTaskAttributes
// *ReplicationTask_HistoryTaskV2Attributes
Attributes isReplicationTask_Attributes `protobuf_oneof:"attributes"`
Attributes isReplicationTask_Attributes `protobuf_oneof:"attributes"`
VisibilityTime *time.Time `protobuf:"bytes,9,opt,name=visibility_time,json=visibilityTime,proto3,stdtime" json:"visibility_time,omitempty"`
}
func (m *ReplicationTask) Reset() { *m = ReplicationTask{} }
@@ -202,6 +203,13 @@ func (m *ReplicationTask) GetHistoryTaskV2Attributes() *HistoryTaskV2Attributes
return nil
}
func (m *ReplicationTask) GetVisibilityTime() *time.Time {
if m != nil {
return m.VisibilityTime
}
return nil
}
// XXX_OneofWrappers is for the internal use of the proto package.
func (*ReplicationTask) XXX_OneofWrappers() []interface{} {
return []interface{}{
@@ -221,6 +229,8 @@ type ReplicationToken struct {
// lastProcessedMessageId is the last messageId that is processed on the passive side.
// This can be different than lastRetrievedMessageId if passive side supports prefetching messages.
LastProcessedMessageId int64 `protobuf:"varint,3,opt,name=last_processed_message_id,json=lastProcessedMessageId,proto3" json:"last_processed_message_id,omitempty"`
// The VisibilityTime of last processed ReplicationTask
LastProcessedVisibilityTime *time.Time `protobuf:"bytes,4,opt,name=last_processed_visibility_time,json=lastProcessedVisibilityTime,proto3,stdtime" json:"last_processed_visibility_time,omitempty"`
}
func (m *ReplicationToken) Reset() { *m = ReplicationToken{} }
@@ -276,6 +286,13 @@ func (m *ReplicationToken) GetLastProcessedMessageId() int64 {
return 0
}
func (m *ReplicationToken) GetLastProcessedVisibilityTime() *time.Time {
if m != nil {
return m.LastProcessedVisibilityTime
}
return nil
}
type SyncShardStatus struct {
StatusTime *time.Time `protobuf:"bytes,1,opt,name=status_time,json=statusTime,proto3,stdtime" json:"status_time,omitempty"`
}
@@ -1093,101 +1110,104 @@ func init() {
}
var fileDescriptor_edd9fae2af6b0532 = []byte{
// 1503 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x58, 0x4f, 0x6f, 0x1a, 0x47,
0x1b, 0xf7, 0x02, 0x86, 0x65, 0xf8, 0x9b, 0xf1, 0xeb, 0xd7, 0x18, 0xc9, 0xc4, 0x46, 0xc9, 0x1b,
0xe7, 0x55, 0xb5, 0xc4, 0xf8, 0xd0, 0x26, 0xa9, 0x2a, 0xd9, 0x69, 0x53, 0x63, 0x29, 0x69, 0xb4,
0xb1, 0x12, 0xa9, 0x97, 0xed, 0x98, 0x1d, 0x60, 0x65, 0xd8, 0x45, 0x33, 0x03, 0x2e, 0x3d, 0x55,
0xea, 0xa1, 0x97, 0x56, 0xca, 0x77, 0x48, 0x55, 0xf5, 0xd4, 0xcf, 0x91, 0x63, 0x2e, 0x95, 0xd2,
0x53, 0x1b, 0xa7, 0x87, 0x1e, 0xf3, 0x11, 0xaa, 0xf9, 0xb3, 0xb0, 0xcb, 0x02, 0xa1, 0xa9, 0x72,
0xea, 0x8d, 0x79, 0xfe, 0xfc, 0x9e, 0x99, 0x67, 0x9e, 0xe7, 0xf9, 0xcd, 0x02, 0x6e, 0x30, 0xdc,
0xeb, 0x7b, 0x04, 0x75, 0x6b, 0x14, 0x93, 0x21, 0x26, 0x35, 0xd4, 0x77, 0x6a, 0x04, 0xf7, 0xbb,
0x4e, 0x13, 0x31, 0xc7, 0x73, 0x6b, 0xc3, 0xbd, 0x5a, 0x0f, 0x53, 0x8a, 0xda, 0xd8, 0xe8, 0x13,
0x8f, 0x79, 0xb0, 0xea, 0x7b, 0x18, 0xd2, 0xc3, 0x40, 0x7d, 0xc7, 0x08, 0x78, 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0xfd, 0x7e, 0x51, 0xd1, 0xfe, 0xbc, 0xa8, 0xac, 0xbc, 0xbe, 0xa8, 0x68,
0x4f, 0x5e, 0x55, 0x56, 0x9e, 0xbf, 0xaa, 0xac, 0xbc, 0x78, 0x55, 0x59, 0xf9, 0x7c, 0xbf, 0xed,
0x4d, 0xa2, 0x39, 0xde, 0xfc, 0xff, 0xad, 0x6e, 0x13, 0xdc, 0x57, 0xab, 0xd3, 0xa4, 0x68, 0x92,
0xfd, 0xbf, 0x02, 0x00, 0x00, 0xff, 0xff, 0x9f, 0xd0, 0x18, 0x88, 0xef, 0x12, 0x00, 0x00,
// 1537 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x58, 0x4f, 0x6f, 0x1b, 0x45,
0x14, 0xcf, 0xda, 0x8e, 0xff, 0x3c, 0xff, 0xed, 0x84, 0x10, 0xc7, 0x28, 0x6e, 0x62, 0xb5, 0x34,
0x45, 0xc8, 0x6e, 0x92, 0x03, 0xb4, 0x45, 0x48, 0x49, 0xa1, 0xc4, 0x91, 0x5a, 0xaa, 0x6d, 0xd4,
0x4a, 0x5c, 0x96, 0x89, 0x77, 0x6c, 0xaf, 0x62, 0xef, 0x5a, 0x33, 0x63, 0x07, 0x73, 0x42, 0xe2,
0x80, 0x84, 0x40, 0xea, 0x77, 0x80, 0x03, 0x27, 0x3e, 0x47, 0x8f, 0xbd, 0x20, 0x95, 0x13, 0x34,
0xe5, 0xc0, 0xb1, 0x7c, 0x03, 0x34, 0xb3, 0xb3, 0xf6, 0xae, 0xd7, 0x76, 0xdd, 0xa2, 0x9e, 0xb8,
0x79, 0xde, 0x7b, 0xbf, 0xdf, 0x9b, 0x79, 0xf3, 0xfe, 0xcc, 0x1a, 0xae, 0x71, 0xd2, 0xed, 0x39,
0x14, 0x77, 0x6a, 0x8c, 0xd0, 0x01, 0xa1, 0x35, 0xdc, 0xb3, 0x6a, 0x94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x0f, 0x3a, 0xce,
0x89, 0xae, 0xec, 0xd1, 0x6d, 0xc8, 0x79, 0xd3, 0x40, 0x31, 0x24, 0x16, 0x64, 0xc8, 0xb8, 0xc3,
0x40, 0xb6, 0x3f, 0x76, 0x14, 0x4b, 0x6a, 0x85, 0xc8, 0x81, 0xf5, 0xe4, 0x59, 0x79, 0xe9, 0xe9,
0xb3, 0xf2, 0xd2, 0x8b, 0x67, 0x65, 0xed, 0x9b, 0xf3, 0xb2, 0xf6, 0xcb, 0x79, 0x59, 0x7b, 0x7c,
0x5e, 0xd6, 0x9e, 0x9c, 0x97, 0xb5, 0x3f, 0xcf, 0xcb, 0xda, 0xdf, 0xe7, 0xe5, 0xa5, 0x17, 0xe7,
0x65, 0xed, 0xd1, 0xf3, 0xf2, 0xd2, 0x93, 0xe7, 0xe5, 0xa5, 0xa7, 0xcf, 0xcb, 0x4b, 0x5f, 0xec,
0xb5, 0x9c, 0xb1, 0x37, 0xcb, 0x99, 0xfd, 0x4f, 0xdb, 0x4d, 0x4a, 0x7a, 0x6a, 0x75, 0x12, 0x97,
0x45, 0xb2, 0xf7, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xa0, 0xdf, 0x1d, 0x36, 0xa1, 0x13, 0x00,
0x00,
}
func (this *ReplicationTask) Equal(that interface{}) bool {
@@ -1224,6 +1244,13 @@ func (this *ReplicationTask) Equal(that interface{}) bool {
} else if !this.Attributes.Equal(that1.Attributes) {
return false
}
if that1.VisibilityTime == nil {
if this.VisibilityTime != nil {
return false
}
} else if !this.VisibilityTime.Equal(*that1.VisibilityTime) {
return false
}
return true
}
func (this *ReplicationTask_NamespaceTaskAttributes) Equal(that interface{}) bool {
@@ -1398,6 +1425,13 @@ func (this *ReplicationToken) Equal(that interface{}) bool {
if this.LastProcessedMessageId != that1.LastProcessedMessageId {
return false
}
if that1.LastProcessedVisibilityTime == nil {
if this.LastProcessedVisibilityTime != nil {
return false
}
} else if !this.LastProcessedVisibilityTime.Equal(*that1.LastProcessedVisibilityTime) {
return false
}
return true
}
func (this *SyncShardStatus) Equal(that interface{}) bool {
@@ -1813,13 +1847,14 @@ func (this *ReplicationTask) GoString() string {
if this == nil {
return "nil"
}
s := make([]string, 0, 12)
s := make([]string, 0, 13)
s = append(s, "&repication.ReplicationTask{")
s = append(s, "TaskType: "+fmt.Sprintf("%#v", this.TaskType)+",\n")
s = append(s, "SourceTaskId: "+fmt.Sprintf("%#v", this.SourceTaskId)+",\n")
if this.Attributes != nil {
s = append(s, "Attributes: "+fmt.Sprintf("%#v", this.Attributes)+",\n")
}
s = append(s, "VisibilityTime: "+fmt.Sprintf("%#v", this.VisibilityTime)+",\n")
s = append(s, "}")
return strings.Join(s, "")
}
@@ -1875,11 +1910,12 @@ func (this *ReplicationToken) GoString() string {
if this == nil {
return "nil"
}
s := make([]string, 0, 7)
s := make([]string, 0, 8)
s = append(s, "&repication.ReplicationToken{")
s = append(s, "ShardId: "+fmt.Sprintf("%#v", this.ShardId)+",\n")
s = append(s, "LastRetrievedMessageId: "+fmt.Sprintf("%#v", this.LastRetrievedMessageId)+",\n")
s = append(s, "LastProcessedMessageId: "+fmt.Sprintf("%#v", this.LastProcessedMessageId)+",\n")
s = append(s, "LastProcessedVisibilityTime: "+fmt.Sprintf("%#v", this.LastProcessedVisibilityTime)+",\n")
s = append(s, "}")
return strings.Join(s, "")
}
@@ -2078,6 +2114,16 @@ func (m *ReplicationTask) MarshalToSizedBuffer(dAtA []byte) (int, error) {
_ = i
var l int
_ = l
if m.VisibilityTime != nil {
n1, err1 := github_com_gogo_protobuf_types.StdTimeMarshalTo(*m.VisibilityTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(*m.VisibilityTime):])
if err1 != nil {
return 0, err1
}
i -= n1
i = encodeVarintMessage(dAtA, i, uint64(n1))
i--
dAtA[i] = 0x4a
}
if m.Attributes != nil {
{
size := m.Attributes.Size()
@@ -2246,6 +2292,16 @@ func (m *ReplicationToken) MarshalToSizedBuffer(dAtA []byte) (int, error) {
_ = i
var l int
_ = l
if m.LastProcessedVisibilityTime != nil {
n8, err8 := github_com_gogo_protobuf_types.StdTimeMarshalTo(*m.LastProcessedVisibilityTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(*m.LastProcessedVisibilityTime):])
if err8 != nil {
return 0, err8
}
i -= n8
i = encodeVarintMessage(dAtA, i, uint64(n8))
i--
dAtA[i] = 0x22
}
if m.LastProcessedMessageId != 0 {
i = encodeVarintMessage(dAtA, i, uint64(m.LastProcessedMessageId))
i--
@@ -2285,12 +2341,12 @@ func (m *SyncShardStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) {
var l int
_ = l
if m.StatusTime != nil {
n7, err7 := github_com_gogo_protobuf_types.StdTimeMarshalTo(*m.StatusTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(*m.StatusTime):])
if err7 != nil {
return 0, err7
n9, err9 := github_com_gogo_protobuf_types.StdTimeMarshalTo(*m.StatusTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(*m.StatusTime):])
if err9 != nil {
return 0, err9
}
i -= n7
i = encodeVarintMessage(dAtA, i, uint64(n7))
i -= n9
i = encodeVarintMessage(dAtA, i, uint64(n9))
i--
dAtA[i] = 0xa
}
@@ -2697,12 +2753,12 @@ func (m *SyncShardStatusTaskAttributes) MarshalToSizedBuffer(dAtA []byte) (int,
var l int
_ = l
if m.StatusTime != nil {
n14, err14 := github_com_gogo_protobuf_types.StdTimeMarshalTo(*m.StatusTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(*m.StatusTime):])
if err14 != nil {
return 0, err14
n16, err16 := github_com_gogo_protobuf_types.StdTimeMarshalTo(*m.StatusTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(*m.StatusTime):])
if err16 != nil {
return 0, err16
}
i -= n14
i = encodeVarintMessage(dAtA, i, uint64(n14))
i -= n16
i = encodeVarintMessage(dAtA, i, uint64(n16))
i--
dAtA[i] = 0x1a
}
@@ -2790,22 +2846,22 @@ func (m *SyncActivityTaskAttributes) MarshalToSizedBuffer(dAtA []byte) (int, err
dAtA[i] = 0x52
}
if m.LastHeartbeatTime != nil {
n18, err18 := github_com_gogo_protobuf_types.StdTimeMarshalTo(*m.LastHeartbeatTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(*m.LastHeartbeatTime):])
if err18 != nil {
return 0, err18
n20, err20 := github_com_gogo_protobuf_types.StdTimeMarshalTo(*m.LastHeartbeatTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(*m.LastHeartbeatTime):])
if err20 != nil {
return 0, err20
}
i -= n18
i = encodeVarintMessage(dAtA, i, uint64(n18))
i -= n20
i = encodeVarintMessage(dAtA, i, uint64(n20))
i--
dAtA[i] = 0x4a
}
if m.StartedTime != nil {
n19, err19 := github_com_gogo_protobuf_types.StdTimeMarshalTo(*m.StartedTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(*m.StartedTime):])
if err19 != nil {
return 0, err19
n21, err21 := github_com_gogo_protobuf_types.StdTimeMarshalTo(*m.StartedTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(*m.StartedTime):])
if err21 != nil {
return 0, err21
}
i -= n19
i = encodeVarintMessage(dAtA, i, uint64(n19))
i -= n21
i = encodeVarintMessage(dAtA, i, uint64(n21))
i--
dAtA[i] = 0x42
}
@@ -2815,12 +2871,12 @@ func (m *SyncActivityTaskAttributes) MarshalToSizedBuffer(dAtA []byte) (int, err
dAtA[i] = 0x38
}
if m.ScheduledTime != nil {
n20, err20 := github_com_gogo_protobuf_types.StdTimeMarshalTo(*m.ScheduledTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(*m.ScheduledTime):])
if err20 != nil {
return 0, err20
n22, err22 := github_com_gogo_protobuf_types.StdTimeMarshalTo(*m.ScheduledTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(*m.ScheduledTime):])
if err22 != nil {
return 0, err22
}
i -= n20
i = encodeVarintMessage(dAtA, i, uint64(n20))
i -= n22
i = encodeVarintMessage(dAtA, i, uint64(n22))
i--
dAtA[i] = 0x32
}
@@ -2966,6 +3022,10 @@ func (m *ReplicationTask) Size() (n int) {
if m.Attributes != nil {
n += m.Attributes.Size()
}
if m.VisibilityTime != nil {
l = github_com_gogo_protobuf_types.SizeOfStdTime(*m.VisibilityTime)
n += 1 + l + sovMessage(uint64(l))
}
return n
}
@@ -3056,6 +3116,10 @@ func (m *ReplicationToken) Size() (n int) {
if m.LastProcessedMessageId != 0 {
n += 1 + sovMessage(uint64(m.LastProcessedMessageId))
}
if m.LastProcessedVisibilityTime != nil {
l = github_com_gogo_protobuf_types.SizeOfStdTime(*m.LastProcessedVisibilityTime)
n += 1 + l + sovMessage(uint64(l))
}
return n
}
@@ -3380,6 +3444,7 @@ func (this *ReplicationTask) String() string {
`TaskType:` + fmt.Sprintf("%v", this.TaskType) + `,`,
`SourceTaskId:` + fmt.Sprintf("%v", this.SourceTaskId) + `,`,
`Attributes:` + fmt.Sprintf("%v", this.Attributes) + `,`,
`VisibilityTime:` + strings.Replace(fmt.Sprintf("%v", this.VisibilityTime), "Timestamp", "types.Timestamp", 1) + `,`,
`}`,
}, "")
return s
@@ -3452,6 +3517,7 @@ func (this *ReplicationToken) String() string {
`ShardId:` + fmt.Sprintf("%v", this.ShardId) + `,`,
`LastRetrievedMessageId:` + fmt.Sprintf("%v", this.LastRetrievedMessageId) + `,`,
`LastProcessedMessageId:` + fmt.Sprintf("%v", this.LastProcessedMessageId) + `,`,
`LastProcessedVisibilityTime:` + strings.Replace(fmt.Sprintf("%v", this.LastProcessedVisibilityTime), "Timestamp", "types.Timestamp", 1) + `,`,
`}`,
}, "")
return s
@@ -3892,6 +3958,42 @@ func (m *ReplicationTask) Unmarshal(dAtA []byte) error {
}
m.Attributes = &ReplicationTask_HistoryTaskV2Attributes{v}
iNdEx = postIndex
case 9:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field VisibilityTime", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowMessage
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthMessage
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthMessage
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.VisibilityTime == nil {
m.VisibilityTime = new(time.Time)
}
if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(m.VisibilityTime, dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipMessage(dAtA[iNdEx:])
@@ -4002,6 +4104,42 @@ func (m *ReplicationToken) Unmarshal(dAtA []byte) error {
break
}
}
case 4:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field LastProcessedVisibilityTime", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowMessage
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthMessage
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthMessage
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.LastProcessedVisibilityTime == nil {
m.LastProcessedVisibilityTime = new(time.Time)
}
if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(m.LastProcessedVisibilityTime, dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipMessage(dAtA[iNdEx:])

View File

@@ -51,6 +51,7 @@ message ReplicationTask {
HistoryMetadataTaskAttributes history_metadata_task_attributes = 7;
HistoryTaskV2Attributes history_task_v2_attributes = 8;
}
google.protobuf.Timestamp visibility_time = 9 [(gogoproto.stdtime) = true];
}
message ReplicationToken {
@@ -60,6 +61,8 @@ message ReplicationToken {
// lastProcessedMessageId is the last messageId that is processed on the passive side.
// This can be different than lastRetrievedMessageId if passive side supports prefetching messages.
int64 last_processed_message_id = 3;
// The VisibilityTime of last processed ReplicationTask
google.protobuf.Timestamp last_processed_visibility_time = 4 [(gogoproto.stdtime) = true];
}
message SyncShardStatus {

View File

@@ -1171,6 +1171,7 @@ func (h *Handler) GetReplicationMessages(ctx context.Context, request *historyse
ctx,
request.GetClusterName(),
token.GetLastProcessedMessageId(),
timestamp.TimeValue(token.LastProcessedVisibilityTime),
token.GetLastRetrievedMessageId(),
)
if err != nil {

View File

@@ -2864,6 +2864,7 @@ func (e *historyEngineImpl) GetReplicationMessages(
ctx context.Context,
pollingCluster string,
ackMessageID int64,
ackTimestampe time.Time,
queryMessageID int64,
) (*replicationspb.ReplicationMessages, error) {
@@ -2871,6 +2872,7 @@ func (e *historyEngineImpl) GetReplicationMessages(
if err := e.shard.UpdateClusterReplicationLevel(
pollingCluster,
ackMessageID,
ackTimestampe,
); err != nil {
e.logger.Error("error updating replication level for shard", tag.Error(err), tag.OperationFailed)
}

View File

@@ -87,9 +87,10 @@ type (
// send side
minTxAckedTaskID int64
// recv side
maxRxProcessedTaskID int64
maxRxReceivedTaskID int64
rxTaskBackoff time.Duration
maxRxProcessedTaskID int64
maxRxProcessedTimestamp time.Time
maxRxReceivedTaskID int64
rxTaskBackoff time.Duration
requestChan chan<- *replicationTaskRequest
syncShardChan chan *replicationspb.SyncShardStatus
@@ -261,6 +262,7 @@ func (p *ReplicationTaskProcessorImpl) pollProcessReplicationTasks() (retError e
return err
}
p.maxRxProcessedTaskID = replicationTask.GetSourceTaskId()
p.maxRxProcessedTimestamp = timestamp.TimeValue(replicationTask.GetVisibilityTime())
}
if !p.isStopped() {
@@ -425,9 +427,10 @@ func (p *ReplicationTaskProcessorImpl) paginationFn(_ []byte) ([]interface{}, []
respChan := make(chan *replicationspb.ReplicationMessages, 1)
p.requestChan <- &replicationTaskRequest{
token: &replicationspb.ReplicationToken{
ShardId: p.shard.GetShardID(),
LastProcessedMessageId: p.maxRxProcessedTaskID,
LastRetrievedMessageId: p.maxRxReceivedTaskID,
ShardId: p.shard.GetShardID(),
LastProcessedMessageId: p.maxRxProcessedTaskID,
LastProcessedVisibilityTime: &p.maxRxProcessedTimestamp,
LastRetrievedMessageId: p.maxRxReceivedTaskID,
},
respChan: respChan,
}

View File

@@ -363,7 +363,7 @@ func (s *replicationTaskProcessorSuite) TestConvertTaskToDLQTask_History() {
func (s *replicationTaskProcessorSuite) TestCleanupReplicationTask_Noop() {
ackedTaskID := int64(12345)
s.mockResource.ShardMgr.EXPECT().UpdateShard(gomock.Any()).Return(nil)
err := s.mockShard.UpdateClusterReplicationLevel(cluster.TestAlternativeClusterName, ackedTaskID)
err := s.mockShard.UpdateClusterReplicationLevel(cluster.TestAlternativeClusterName, ackedTaskID, time.Time{})
s.NoError(err)
s.replicationTaskProcessor.minTxAckedTaskID = ackedTaskID
@@ -374,7 +374,7 @@ func (s *replicationTaskProcessorSuite) TestCleanupReplicationTask_Noop() {
func (s *replicationTaskProcessorSuite) TestCleanupReplicationTask_Cleanup() {
ackedTaskID := int64(12345)
s.mockResource.ShardMgr.EXPECT().UpdateShard(gomock.Any()).Return(nil)
err := s.mockShard.UpdateClusterReplicationLevel(cluster.TestAlternativeClusterName, ackedTaskID)
err := s.mockShard.UpdateClusterReplicationLevel(cluster.TestAlternativeClusterName, ackedTaskID, time.Time{})
s.NoError(err)
s.replicationTaskProcessor.minTxAckedTaskID = ackedTaskID - 1
@@ -432,13 +432,15 @@ func (s *replicationTaskProcessorSuite) TestPaginationFn_Success_More() {
s.replicationTaskProcessor.rxTaskBackoff = rxTaskBackoff
requestToken := &replicationspb.ReplicationToken{
ShardId: s.shardID,
LastProcessedMessageId: maxRxProcessedTaskID,
LastRetrievedMessageId: maxRxReceivedTaskID,
ShardId: s.shardID,
LastProcessedMessageId: maxRxProcessedTaskID,
LastProcessedVisibilityTime: &time.Time{},
LastRetrievedMessageId: maxRxReceivedTaskID,
}
go func() {
request := <-s.requestChan
defer close(request.respChan)
s.Equal(requestToken, request.token)
request.respChan <- &replicationspb.ReplicationMessages{
SyncShardStatus: syncShardTask,
@@ -446,7 +448,6 @@ func (s *replicationTaskProcessorSuite) TestPaginationFn_Success_More() {
LastRetrievedMessageId: lastRetrievedMessageID,
HasMore: true,
}
close(request.respChan)
}()
tasks, _, err := s.replicationTaskProcessor.paginationFn(nil)
@@ -504,13 +505,15 @@ func (s *replicationTaskProcessorSuite) TestPaginationFn_Success_NoMore() {
s.replicationTaskProcessor.rxTaskBackoff = rxTaskBackoff
requestToken := &replicationspb.ReplicationToken{
ShardId: s.shardID,
LastProcessedMessageId: maxRxProcessedTaskID,
LastRetrievedMessageId: maxRxReceivedTaskID,
ShardId: s.shardID,
LastProcessedMessageId: maxRxProcessedTaskID,
LastProcessedVisibilityTime: &time.Time{},
LastRetrievedMessageId: maxRxReceivedTaskID,
}
go func() {
request := <-s.requestChan
defer close(request.respChan)
s.Equal(requestToken, request.token)
request.respChan <- &replicationspb.ReplicationMessages{
SyncShardStatus: syncShardTask,
@@ -518,7 +521,6 @@ func (s *replicationTaskProcessorSuite) TestPaginationFn_Success_NoMore() {
LastRetrievedMessageId: lastRetrievedMessageID,
HasMore: false,
}
close(request.respChan)
}()
tasks, _, err := s.replicationTaskProcessor.paginationFn(nil)
@@ -540,15 +542,16 @@ func (s *replicationTaskProcessorSuite) TestPaginationFn_Error() {
s.replicationTaskProcessor.rxTaskBackoff = rxTaskBackoff
requestToken := &replicationspb.ReplicationToken{
ShardId: s.shardID,
LastProcessedMessageId: maxRxProcessedTaskID,
LastRetrievedMessageId: maxRxReceivedTaskID,
ShardId: s.shardID,
LastProcessedMessageId: maxRxProcessedTaskID,
LastProcessedVisibilityTime: &time.Time{},
LastRetrievedMessageId: maxRxReceivedTaskID,
}
go func() {
request := <-s.requestChan
defer close(request.respChan)
s.Equal(requestToken, request.token)
close(request.respChan)
}()
tasks, _, err := s.replicationTaskProcessor.paginationFn(nil)

View File

@@ -386,6 +386,7 @@ func (p *replicatorQueueProcessorImpl) generateSyncActivityTask(
VersionHistory: versionHistory,
},
},
VisibilityTime: &taskInfo.VisibilityTimestamp,
}, nil
},
)
@@ -455,6 +456,7 @@ func (p *replicatorQueueProcessorImpl) generateHistoryReplicationTask(
NewRunEvents: newRunEventsBlob,
},
},
VisibilityTime: &taskInfo.VisibilityTimestamp,
}
return replicationTask, nil
},

View File

@@ -368,13 +368,14 @@ func (s *replicatorQueueProcessorSuite) TestSyncActivity_ActivityRetry() {
scheduleID := int64(144)
taskID := int64(1444)
version := int64(2333)
taskTimestamp := time.Now().UTC()
task := &tasks.SyncActivityTask{
WorkflowKey: definition.NewWorkflowKey(
namespaceID.String(),
workflowID,
runID,
),
VisibilityTimestamp: time.Now().UTC(),
VisibilityTimestamp: taskTimestamp,
TaskID: taskID,
Version: version,
ScheduledID: scheduleID,
@@ -467,6 +468,7 @@ func (s *replicatorQueueProcessorSuite) TestSyncActivity_ActivityRetry() {
VersionHistory: versionHistory,
},
},
VisibilityTime: timestamp.TimePtr(taskTimestamp),
}, result)
}
@@ -479,13 +481,14 @@ func (s *replicatorQueueProcessorSuite) TestSyncActivity_ActivityRunning() {
scheduleID := int64(144)
taskID := int64(1444)
version := int64(2333)
taskTimestamp := time.Now().UTC()
task := &tasks.SyncActivityTask{
WorkflowKey: definition.NewWorkflowKey(
namespaceID.String(),
workflowID,
runID,
),
VisibilityTimestamp: time.Now().UTC(),
VisibilityTimestamp: taskTimestamp,
TaskID: taskID,
Version: version,
ScheduledID: scheduleID,
@@ -580,5 +583,6 @@ func (s *replicatorQueueProcessorSuite) TestSyncActivity_ActivityRunning() {
VersionHistory: versionHistory,
},
},
VisibilityTime: timestamp.TimePtr(taskTimestamp),
}, result)
}

View File

@@ -85,7 +85,7 @@ type (
UpdateReplicatorDLQAckLevel(sourCluster string, ackLevel int64) error
GetClusterReplicationLevel(cluster string) int64
UpdateClusterReplicationLevel(cluster string, ackTaskID int64) error
UpdateClusterReplicationLevel(cluster string, ackTaskID int64, ackTimestamp time.Time) error
GetTimerAckLevel() time.Time
UpdateTimerAckLevel(ackLevel time.Time) error

View File

@@ -102,7 +102,13 @@ type (
timerMaxReadLevelMap map[string]time.Time // cluster -> timerMaxReadLevel
// exist only in memory
remoteClusterCurrentTime map[string]time.Time
remoteClusterInfos map[string]*remoteClusterInfo
}
remoteClusterInfo struct {
CurrentTime time.Time
AckedReplicationTaskID int64
AckedReplicationTimestamp time.Time
}
)
@@ -297,12 +303,14 @@ func (s *ContextImpl) GetClusterReplicationLevel(cluster string) int64 {
return persistence.EmptyQueueMessageID
}
func (s *ContextImpl) UpdateClusterReplicationLevel(cluster string, ackTaskID int64) error {
func (s *ContextImpl) UpdateClusterReplicationLevel(cluster string, ackTaskID int64, ackTimestamp time.Time) error {
s.wLock()
defer s.wUnlock()
s.shardInfo.ClusterReplicationLevel[cluster] = ackTaskID
s.shardInfo.StolenSinceRenew = 0
s.getRemoteClusterInfoLocked(cluster).AckedReplicationTaskID = ackTaskID
s.getRemoteClusterInfoLocked(cluster).AckedReplicationTimestamp = ackTimestamp
return s.updateShardInfoLocked()
}
@@ -432,7 +440,7 @@ func (s *ContextImpl) UpdateTimerMaxReadLevel(cluster string) time.Time {
currentTime := s.GetTimeSource().Now()
if cluster != "" && cluster != s.GetClusterMetadata().GetCurrentClusterName() {
currentTime = s.remoteClusterCurrentTime[cluster]
currentTime = s.getRemoteClusterInfoLocked(cluster).CurrentTime
}
s.timerMaxReadLevelMap[cluster] = currentTime.Add(s.config.TimerProcessorMaxTimeShift()).Truncate(time.Millisecond)
@@ -950,7 +958,6 @@ func (s *ContextImpl) emitShardInfoMetricsLogsLocked() {
logWarnTimerLevelDiff < timerLag) {
s.logger.Warn("Shard ack levels diff exceeds warn threshold.",
tag.ShardTime(s.remoteClusterCurrentTime),
tag.ShardReplicationAck(s.shardInfo.ReplicationAckLevel),
tag.ShardTimerAcks(s.shardInfo.ClusterTimerAckLevel),
tag.ShardTransferAcks(s.shardInfo.ClusterTransferAckLevel))
@@ -1063,9 +1070,9 @@ func (s *ContextImpl) SetCurrentTime(cluster string, currentTime time.Time) {
s.wLock()
defer s.wUnlock()
if cluster != s.GetClusterMetadata().GetCurrentClusterName() {
prevTime := s.remoteClusterCurrentTime[cluster]
prevTime := s.getRemoteClusterInfoLocked(cluster).CurrentTime
if prevTime.Before(currentTime) {
s.remoteClusterCurrentTime[cluster] = currentTime
s.getRemoteClusterInfoLocked(cluster).CurrentTime = currentTime
}
} else {
panic("Cannot set current time for current cluster")
@@ -1076,7 +1083,7 @@ func (s *ContextImpl) GetCurrentTime(cluster string) time.Time {
s.rLock()
defer s.rUnlock()
if cluster != s.GetClusterMetadata().GetCurrentClusterName() {
return s.remoteClusterCurrentTime[cluster]
return s.getRemoteClusterInfoLocked(cluster).CurrentTime
}
return s.GetTimeSource().Now().UTC()
}
@@ -1394,7 +1401,7 @@ func (s *ContextImpl) loadShardMetadata(ownershipChanged *bool) error {
updatedShardInfo.Owner = s.GetHostInfo().Identity()
// initialize the cluster current time to be the same as ack level
remoteClusterCurrentTime := make(map[string]time.Time)
remoteClusterInfos := make(map[string]*remoteClusterInfo)
timerMaxReadLevelMap := make(map[string]time.Time)
for clusterName, info := range s.GetClusterMetadata().GetAllClusterInfo() {
if !info.Enabled {
@@ -1407,7 +1414,7 @@ func (s *ContextImpl) loadShardMetadata(ownershipChanged *bool) error {
currentReadTime = timestamp.TimeValue(currentTime)
}
remoteClusterCurrentTime[clusterName] = currentReadTime
remoteClusterInfos[clusterName] = &remoteClusterInfo{CurrentTime: currentReadTime}
timerMaxReadLevelMap[clusterName] = currentReadTime
} else { // active cluster
timerMaxReadLevelMap[clusterName] = currentReadTime
@@ -1424,12 +1431,23 @@ func (s *ContextImpl) loadShardMetadata(ownershipChanged *bool) error {
}
s.shardInfo = updatedShardInfo
s.remoteClusterCurrentTime = remoteClusterCurrentTime
s.remoteClusterInfos = remoteClusterInfos
s.timerMaxReadLevelMap = timerMaxReadLevelMap
return nil
}
func (s *ContextImpl) getRemoteClusterInfoLocked(clusterName string) *remoteClusterInfo {
if info, ok := s.remoteClusterInfos[clusterName]; ok {
return info
}
info := &remoteClusterInfo{
AckedReplicationTaskID: persistence.EmptyQueueMessageID,
}
s.remoteClusterInfos[clusterName] = info
return info
}
func (s *ContextImpl) acquireShard() {
// Retry for 5m, with interval up to 10s (default)
policy := backoff.NewExponentialRetryPolicy(50 * time.Millisecond)

View File

@@ -592,17 +592,17 @@ func (mr *MockContextMockRecorder) SetCurrentTime(cluster, currentTime interface
}
// UpdateClusterReplicationLevel mocks base method.
func (m *MockContext) UpdateClusterReplicationLevel(cluster string, ackTaskID int64) error {
func (m *MockContext) UpdateClusterReplicationLevel(cluster string, ackTaskID int64, ackTimestamp time.Time) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "UpdateClusterReplicationLevel", cluster, ackTaskID)
ret := m.ctrl.Call(m, "UpdateClusterReplicationLevel", cluster, ackTaskID, ackTimestamp)
ret0, _ := ret[0].(error)
return ret0
}
// UpdateClusterReplicationLevel indicates an expected call of UpdateClusterReplicationLevel.
func (mr *MockContextMockRecorder) UpdateClusterReplicationLevel(cluster, ackTaskID interface{}) *gomock.Call {
func (mr *MockContextMockRecorder) UpdateClusterReplicationLevel(cluster, ackTaskID, ackTimestamp interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateClusterReplicationLevel", reflect.TypeOf((*MockContext)(nil).UpdateClusterReplicationLevel), cluster, ackTaskID)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateClusterReplicationLevel", reflect.TypeOf((*MockContext)(nil).UpdateClusterReplicationLevel), cluster, ackTaskID, ackTimestamp)
}
// UpdateNamespaceNotificationVersion mocks base method.

View File

@@ -68,7 +68,7 @@ func NewTestContext(
transferMaxReadLevel: 0,
maxTransferSequenceNumber: 100000,
timerMaxReadLevelMap: make(map[string]time.Time),
remoteClusterCurrentTime: make(map[string]time.Time),
remoteClusterInfos: make(map[string]*remoteClusterInfo),
}
return &ContextTest{
ContextImpl: shard,

View File

@@ -28,6 +28,7 @@ package shard
import (
"context"
"time"
commonpb "go.temporal.io/api/common/v1"
historypb "go.temporal.io/api/history/v1"
@@ -69,7 +70,7 @@ type (
ReplicateEventsV2(ctx context.Context, request *historyservice.ReplicateEventsV2Request) error
SyncShardStatus(ctx context.Context, request *historyservice.SyncShardStatusRequest) error
SyncActivity(ctx context.Context, request *historyservice.SyncActivityRequest) error
GetReplicationMessages(ctx context.Context, pollingCluster string, ackMessageID int64, queryMessageID int64) (*replicationspb.ReplicationMessages, error)
GetReplicationMessages(ctx context.Context, pollingCluster string, ackMessageID int64, ackTimestamp time.Time, queryMessageID int64) (*replicationspb.ReplicationMessages, error)
GetDLQReplicationMessages(ctx context.Context, taskInfos []*replicationspb.ReplicationTaskInfo) ([]*replicationspb.ReplicationTask, error)
QueryWorkflow(ctx context.Context, request *historyservice.QueryWorkflowRequest) (*historyservice.QueryWorkflowResponse, error)
ReapplyEvents(ctx context.Context, namespaceUUID namespace.ID, workflowID string, runID string, events []*historypb.HistoryEvent) error

View File

@@ -31,6 +31,7 @@ package shard
import (
context "context"
reflect "reflect"
time "time"
gomock "github.com/golang/mock/gomock"
common "go.temporal.io/api/common/v1"
@@ -156,18 +157,18 @@ func (mr *MockEngineMockRecorder) GetMutableState(ctx, request interface{}) *gom
}
// GetReplicationMessages mocks base method.
func (m *MockEngine) GetReplicationMessages(ctx context.Context, pollingCluster string, ackMessageID, queryMessageID int64) (*repication.ReplicationMessages, error) {
func (m *MockEngine) GetReplicationMessages(ctx context.Context, pollingCluster string, ackMessageID int64, ackTimestamp time.Time, queryMessageID int64) (*repication.ReplicationMessages, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetReplicationMessages", ctx, pollingCluster, ackMessageID, queryMessageID)
ret := m.ctrl.Call(m, "GetReplicationMessages", ctx, pollingCluster, ackMessageID, ackTimestamp, queryMessageID)
ret0, _ := ret[0].(*repication.ReplicationMessages)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetReplicationMessages indicates an expected call of GetReplicationMessages.
func (mr *MockEngineMockRecorder) GetReplicationMessages(ctx, pollingCluster, ackMessageID, queryMessageID interface{}) *gomock.Call {
func (mr *MockEngineMockRecorder) GetReplicationMessages(ctx, pollingCluster, ackMessageID, ackTimestamp, queryMessageID interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetReplicationMessages", reflect.TypeOf((*MockEngine)(nil).GetReplicationMessages), ctx, pollingCluster, ackMessageID, queryMessageID)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetReplicationMessages", reflect.TypeOf((*MockEngine)(nil).GetReplicationMessages), ctx, pollingCluster, ackMessageID, ackTimestamp, queryMessageID)
}
// MergeDLQMessages mocks base method.