diff --git a/api/matchingservice/v1/request_response.pb.go b/api/matchingservice/v1/request_response.pb.go index f0716698388..7b24dbff3bb 100644 --- a/api/matchingservice/v1/request_response.pb.go +++ b/api/matchingservice/v1/request_response.pb.go @@ -1566,109 +1566,6 @@ func (m *GetWorkerBuildIdCompatibilityResponse) GetResponse() *v1.GetWorkerBuild return nil } -type InvalidateTaskQueueUserDataRequest struct { - NamespaceId string `protobuf:"bytes,1,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id,omitempty"` - TaskQueue string `protobuf:"bytes,2,opt,name=task_queue,json=taskQueue,proto3" json:"task_queue,omitempty"` - TaskQueueType v19.TaskQueueType `protobuf:"varint,3,opt,name=task_queue_type,json=taskQueueType,proto3,enum=temporal.api.enums.v1.TaskQueueType" json:"task_queue_type,omitempty"` - // The partition's cached user data should be invalidated and replaced with this data, if set. - UserData *v110.VersionedTaskQueueUserData `protobuf:"bytes,4,opt,name=user_data,json=userData,proto3" json:"user_data,omitempty"` -} - -func (m *InvalidateTaskQueueUserDataRequest) Reset() { *m = InvalidateTaskQueueUserDataRequest{} } -func (*InvalidateTaskQueueUserDataRequest) ProtoMessage() {} -func (*InvalidateTaskQueueUserDataRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_a429a3813476c583, []int{22} -} -func (m *InvalidateTaskQueueUserDataRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *InvalidateTaskQueueUserDataRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_InvalidateTaskQueueUserDataRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *InvalidateTaskQueueUserDataRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_InvalidateTaskQueueUserDataRequest.Merge(m, src) -} -func (m *InvalidateTaskQueueUserDataRequest) XXX_Size() int { - return m.Size() -} -func (m *InvalidateTaskQueueUserDataRequest) XXX_DiscardUnknown() { - xxx_messageInfo_InvalidateTaskQueueUserDataRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_InvalidateTaskQueueUserDataRequest proto.InternalMessageInfo - -func (m *InvalidateTaskQueueUserDataRequest) GetNamespaceId() string { - if m != nil { - return m.NamespaceId - } - return "" -} - -func (m *InvalidateTaskQueueUserDataRequest) GetTaskQueue() string { - if m != nil { - return m.TaskQueue - } - return "" -} - -func (m *InvalidateTaskQueueUserDataRequest) GetTaskQueueType() v19.TaskQueueType { - if m != nil { - return m.TaskQueueType - } - return v19.TASK_QUEUE_TYPE_UNSPECIFIED -} - -func (m *InvalidateTaskQueueUserDataRequest) GetUserData() *v110.VersionedTaskQueueUserData { - if m != nil { - return m.UserData - } - return nil -} - -type InvalidateTaskQueueUserDataResponse struct { -} - -func (m *InvalidateTaskQueueUserDataResponse) Reset() { *m = InvalidateTaskQueueUserDataResponse{} } -func (*InvalidateTaskQueueUserDataResponse) ProtoMessage() {} -func (*InvalidateTaskQueueUserDataResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_a429a3813476c583, []int{23} -} -func (m *InvalidateTaskQueueUserDataResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *InvalidateTaskQueueUserDataResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_InvalidateTaskQueueUserDataResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *InvalidateTaskQueueUserDataResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_InvalidateTaskQueueUserDataResponse.Merge(m, src) -} -func (m *InvalidateTaskQueueUserDataResponse) XXX_Size() int { - return m.Size() -} -func (m *InvalidateTaskQueueUserDataResponse) XXX_DiscardUnknown() { - xxx_messageInfo_InvalidateTaskQueueUserDataResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_InvalidateTaskQueueUserDataResponse proto.InternalMessageInfo - type GetTaskQueueUserDataRequest struct { NamespaceId string `protobuf:"bytes,1,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id,omitempty"` // The task queue to fetch data from. Is always considered as a workflow queue, since root @@ -1678,12 +1575,15 @@ type GetTaskQueueUserDataRequest struct { // If the requester has no data, it should set this to 0. // This value must not be set to a negative number (note that our linter suggests avoiding uint64). LastKnownUserDataVersion int64 `protobuf:"varint,3,opt,name=last_known_user_data_version,json=lastKnownUserDataVersion,proto3" json:"last_known_user_data_version,omitempty"` + // If set and last_known_user_data_version is the current version, block until new data is + // available (or timeout). + WaitNewData bool `protobuf:"varint,4,opt,name=wait_new_data,json=waitNewData,proto3" json:"wait_new_data,omitempty"` } func (m *GetTaskQueueUserDataRequest) Reset() { *m = GetTaskQueueUserDataRequest{} } func (*GetTaskQueueUserDataRequest) ProtoMessage() {} func (*GetTaskQueueUserDataRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_a429a3813476c583, []int{24} + return fileDescriptor_a429a3813476c583, []int{22} } func (m *GetTaskQueueUserDataRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1733,6 +1633,13 @@ func (m *GetTaskQueueUserDataRequest) GetLastKnownUserDataVersion() int64 { return 0 } +func (m *GetTaskQueueUserDataRequest) GetWaitNewData() bool { + if m != nil { + return m.WaitNewData + } + return false +} + type GetTaskQueueUserDataResponse struct { // Whether this task queue has any stored user data TaskQueueHasUserData bool `protobuf:"varint,1,opt,name=task_queue_has_user_data,json=taskQueueHasUserData,proto3" json:"task_queue_has_user_data,omitempty"` @@ -1744,7 +1651,7 @@ type GetTaskQueueUserDataResponse struct { func (m *GetTaskQueueUserDataResponse) Reset() { *m = GetTaskQueueUserDataResponse{} } func (*GetTaskQueueUserDataResponse) ProtoMessage() {} func (*GetTaskQueueUserDataResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_a429a3813476c583, []int{25} + return fileDescriptor_a429a3813476c583, []int{23} } func (m *GetTaskQueueUserDataResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1798,7 +1705,7 @@ func (m *ApplyTaskQueueUserDataReplicationEventRequest) Reset() { } func (*ApplyTaskQueueUserDataReplicationEventRequest) ProtoMessage() {} func (*ApplyTaskQueueUserDataReplicationEventRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_a429a3813476c583, []int{26} + return fileDescriptor_a429a3813476c583, []int{24} } func (m *ApplyTaskQueueUserDataReplicationEventRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1856,7 +1763,7 @@ func (m *ApplyTaskQueueUserDataReplicationEventResponse) Reset() { } func (*ApplyTaskQueueUserDataReplicationEventResponse) ProtoMessage() {} func (*ApplyTaskQueueUserDataReplicationEventResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_a429a3813476c583, []int{27} + return fileDescriptor_a429a3813476c583, []int{25} } func (m *ApplyTaskQueueUserDataReplicationEventResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1909,8 +1816,6 @@ func init() { proto.RegisterType((*UpdateWorkerBuildIdCompatibilityResponse)(nil), "temporal.server.api.matchingservice.v1.UpdateWorkerBuildIdCompatibilityResponse") proto.RegisterType((*GetWorkerBuildIdCompatibilityRequest)(nil), "temporal.server.api.matchingservice.v1.GetWorkerBuildIdCompatibilityRequest") proto.RegisterType((*GetWorkerBuildIdCompatibilityResponse)(nil), "temporal.server.api.matchingservice.v1.GetWorkerBuildIdCompatibilityResponse") - proto.RegisterType((*InvalidateTaskQueueUserDataRequest)(nil), "temporal.server.api.matchingservice.v1.InvalidateTaskQueueUserDataRequest") - proto.RegisterType((*InvalidateTaskQueueUserDataResponse)(nil), "temporal.server.api.matchingservice.v1.InvalidateTaskQueueUserDataResponse") proto.RegisterType((*GetTaskQueueUserDataRequest)(nil), "temporal.server.api.matchingservice.v1.GetTaskQueueUserDataRequest") proto.RegisterType((*GetTaskQueueUserDataResponse)(nil), "temporal.server.api.matchingservice.v1.GetTaskQueueUserDataResponse") proto.RegisterType((*ApplyTaskQueueUserDataReplicationEventRequest)(nil), "temporal.server.api.matchingservice.v1.ApplyTaskQueueUserDataReplicationEventRequest") @@ -1922,141 +1827,140 @@ func init() { } var fileDescriptor_a429a3813476c583 = []byte{ - // 2130 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x5a, 0x4f, 0x73, 0x1b, 0x49, - 0x15, 0xf7, 0x48, 0xb2, 0x2d, 0x3d, 0xc9, 0x8e, 0x3c, 0xec, 0x66, 0x65, 0xc7, 0x96, 0x1d, 0x25, - 0xd9, 0x38, 0xa9, 0xac, 0x4c, 0x0c, 0xeb, 0xda, 0x5d, 0xc8, 0x2e, 0x8e, 0x6d, 0x12, 0xef, 0x26, - 0xe0, 0x4c, 0xbc, 0x81, 0x0a, 0x54, 0xcd, 0xb6, 0x66, 0xda, 0xf2, 0xa0, 0xd1, 0xcc, 0x78, 0xba, - 0x47, 0x5e, 0x71, 0xe2, 0xce, 0x65, 0x29, 0x2e, 0x50, 0x1c, 0xb8, 0x51, 0xc0, 0x89, 0x2a, 0xf8, - 0x0a, 0x54, 0x71, 0xe0, 0x90, 0xe3, 0xde, 0x20, 0x4e, 0x15, 0x45, 0x01, 0x87, 0xe5, 0x1b, 0x50, - 0xfd, 0x67, 0x66, 0x34, 0xd2, 0xd8, 0x92, 0x1d, 0x2f, 0x4b, 0x71, 0x53, 0xbf, 0x7e, 0xef, 0xf5, - 0x7b, 0xaf, 0x7f, 0xef, 0x4f, 0x8f, 0x0d, 0x77, 0x28, 0x6e, 0x7b, 0xae, 0x8f, 0xec, 0x15, 0x82, - 0xfd, 0x0e, 0xf6, 0x57, 0x90, 0x67, 0xad, 0xb4, 0x11, 0x35, 0xf6, 0x2d, 0xa7, 0xc9, 0x48, 0x96, - 0x81, 0x57, 0x3a, 0xb7, 0x57, 0x7c, 0x7c, 0x10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x2e, 0x0b, 0xfc, 0xcc, 0x18, 0xd2, + 0x8b, 0x7d, 0x20, 0x8b, 0xf7, 0x58, 0x56, 0x57, 0x03, 0xe4, 0x9a, 0x47, 0x12, 0xe8, 0xb3, 0x1c, + 0xe8, 0x79, 0x41, 0x13, 0x50, 0xbf, 0x07, 0xb3, 0xc4, 0x3c, 0xc2, 0x56, 0xe8, 0x60, 0xcb, 0x60, + 0xed, 0x43, 0xbb, 0xc4, 0x0f, 0x5f, 0xac, 0x88, 0xde, 0x52, 0x89, 0x7a, 0x4b, 0xe5, 0x20, 0xea, + 0x2d, 0x77, 0x33, 0x9f, 0xfd, 0x69, 0x45, 0xd1, 0x67, 0x62, 0x39, 0xb6, 0xa3, 0x6e, 0x43, 0x21, + 0xc2, 0x14, 0x57, 0x53, 0x1c, 0x51, 0x4d, 0x5e, 0x4a, 0x71, 0x25, 0x0e, 0x4c, 0xb3, 0x5b, 0xb1, + 0x31, 0xd1, 0xe6, 0x56, 0x27, 0xd6, 0xf2, 0x1b, 0x7a, 0x65, 0xb4, 0x56, 0x59, 0x39, 0x35, 0xdf, + 0x2b, 0x8f, 0x84, 0xd2, 0x5d, 0x97, 0x06, 0x6d, 0x3d, 0x3a, 0x42, 0xbd, 0x03, 0x59, 0x59, 0x5e, + 0x89, 0xa6, 0xf2, 0xe3, 0xae, 0x76, 0x87, 0x3c, 0xea, 0x38, 0xec, 0x80, 0x87, 0x82, 0x53, 0x8f, + 0x45, 0x16, 0x3f, 0x81, 0x42, 0xa7, 0x5e, 0xb5, 0x08, 0x13, 0x75, 0xdc, 0x96, 0xa5, 0x93, 0xfd, + 0x64, 0xb8, 0x6c, 0x22, 0x27, 0xc4, 0xb2, 0x74, 0x8c, 0x88, 0x4b, 0x2e, 0xf2, 0xee, 0xf8, 0xdb, + 0xca, 0x07, 0x99, 0xec, 0x4c, 0x71, 0x36, 0x2e, 0xde, 0x5b, 0x26, 0xb5, 0x9b, 0x36, 0x6d, 0xff, + 0x57, 0x15, 0x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xba, 0x21, 0xae, 0xe3, 0x6e, 0xf0, + 0xec, 0x79, 0x69, 0xec, 0xf3, 0xe7, 0xa5, 0xb1, 0x2f, 0x9e, 0x97, 0x94, 0x1f, 0x9e, 0x94, 0x94, + 0x5f, 0x9c, 0x94, 0x94, 0x3f, 0x9c, 0x94, 0x94, 0x67, 0x27, 0x25, 0xe5, 0xcf, 0x27, 0x25, 0xe5, + 0xaf, 0x27, 0xa5, 0xb1, 0x2f, 0x4e, 0x4a, 0xca, 0x67, 0x2f, 0x4a, 0x63, 0xcf, 0x5e, 0x94, 0xc6, + 0x3e, 0x7f, 0x51, 0x1a, 0x7b, 0xfa, 0xf5, 0x9a, 0x97, 0x98, 0x6a, 0x7b, 0xa7, 0xff, 0x0d, 0xfe, + 0xb5, 0x1e, 0x52, 0x75, 0x8a, 0xbf, 0xf5, 0xbe, 0xf2, 0xaf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xc6, + 0x32, 0xb4, 0xf8, 0x47, 0x1f, 0x00, 0x00, } func (this *PollWorkflowTaskQueueRequest) Equal(that interface{}) bool { @@ -2860,60 +2764,6 @@ func (this *GetWorkerBuildIdCompatibilityResponse) Equal(that interface{}) bool } return true } -func (this *InvalidateTaskQueueUserDataRequest) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*InvalidateTaskQueueUserDataRequest) - if !ok { - that2, ok := that.(InvalidateTaskQueueUserDataRequest) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.NamespaceId != that1.NamespaceId { - return false - } - if this.TaskQueue != that1.TaskQueue { - return false - } - if this.TaskQueueType != that1.TaskQueueType { - return false - } - if !this.UserData.Equal(that1.UserData) { - return false - } - return true -} -func (this *InvalidateTaskQueueUserDataResponse) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*InvalidateTaskQueueUserDataResponse) - if !ok { - that2, ok := that.(InvalidateTaskQueueUserDataResponse) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - return true -} func (this *GetTaskQueueUserDataRequest) Equal(that interface{}) bool { if that == nil { return this == nil @@ -2942,6 +2792,9 @@ func (this *GetTaskQueueUserDataRequest) Equal(that interface{}) bool { if this.LastKnownUserDataVersion != that1.LastKnownUserDataVersion { return false } + if this.WaitNewData != that1.WaitNewData { + return false + } return true } func (this *GetTaskQueueUserDataResponse) Equal(that interface{}) bool { @@ -3398,39 +3251,16 @@ func (this *GetWorkerBuildIdCompatibilityResponse) GoString() string { s = append(s, "}") return strings.Join(s, "") } -func (this *InvalidateTaskQueueUserDataRequest) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 8) - s = append(s, "&matchingservice.InvalidateTaskQueueUserDataRequest{") - s = append(s, "NamespaceId: "+fmt.Sprintf("%#v", this.NamespaceId)+",\n") - s = append(s, "TaskQueue: "+fmt.Sprintf("%#v", this.TaskQueue)+",\n") - s = append(s, "TaskQueueType: "+fmt.Sprintf("%#v", this.TaskQueueType)+",\n") - if this.UserData != nil { - s = append(s, "UserData: "+fmt.Sprintf("%#v", this.UserData)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *InvalidateTaskQueueUserDataResponse) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 4) - s = append(s, "&matchingservice.InvalidateTaskQueueUserDataResponse{") - s = append(s, "}") - return strings.Join(s, "") -} func (this *GetTaskQueueUserDataRequest) GoString() string { if this == nil { return "nil" } - s := make([]string, 0, 7) + s := make([]string, 0, 8) s = append(s, "&matchingservice.GetTaskQueueUserDataRequest{") s = append(s, "NamespaceId: "+fmt.Sprintf("%#v", this.NamespaceId)+",\n") s = append(s, "TaskQueue: "+fmt.Sprintf("%#v", this.TaskQueue)+",\n") s = append(s, "LastKnownUserDataVersion: "+fmt.Sprintf("%#v", this.LastKnownUserDataVersion)+",\n") + s = append(s, "WaitNewData: "+fmt.Sprintf("%#v", this.WaitNewData)+",\n") s = append(s, "}") return strings.Join(s, "") } @@ -4841,83 +4671,6 @@ func (m *GetWorkerBuildIdCompatibilityResponse) MarshalToSizedBuffer(dAtA []byte return len(dAtA) - i, nil } -func (m *InvalidateTaskQueueUserDataRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *InvalidateTaskQueueUserDataRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *InvalidateTaskQueueUserDataRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.UserData != nil { - { - size, err := m.UserData.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRequestResponse(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.TaskQueueType != 0 { - i = encodeVarintRequestResponse(dAtA, i, uint64(m.TaskQueueType)) - i-- - dAtA[i] = 0x18 - } - if len(m.TaskQueue) > 0 { - i -= len(m.TaskQueue) - copy(dAtA[i:], m.TaskQueue) - i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.TaskQueue))) - i-- - dAtA[i] = 0x12 - } - if len(m.NamespaceId) > 0 { - i -= len(m.NamespaceId) - copy(dAtA[i:], m.NamespaceId) - i = encodeVarintRequestResponse(dAtA, i, uint64(len(m.NamespaceId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *InvalidateTaskQueueUserDataResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *InvalidateTaskQueueUserDataResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *InvalidateTaskQueueUserDataResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - func (m *GetTaskQueueUserDataRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -4938,6 +4691,16 @@ func (m *GetTaskQueueUserDataRequest) MarshalToSizedBuffer(dAtA []byte) (int, er _ = i var l int _ = l + if m.WaitNewData { + i-- + if m.WaitNewData { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + } if m.LastKnownUserDataVersion != 0 { i = encodeVarintRequestResponse(dAtA, i, uint64(m.LastKnownUserDataVersion)) i-- @@ -5643,39 +5406,6 @@ func (m *GetWorkerBuildIdCompatibilityResponse) Size() (n int) { return n } -func (m *InvalidateTaskQueueUserDataRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.NamespaceId) - if l > 0 { - n += 1 + l + sovRequestResponse(uint64(l)) - } - l = len(m.TaskQueue) - if l > 0 { - n += 1 + l + sovRequestResponse(uint64(l)) - } - if m.TaskQueueType != 0 { - n += 1 + sovRequestResponse(uint64(m.TaskQueueType)) - } - if m.UserData != nil { - l = m.UserData.Size() - n += 1 + l + sovRequestResponse(uint64(l)) - } - return n -} - -func (m *InvalidateTaskQueueUserDataResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - func (m *GetTaskQueueUserDataRequest) Size() (n int) { if m == nil { return 0 @@ -5693,6 +5423,9 @@ func (m *GetTaskQueueUserDataRequest) Size() (n int) { if m.LastKnownUserDataVersion != 0 { n += 1 + sovRequestResponse(uint64(m.LastKnownUserDataVersion)) } + if m.WaitNewData { + n += 2 + } return n } @@ -6064,28 +5797,6 @@ func (this *GetWorkerBuildIdCompatibilityResponse) String() string { }, "") return s } -func (this *InvalidateTaskQueueUserDataRequest) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&InvalidateTaskQueueUserDataRequest{`, - `NamespaceId:` + fmt.Sprintf("%v", this.NamespaceId) + `,`, - `TaskQueue:` + fmt.Sprintf("%v", this.TaskQueue) + `,`, - `TaskQueueType:` + fmt.Sprintf("%v", this.TaskQueueType) + `,`, - `UserData:` + strings.Replace(fmt.Sprintf("%v", this.UserData), "VersionedTaskQueueUserData", "v110.VersionedTaskQueueUserData", 1) + `,`, - `}`, - }, "") - return s -} -func (this *InvalidateTaskQueueUserDataResponse) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&InvalidateTaskQueueUserDataResponse{`, - `}`, - }, "") - return s -} func (this *GetTaskQueueUserDataRequest) String() string { if this == nil { return "nil" @@ -6094,6 +5805,7 @@ func (this *GetTaskQueueUserDataRequest) String() string { `NamespaceId:` + fmt.Sprintf("%v", this.NamespaceId) + `,`, `TaskQueue:` + fmt.Sprintf("%v", this.TaskQueue) + `,`, `LastKnownUserDataVersion:` + fmt.Sprintf("%v", this.LastKnownUserDataVersion) + `,`, + `WaitNewData:` + fmt.Sprintf("%v", this.WaitNewData) + `,`, `}`, }, "") return s @@ -10256,7 +9968,7 @@ func (m *GetWorkerBuildIdCompatibilityResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *InvalidateTaskQueueUserDataRequest) Unmarshal(dAtA []byte) error { +func (m *GetTaskQueueUserDataRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -10279,10 +9991,10 @@ func (m *InvalidateTaskQueueUserDataRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: InvalidateTaskQueueUserDataRequest: wiretype end group for non-group") + return fmt.Errorf("proto: GetTaskQueueUserDataRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: InvalidateTaskQueueUserDataRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: GetTaskQueueUserDataRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -10351,9 +10063,9 @@ func (m *InvalidateTaskQueueUserDataRequest) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 3: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TaskQueueType", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field LastKnownUserDataVersion", wireType) } - m.TaskQueueType = 0 + m.LastKnownUserDataVersion = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowRequestResponse @@ -10363,222 +10075,16 @@ func (m *InvalidateTaskQueueUserDataRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.TaskQueueType |= v19.TaskQueueType(b&0x7F) << shift + m.LastKnownUserDataVersion |= int64(b&0x7F) << shift if b < 0x80 { break } } case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UserData", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRequestResponse - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRequestResponse - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRequestResponse - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.UserData == nil { - m.UserData = &v110.VersionedTaskQueueUserData{} - } - if err := m.UserData.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRequestResponse(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthRequestResponse - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthRequestResponse - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *InvalidateTaskQueueUserDataResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRequestResponse - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: InvalidateTaskQueueUserDataResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: InvalidateTaskQueueUserDataResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipRequestResponse(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthRequestResponse - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthRequestResponse - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GetTaskQueueUserDataRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRequestResponse - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GetTaskQueueUserDataRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GetTaskQueueUserDataRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NamespaceId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRequestResponse - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRequestResponse - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRequestResponse - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NamespaceId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TaskQueue", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRequestResponse - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRequestResponse - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRequestResponse - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TaskQueue = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field LastKnownUserDataVersion", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field WaitNewData", wireType) } - m.LastKnownUserDataVersion = 0 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowRequestResponse @@ -10588,11 +10094,12 @@ func (m *GetTaskQueueUserDataRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.LastKnownUserDataVersion |= int64(b&0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } } + m.WaitNewData = bool(v != 0) default: iNdEx = preIndex skippy, err := skipRequestResponse(dAtA[iNdEx:]) diff --git a/api/matchingservice/v1/service.pb.go b/api/matchingservice/v1/service.pb.go index 2ebfa84e525..ccad2f38a1f 100644 --- a/api/matchingservice/v1/service.pb.go +++ b/api/matchingservice/v1/service.pb.go @@ -54,45 +54,43 @@ func init() { } var fileDescriptor_1a5c83076e651916 = []byte{ - // 600 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x96, 0x3d, 0x6f, 0xd3, 0x40, - 0x18, 0xc7, 0x7d, 0x0b, 0xc3, 0x49, 0xa8, 0xc2, 0x80, 0x10, 0x45, 0x9c, 0x10, 0x43, 0x47, 0x47, - 0x05, 0x36, 0x5a, 0x20, 0x4d, 0x4a, 0x08, 0xb4, 0x6a, 0x0a, 0x04, 0x24, 0x16, 0x74, 0xb1, 0x1f, - 0xc2, 0xa9, 0x8e, 0xcf, 0x9c, 0xcf, 0x46, 0xd9, 0xf8, 0x04, 0x88, 0xa1, 0x13, 0x2b, 0x12, 0x62, - 0x60, 0x62, 0x62, 0x62, 0x85, 0x31, 0x63, 0xd9, 0x88, 0xb3, 0x30, 0xf6, 0x23, 0x20, 0x37, 0xb9, - 0x6b, 0xde, 0xb9, 0xbc, 0x6c, 0x89, 0x73, 0xff, 0xdf, 0xf3, 0xfb, 0x27, 0x7e, 0x14, 0xe3, 0x5b, - 0x12, 0x1a, 0x21, 0x17, 0xd4, 0xcf, 0x45, 0x20, 0x12, 0x10, 0x39, 0x1a, 0xb2, 0x5c, 0x83, 0x4a, - 0xf7, 0x35, 0x0b, 0xea, 0xd9, 0x25, 0xe6, 0x42, 0x2e, 0x59, 0xcf, 0xf5, 0x5e, 0x3a, 0xa1, 0xe0, - 0x92, 0xdb, 0x6b, 0x2a, 0xe5, 0x74, 0x53, 0x0e, 0x0d, 0x99, 0x33, 0x94, 0x72, 0x92, 0xf5, 0xd5, - 0x4d, 0x43, 0xba, 0x80, 0x37, 0x31, 0x44, 0xf2, 0xa5, 0x80, 0x28, 0xe4, 0x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 0x55, 0xb7, 0x2d, 0xd1, 0x6a, 0x13, - 0xeb, 0xa8, 0x4d, 0xac, 0xe3, 0x36, 0x41, 0xef, 0x52, 0x82, 0xbe, 0xa4, 0x04, 0xfd, 0x4a, 0x09, - 0x6a, 0xa5, 0x04, 0xfd, 0x49, 0x09, 0xfa, 0x9b, 0x12, 0xeb, 0x38, 0x25, 0xe8, 0x43, 0x87, 0x58, - 0xad, 0x0e, 0xb1, 0x8e, 0x3a, 0xc4, 0x7a, 0xb1, 0x51, 0xe7, 0xa7, 0x46, 0x8c, 0x4f, 0x7f, 0x22, - 0xbc, 0x3d, 0x74, 0xa9, 0x76, 0xe6, 0xe4, 0x89, 0xf0, 0xe6, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, - 0x53, 0xc2, 0x6b, 0x80, 0xb0, 0x0a, 0x00, 0x00, + // 576 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x96, 0x3d, 0x6f, 0x13, 0x31, + 0x18, 0xc7, 0xcf, 0x0b, 0x83, 0x25, 0x54, 0xf5, 0x04, 0x42, 0x54, 0xc2, 0x42, 0x0c, 0x1d, 0x2f, + 0x2a, 0xb0, 0xd1, 0x02, 0x69, 0x52, 0x42, 0xa5, 0x56, 0x4d, 0x81, 0x80, 0xc4, 0x82, 0x9c, 0xbb, + 0x87, 0x60, 0xf5, 0x72, 0x3e, 0x6c, 0x5f, 0x50, 0x36, 0x3e, 0x01, 0x62, 0x60, 0x62, 0x45, 0x42, + 0x0c, 0x4c, 0x7c, 0x00, 0x56, 0x18, 0x33, 0xb6, 0x1b, 0xb9, 0x2c, 0x8c, 0xfd, 0x08, 0xe8, 0x9a, + 0xd8, 0x79, 0x0f, 0xce, 0xcb, 0x96, 0x5c, 0xfc, 0xff, 0x3d, 0xbf, 0xbf, 0x62, 0x9f, 0x8c, 0xef, + 0x2a, 0xa8, 0xc7, 0x5c, 0xd0,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 0x83, 0x18, 0xcb, 0x33, 0x84, 0x37, 0xf3, 0x71, 0x1c, 0x36, 0x27, 0x2c, 0x8a, 0x43, 0xe6, + 0xd3, 0x6c, 0x87, 0xed, 0x35, 0x20, 0x52, 0x6e, 0xc5, 0xfa, 0xcd, 0x6e, 0xc5, 0xd3, 0x4d, 0x9e, + 0xaf, 0x1a, 0xab, 0xbb, 0xed, 0x8a, 0x56, 0x9b, 0x38, 0xa7, 0x6d, 0xe2, 0x9c, 0xb7, 0x09, 0x7a, + 0x9f, 0x12, 0xf4, 0x2d, 0x25, 0xe8, 0x77, 0x4a, 0x50, 0x2b, 0x25, 0xe8, 0x4f, 0x4a, 0xd0, 0xdf, + 0x94, 0x38, 0xe7, 0x29, 0x41, 0x1f, 0x3b, 0xc4, 0x69, 0x75, 0x88, 0x73, 0xda, 0x21, 0xce, 0xcb, + 0xed, 0x1a, 0xef, 0x1b, 0x31, 0x3e, 0xfb, 0x5a, 0x75, 0x6f, 0xe4, 0x51, 0xf5, 0xd2, 0xc5, 0xb5, + 0xea, 0xce, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x10, 0xea, 0x8a, 0xdd, 0xf5, 0x09, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -142,8 +140,6 @@ type MatchingServiceClient interface { // aip.dev/not-precedent: UpdateWorkerBuildIdOrdering RPC doesn't follow Google API format. --) UpdateWorkerBuildIdCompatibility(ctx context.Context, in *UpdateWorkerBuildIdCompatibilityRequest, opts ...grpc.CallOption) (*UpdateWorkerBuildIdCompatibilityResponse, error) GetWorkerBuildIdCompatibility(ctx context.Context, in *GetWorkerBuildIdCompatibilityRequest, opts ...grpc.CallOption) (*GetWorkerBuildIdCompatibilityResponse, error) - // Tell a task queue that the associated user data has changed. - InvalidateTaskQueueUserData(ctx context.Context, in *InvalidateTaskQueueUserDataRequest, opts ...grpc.CallOption) (*InvalidateTaskQueueUserDataResponse, error) // Fetch user data for a task queue, this request should always be routed to the node holding the root partition of the workflow task queue. GetTaskQueueUserData(ctx context.Context, in *GetTaskQueueUserDataRequest, opts ...grpc.CallOption) (*GetTaskQueueUserDataResponse, error) // Apply a user data replication event. @@ -257,15 +253,6 @@ func (c *matchingServiceClient) GetWorkerBuildIdCompatibility(ctx context.Contex return out, nil } -func (c *matchingServiceClient) InvalidateTaskQueueUserData(ctx context.Context, in *InvalidateTaskQueueUserDataRequest, opts ...grpc.CallOption) (*InvalidateTaskQueueUserDataResponse, error) { - out := new(InvalidateTaskQueueUserDataResponse) - err := c.cc.Invoke(ctx, "/temporal.server.api.matchingservice.v1.MatchingService/InvalidateTaskQueueUserData", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *matchingServiceClient) GetTaskQueueUserData(ctx context.Context, in *GetTaskQueueUserDataRequest, opts ...grpc.CallOption) (*GetTaskQueueUserDataResponse, error) { out := new(GetTaskQueueUserDataResponse) err := c.cc.Invoke(ctx, "/temporal.server.api.matchingservice.v1.MatchingService/GetTaskQueueUserData", in, out, opts...) @@ -321,8 +308,6 @@ type MatchingServiceServer interface { // aip.dev/not-precedent: UpdateWorkerBuildIdOrdering RPC doesn't follow Google API format. --) UpdateWorkerBuildIdCompatibility(context.Context, *UpdateWorkerBuildIdCompatibilityRequest) (*UpdateWorkerBuildIdCompatibilityResponse, error) GetWorkerBuildIdCompatibility(context.Context, *GetWorkerBuildIdCompatibilityRequest) (*GetWorkerBuildIdCompatibilityResponse, error) - // Tell a task queue that the associated user data has changed. - InvalidateTaskQueueUserData(context.Context, *InvalidateTaskQueueUserDataRequest) (*InvalidateTaskQueueUserDataResponse, error) // Fetch user data for a task queue, this request should always be routed to the node holding the root partition of the workflow task queue. GetTaskQueueUserData(context.Context, *GetTaskQueueUserDataRequest) (*GetTaskQueueUserDataResponse, error) // Apply a user data replication event. @@ -366,9 +351,6 @@ func (*UnimplementedMatchingServiceServer) UpdateWorkerBuildIdCompatibility(ctx func (*UnimplementedMatchingServiceServer) GetWorkerBuildIdCompatibility(ctx context.Context, req *GetWorkerBuildIdCompatibilityRequest) (*GetWorkerBuildIdCompatibilityResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetWorkerBuildIdCompatibility not implemented") } -func (*UnimplementedMatchingServiceServer) InvalidateTaskQueueUserData(ctx context.Context, req *InvalidateTaskQueueUserDataRequest) (*InvalidateTaskQueueUserDataResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method InvalidateTaskQueueUserData not implemented") -} func (*UnimplementedMatchingServiceServer) GetTaskQueueUserData(ctx context.Context, req *GetTaskQueueUserDataRequest) (*GetTaskQueueUserDataResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetTaskQueueUserData not implemented") } @@ -578,24 +560,6 @@ func _MatchingService_GetWorkerBuildIdCompatibility_Handler(srv interface{}, ctx return interceptor(ctx, in, info, handler) } -func _MatchingService_InvalidateTaskQueueUserData_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(InvalidateTaskQueueUserDataRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MatchingServiceServer).InvalidateTaskQueueUserData(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/temporal.server.api.matchingservice.v1.MatchingService/InvalidateTaskQueueUserData", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MatchingServiceServer).InvalidateTaskQueueUserData(ctx, req.(*InvalidateTaskQueueUserDataRequest)) - } - return interceptor(ctx, in, info, handler) -} - func _MatchingService_GetTaskQueueUserData_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetTaskQueueUserDataRequest) if err := dec(in); err != nil { @@ -680,10 +644,6 @@ var _MatchingService_serviceDesc = grpc.ServiceDesc{ MethodName: "GetWorkerBuildIdCompatibility", Handler: _MatchingService_GetWorkerBuildIdCompatibility_Handler, }, - { - MethodName: "InvalidateTaskQueueUserData", - Handler: _MatchingService_InvalidateTaskQueueUserData_Handler, - }, { MethodName: "GetTaskQueueUserData", Handler: _MatchingService_GetTaskQueueUserData_Handler, diff --git a/api/matchingservicemock/v1/service.pb.mock.go b/api/matchingservicemock/v1/service.pb.mock.go index 7c67e604aa2..76a5e9eeab9 100644 --- a/api/matchingservicemock/v1/service.pb.mock.go +++ b/api/matchingservicemock/v1/service.pb.mock.go @@ -200,26 +200,6 @@ func (mr *MockMatchingServiceClientMockRecorder) GetWorkerBuildIdCompatibility(c return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetWorkerBuildIdCompatibility", reflect.TypeOf((*MockMatchingServiceClient)(nil).GetWorkerBuildIdCompatibility), varargs...) } -// InvalidateTaskQueueUserData mocks base method. -func (m *MockMatchingServiceClient) InvalidateTaskQueueUserData(ctx context.Context, in *matchingservice.InvalidateTaskQueueUserDataRequest, opts ...grpc.CallOption) (*matchingservice.InvalidateTaskQueueUserDataResponse, error) { - m.ctrl.T.Helper() - varargs := []interface{}{ctx, in} - for _, a := range opts { - varargs = append(varargs, a) - } - ret := m.ctrl.Call(m, "InvalidateTaskQueueUserData", varargs...) - ret0, _ := ret[0].(*matchingservice.InvalidateTaskQueueUserDataResponse) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// InvalidateTaskQueueUserData indicates an expected call of InvalidateTaskQueueUserData. -func (mr *MockMatchingServiceClientMockRecorder) InvalidateTaskQueueUserData(ctx, in interface{}, opts ...interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - varargs := append([]interface{}{ctx, in}, opts...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InvalidateTaskQueueUserData", reflect.TypeOf((*MockMatchingServiceClient)(nil).InvalidateTaskQueueUserData), varargs...) -} - // ListTaskQueuePartitions mocks base method. func (m *MockMatchingServiceClient) ListTaskQueuePartitions(ctx context.Context, in *matchingservice.ListTaskQueuePartitionsRequest, opts ...grpc.CallOption) (*matchingservice.ListTaskQueuePartitionsResponse, error) { m.ctrl.T.Helper() @@ -468,21 +448,6 @@ func (mr *MockMatchingServiceServerMockRecorder) GetWorkerBuildIdCompatibility(a return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetWorkerBuildIdCompatibility", reflect.TypeOf((*MockMatchingServiceServer)(nil).GetWorkerBuildIdCompatibility), arg0, arg1) } -// InvalidateTaskQueueUserData mocks base method. -func (m *MockMatchingServiceServer) InvalidateTaskQueueUserData(arg0 context.Context, arg1 *matchingservice.InvalidateTaskQueueUserDataRequest) (*matchingservice.InvalidateTaskQueueUserDataResponse, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "InvalidateTaskQueueUserData", arg0, arg1) - ret0, _ := ret[0].(*matchingservice.InvalidateTaskQueueUserDataResponse) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// InvalidateTaskQueueUserData indicates an expected call of InvalidateTaskQueueUserData. -func (mr *MockMatchingServiceServerMockRecorder) InvalidateTaskQueueUserData(arg0, arg1 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InvalidateTaskQueueUserData", reflect.TypeOf((*MockMatchingServiceServer)(nil).InvalidateTaskQueueUserData), arg0, arg1) -} - // ListTaskQueuePartitions mocks base method. func (m *MockMatchingServiceServer) ListTaskQueuePartitions(arg0 context.Context, arg1 *matchingservice.ListTaskQueuePartitionsRequest) (*matchingservice.ListTaskQueuePartitionsResponse, error) { m.ctrl.T.Helper() diff --git a/client/matching/client_gen.go b/client/matching/client_gen.go index 576f0e2ad2c..04c1bd21ef9 100644 --- a/client/matching/client_gen.go +++ b/client/matching/client_gen.go @@ -110,21 +110,6 @@ func (c *clientImpl) GetWorkerBuildIdCompatibility( return client.GetWorkerBuildIdCompatibility(ctx, request, opts...) } -func (c *clientImpl) InvalidateTaskQueueUserData( - ctx context.Context, - request *matchingservice.InvalidateTaskQueueUserDataRequest, - opts ...grpc.CallOption, -) (*matchingservice.InvalidateTaskQueueUserDataResponse, error) { - - client, err := c.getClientForTaskqueue(request.GetNamespaceId(), &taskqueuepb.TaskQueue{Name: request.GetTaskQueue()}, request.GetTaskQueueType()) - if err != nil { - return nil, err - } - ctx, cancel := c.createContext(ctx) - defer cancel() - return client.InvalidateTaskQueueUserData(ctx, request, opts...) -} - func (c *clientImpl) ListTaskQueuePartitions( ctx context.Context, request *matchingservice.ListTaskQueuePartitionsRequest, diff --git a/client/matching/metric_client_gen.go b/client/matching/metric_client_gen.go index 730c4cc2844..c1d8ad7ca5d 100644 --- a/client/matching/metric_client_gen.go +++ b/client/matching/metric_client_gen.go @@ -105,20 +105,6 @@ func (c *metricClient) GetWorkerBuildIdCompatibility( return c.client.GetWorkerBuildIdCompatibility(ctx, request, opts...) } -func (c *metricClient) InvalidateTaskQueueUserData( - ctx context.Context, - request *matchingservice.InvalidateTaskQueueUserDataRequest, - opts ...grpc.CallOption, -) (_ *matchingservice.InvalidateTaskQueueUserDataResponse, retError error) { - - metricsHandler, startTime := c.startMetricsRecording(ctx, metrics.MatchingClientInvalidateTaskQueueUserDataScope) - defer func() { - c.finishMetricsRecording(metricsHandler, startTime, retError) - }() - - return c.client.InvalidateTaskQueueUserData(ctx, request, opts...) -} - func (c *metricClient) ListTaskQueuePartitions( ctx context.Context, request *matchingservice.ListTaskQueuePartitionsRequest, diff --git a/client/matching/retryable_client_gen.go b/client/matching/retryable_client_gen.go index 544867fc7ca..2b93f9b70aa 100644 --- a/client/matching/retryable_client_gen.go +++ b/client/matching/retryable_client_gen.go @@ -140,21 +140,6 @@ func (c *retryableClient) GetWorkerBuildIdCompatibility( return resp, err } -func (c *retryableClient) InvalidateTaskQueueUserData( - ctx context.Context, - request *matchingservice.InvalidateTaskQueueUserDataRequest, - opts ...grpc.CallOption, -) (*matchingservice.InvalidateTaskQueueUserDataResponse, error) { - var resp *matchingservice.InvalidateTaskQueueUserDataResponse - op := func(ctx context.Context) error { - var err error - resp, err = c.client.InvalidateTaskQueueUserData(ctx, request, opts...) - return err - } - err := backoff.ThrottleRetryContext(ctx, op, c.policy, c.isRetryable) - return resp, err -} - func (c *retryableClient) ListTaskQueuePartitions( ctx context.Context, request *matchingservice.ListTaskQueuePartitionsRequest, diff --git a/common/dynamicconfig/constants.go b/common/dynamicconfig/constants.go index 3b957fa8f5d..87a4d612e0a 100644 --- a/common/dynamicconfig/constants.go +++ b/common/dynamicconfig/constants.go @@ -347,8 +347,8 @@ const ( MatchingForwarderMaxChildrenPerNode = "matching.forwarderMaxChildrenPerNode" // MatchingShutdownDrainDuration is the duration of traffic drain during shutdown MatchingShutdownDrainDuration = "matching.shutdownDrainDuration" - // MatchingUserDataPollFrequency is how often non-root partitions will poll the root partition for fresh metadata - MatchingUserDataPollFrequency = "matching.userDataPollFrequency" + // MatchingGetUserDataLongPollTimeout is the max length of long polls for GetUserData calls between partitions. + MatchingGetUserDataLongPollTimeout = "matching.getUserDataLongPollTimeout" // keys for history diff --git a/common/metrics/metric_defs.go b/common/metrics/metric_defs.go index 52494b1c35c..df647055e3c 100644 --- a/common/metrics/metric_defs.go +++ b/common/metrics/metric_defs.go @@ -467,8 +467,6 @@ const ( MatchingClientUpdateWorkerBuildIdCompatibilityScope = "MatchingClientUpdateWorkerBuildIdCompatibility" // MatchingClientGetWorkerBuildIdCompatibilityScope tracks RPC calls to matching service MatchingClientGetWorkerBuildIdCompatibilityScope = "MatchingClientGetWorkerBuildIdCompatibility" - // MatchingClientInvalidateTaskQueueUserDataScope tracks RPC calls to matching service - MatchingClientInvalidateTaskQueueUserDataScope = "MatchingClientInvalidateTaskQueueUserData" // MatchingClientGetTaskQueueUserDataScope tracks RPC calls to matching service MatchingClientGetTaskQueueUserDataScope = "MatchingClientGetTaskQueueUserData" // MatchingClientApplyTaskQueueUserDataReplicationEventScope tracks RPC calls to matching service @@ -1108,8 +1106,6 @@ const ( MatchingUpdateWorkerBuildIdCompatibilityScope = "UpdateWorkerBuildIdCompatibility" // MatchingGetWorkerBuildIdCompatibilityScope tracks GetWorkerBuildIdCompatibility API calls received by service MatchingGetWorkerBuildIdCompatibilityScope = "GetWorkerBuildIdCompatibility" - // MatchingInvalidateTaskQueueUserDataScope tracks InvalidateTaskQueueUserData API calls received by service - MatchingInvalidateTaskQueueUserDataScope = "InvalidateTaskQueueUserData" // MatchingGetTaskQueueUserDataScope tracks GetTaskQueueUserData API calls received by service MatchingGetTaskQueueUserDataScope = "GetTaskQueueUserData" // MatchingApplyTaskQueueUserDataReplicationEventScope tracks ApplyTaskQueueUserDataReplicationEvent API calls received by service diff --git a/proto/internal/temporal/server/api/matchingservice/v1/request_response.proto b/proto/internal/temporal/server/api/matchingservice/v1/request_response.proto index e199203a4f6..18f6a57d44b 100644 --- a/proto/internal/temporal/server/api/matchingservice/v1/request_response.proto +++ b/proto/internal/temporal/server/api/matchingservice/v1/request_response.proto @@ -213,15 +213,6 @@ message GetWorkerBuildIdCompatibilityResponse { temporal.api.workflowservice.v1.GetWorkerBuildIdCompatibilityResponse response = 1; } -message InvalidateTaskQueueUserDataRequest { - string namespace_id = 1; - string task_queue = 2; - temporal.api.enums.v1.TaskQueueType task_queue_type = 3; - // The partition's cached user data should be invalidated and replaced with this data, if set. - temporal.server.api.persistence.v1.VersionedTaskQueueUserData user_data = 4; -} -message InvalidateTaskQueueUserDataResponse {} - message GetTaskQueueUserDataRequest { string namespace_id = 1; // The task queue to fetch data from. Is always considered as a workflow queue, since root @@ -231,6 +222,9 @@ message GetTaskQueueUserDataRequest { // If the requester has no data, it should set this to 0. // This value must not be set to a negative number (note that our linter suggests avoiding uint64). int64 last_known_user_data_version = 3; + // If set and last_known_user_data_version is the current version, block until new data is + // available (or timeout). + bool wait_new_data = 4; } message GetTaskQueueUserDataResponse { // Whether this task queue has any stored user data diff --git a/proto/internal/temporal/server/api/matchingservice/v1/service.proto b/proto/internal/temporal/server/api/matchingservice/v1/service.proto index 19353507120..debadb7bbd9 100644 --- a/proto/internal/temporal/server/api/matchingservice/v1/service.proto +++ b/proto/internal/temporal/server/api/matchingservice/v1/service.proto @@ -85,8 +85,6 @@ service MatchingService { // aip.dev/not-precedent: UpdateWorkerBuildIdOrdering RPC doesn't follow Google API format. --) rpc UpdateWorkerBuildIdCompatibility (UpdateWorkerBuildIdCompatibilityRequest) returns (UpdateWorkerBuildIdCompatibilityResponse) {} rpc GetWorkerBuildIdCompatibility (GetWorkerBuildIdCompatibilityRequest) returns (GetWorkerBuildIdCompatibilityResponse) {} - // Tell a task queue that the associated user data has changed. - rpc InvalidateTaskQueueUserData (InvalidateTaskQueueUserDataRequest) returns (InvalidateTaskQueueUserDataResponse) {} // Fetch user data for a task queue, this request should always be routed to the node holding the root partition of the workflow task queue. rpc GetTaskQueueUserData (GetTaskQueueUserDataRequest) returns (GetTaskQueueUserDataResponse) {} diff --git a/service/matching/config.go b/service/matching/config.go index fc45dc39164..c318c51dcf4 100644 --- a/service/matching/config.go +++ b/service/matching/config.go @@ -58,7 +58,7 @@ type ( ForwarderMaxChildrenPerNode dynamicconfig.IntPropertyFnWithTaskQueueInfoFilters VersionCompatibleSetLimitPerQueue dynamicconfig.IntPropertyFn VersionBuildIdLimitPerQueue dynamicconfig.IntPropertyFn - UserDataPollFrequency dynamicconfig.DurationPropertyFn + GetUserDataLongPollTimeout dynamicconfig.DurationPropertyFn // Time to hold a poll request before returning an empty response if there are no tasks LongPollExpirationInterval dynamicconfig.DurationPropertyFnWithTaskQueueInfoFilters @@ -93,6 +93,10 @@ type ( MaxTaskQueueIdleTime func() time.Duration MinTaskThrottlingBurstSize func() int MaxTaskDeleteBatchSize func() int + + GetUserDataLongPollTimeout dynamicconfig.DurationPropertyFn + GetUserDataMinWaitTime time.Duration + // taskWriter configuration OutstandingTaskAppendsThreshold func() int MaxTaskBatchSize func() int @@ -147,7 +151,7 @@ func NewConfig(dc *dynamicconfig.Collection) *Config { ShutdownDrainDuration: dc.GetDurationProperty(dynamicconfig.MatchingShutdownDrainDuration, 0*time.Second), VersionCompatibleSetLimitPerQueue: dc.GetIntProperty(dynamicconfig.VersionCompatibleSetLimitPerQueue, 10), VersionBuildIdLimitPerQueue: dc.GetIntProperty(dynamicconfig.VersionBuildIdLimitPerQueue, 1000), - UserDataPollFrequency: dc.GetDurationProperty(dynamicconfig.MatchingUserDataPollFrequency, 5*time.Minute), + GetUserDataLongPollTimeout: dc.GetDurationProperty(dynamicconfig.MatchingGetUserDataLongPollTimeout, 5*time.Minute), AdminNamespaceToPartitionDispatchRate: dc.GetFloatPropertyFilteredByNamespace(dynamicconfig.AdminMatchingNamespaceToPartitionDispatchRate, 10000), AdminNamespaceTaskqueueToPartitionDispatchRate: dc.GetFloatPropertyFilteredByTaskQueueInfo(dynamicconfig.AdminMatchingNamespaceTaskqueueToPartitionDispatchRate, 1000), @@ -181,6 +185,8 @@ func newTaskQueueConfig(id *taskQueueID, config *Config, namespace namespace.Nam MaxTaskDeleteBatchSize: func() int { return config.MaxTaskDeleteBatchSize(namespace.String(), taskQueueName, taskType) }, + GetUserDataLongPollTimeout: config.GetUserDataLongPollTimeout, + GetUserDataMinWaitTime: 1 * time.Second, OutstandingTaskAppendsThreshold: func() int { return config.OutstandingTaskAppendsThreshold(namespace.String(), taskQueueName, taskType) }, diff --git a/service/matching/configs/quotas.go b/service/matching/configs/quotas.go index 27f647a1e17..65ecaddb82b 100644 --- a/service/matching/configs/quotas.go +++ b/service/matching/configs/quotas.go @@ -41,7 +41,6 @@ var ( "RespondQueryTaskCompleted": 0, "GetWorkerBuildIdCompatibility": 0, "UpdateWorkerBuildIdCompatibility": 0, - "InvalidateTaskQueueUserData": 0, "GetTaskQueueUserData": 0, "ApplyTaskQueueUserDataReplicationEvent": 0, } diff --git a/service/matching/db.go b/service/matching/db.go index c6170e026b5..384e7a999ff 100644 --- a/service/matching/db.go +++ b/service/matching/db.go @@ -50,14 +50,15 @@ const ( type ( taskQueueDB struct { sync.Mutex - namespaceID namespace.ID - taskQueue *taskQueueID - taskQueueKind enumspb.TaskQueueKind - rangeID int64 - ackLevel int64 - userData *persistencespb.VersionedTaskQueueUserData - store persistence.TaskManager - logger log.Logger + namespaceID namespace.ID + taskQueue *taskQueueID + taskQueueKind enumspb.TaskQueueKind + rangeID int64 + ackLevel int64 + userData *persistencespb.VersionedTaskQueueUserData + userDataChanged chan struct{} + store persistence.TaskManager + logger log.Logger } taskQueueState struct { rangeID int64 @@ -82,11 +83,12 @@ var ( // spread out and happen in background routines func newTaskQueueDB(store persistence.TaskManager, namespaceID namespace.ID, taskQueue *taskQueueID, kind enumspb.TaskQueueKind, logger log.Logger) *taskQueueDB { return &taskQueueDB{ - namespaceID: namespaceID, - taskQueue: taskQueue, - taskQueueKind: kind, - store: store, - logger: logger, + namespaceID: namespaceID, + taskQueue: taskQueue, + taskQueueKind: kind, + store: store, + logger: logger, + userDataChanged: make(chan struct{}), } } @@ -140,7 +142,7 @@ func (db *taskQueueDB) takeOverTaskQueueLocked( } db.ackLevel = response.TaskQueueInfo.AckLevel db.rangeID = response.RangeID + 1 - _, err = db.getUserDataLocked(ctx) + _, _, err = db.getUserDataLocked(ctx) if errors.Is(err, errUserDataNotPresentOnPartition) { return nil } @@ -154,7 +156,7 @@ func (db *taskQueueDB) takeOverTaskQueueLocked( return err } db.rangeID = initialRangeID - _, err = db.getUserDataLocked(ctx) + _, _, err = db.getUserDataLocked(ctx) if errors.Is(err, errUserDataNotPresentOnPartition) { return nil } @@ -292,20 +294,26 @@ func (db *taskQueueDB) CompleteTasksLessThan( // will cause cache inconsistency. func (db *taskQueueDB) GetUserData( ctx context.Context, -) (*persistencespb.VersionedTaskQueueUserData, error) { +) (*persistencespb.VersionedTaskQueueUserData, chan struct{}, error) { db.Lock() defer db.Unlock() return db.getUserDataLocked(ctx) } +func (db *taskQueueDB) setUserDataLocked(userData *persistencespb.VersionedTaskQueueUserData) { + db.userData = userData + close(db.userDataChanged) + db.userDataChanged = make(chan struct{}) +} + // db.Lock() must be held before calling. // Returns in-memory cached value or reads from DB and updates the cached value. func (db *taskQueueDB) getUserDataLocked( ctx context.Context, -) (*persistencespb.VersionedTaskQueueUserData, error) { +) (*persistencespb.VersionedTaskQueueUserData, chan struct{}, error) { if db.userData == nil { if !db.taskQueue.OwnsUserData() { - return nil, errUserDataNotPresentOnPartition + return nil, db.userDataChanged, errUserDataNotPresentOnPartition } response, err := db.store.GetTaskQueueUserData(ctx, &persistence.GetTaskQueueUserDataRequest{ @@ -315,14 +323,14 @@ func (db *taskQueueDB) getUserDataLocked( if err != nil { var notFoundError *serviceerror.NotFound if errors.As(err, ¬FoundError) { - return nil, nil + return nil, db.userDataChanged, nil } - return nil, err + return nil, nil, err } - db.userData = response.UserData + db.setUserDataLocked(response.UserData) } - return db.userData, nil + return db.userData, db.userDataChanged, nil } // UpdateUserData allows callers to update user data (such as worker build IDs) for this task queue. The pointer passed @@ -338,7 +346,7 @@ func (db *taskQueueDB) UpdateUserData(ctx context.Context, updateFn func(*persis db.Lock() defer db.Unlock() - userData, err := db.getUserDataLocked(ctx) + userData, _, err := db.getUserDataLocked(ctx) if err != nil { return nil, err } @@ -357,15 +365,15 @@ func (db *taskQueueDB) UpdateUserData(ctx context.Context, updateFn func(*persis UserData: &persistencespb.VersionedTaskQueueUserData{Version: userData.GetVersion(), Data: updatedUserData}, }) if err == nil { - db.userData = &persistencespb.VersionedTaskQueueUserData{Version: userData.GetVersion() + 1, Data: updatedUserData} + db.setUserDataLocked(&persistencespb.VersionedTaskQueueUserData{Version: userData.GetVersion() + 1, Data: updatedUserData}) } return db.userData, err } -func (db *taskQueueDB) setUserDataForNonRootPartition(userData *persistencespb.VersionedTaskQueueUserData) { +func (db *taskQueueDB) setUserDataForNonOwningPartition(userData *persistencespb.VersionedTaskQueueUserData) { db.Lock() defer db.Unlock() - db.userData = userData + db.setUserDataLocked(userData) } func (db *taskQueueDB) expiryTime() *time.Time { diff --git a/service/matching/handler.go b/service/matching/handler.go index 17e410ac129..1e92a9ff660 100644 --- a/service/matching/handler.go +++ b/service/matching/handler.go @@ -300,7 +300,7 @@ func (h *Handler) UpdateWorkerBuildIdCompatibility( return h.engine.UpdateWorkerBuildIdCompatibility(ctx, request) } -// GetWorkerBuildIdCompatibility fetches the worker versioning graph for a task queue +// GetWorkerBuildIdCompatibility fetches the worker versioning data for a task queue func (h *Handler) GetWorkerBuildIdCompatibility( ctx context.Context, request *matchingservice.GetWorkerBuildIdCompatibilityRequest, @@ -309,15 +309,6 @@ func (h *Handler) GetWorkerBuildIdCompatibility( return h.engine.GetWorkerBuildIdCompatibility(ctx, request) } -// InvalidateTaskQueueMetadata notifies a task queue that some data has changed, and should be invalidated/refreshed -func (h *Handler) InvalidateTaskQueueUserData( - ctx context.Context, - request *matchingservice.InvalidateTaskQueueUserDataRequest, -) (_ *matchingservice.InvalidateTaskQueueUserDataResponse, retError error) { - defer log.CapturePanic(h.logger, &retError) - return h.engine.InvalidateTaskQueueUserData(ctx, request) -} - func (h *Handler) GetTaskQueueUserData( ctx context.Context, request *matchingservice.GetTaskQueueUserDataRequest, diff --git a/service/matching/matchingEngine.go b/service/matching/matchingEngine.go index d7ea96ea6f4..f9339261990 100644 --- a/service/matching/matchingEngine.go +++ b/service/matching/matchingEngine.go @@ -807,7 +807,7 @@ func (e *matchingEngineImpl) GetWorkerBuildIdCompatibility( } return nil, err } - userData, err := tqMgr.GetUserData(ctx) + userData, _, err := tqMgr.GetUserData(ctx) if err != nil { if _, ok := err.(*serviceerror.NotFound); ok { return &matchingservice.GetWorkerBuildIdCompatibilityResponse{}, nil @@ -819,29 +819,6 @@ func (e *matchingEngineImpl) GetWorkerBuildIdCompatibility( }, nil } -func (e *matchingEngineImpl) InvalidateTaskQueueUserData( - ctx context.Context, - req *matchingservice.InvalidateTaskQueueUserDataRequest, -) (*matchingservice.InvalidateTaskQueueUserDataResponse, error) { - taskQueue, err := newTaskQueueID(namespace.ID(req.GetNamespaceId()), req.GetTaskQueue(), req.GetTaskQueueType()) - if err != nil { - return nil, err - } - tqMgr, err := e.getTaskQueueManager(ctx, taskQueue, enumspb.TASK_QUEUE_KIND_NORMAL, false) - if tqMgr == nil && err == nil { - // Task queue is not currently loaded, so nothing to do here - return &matchingservice.InvalidateTaskQueueUserDataResponse{}, nil - } - if err != nil { - return nil, err - } - err = tqMgr.InvalidateUserData(req) - if err != nil { - return nil, err - } - return &matchingservice.InvalidateTaskQueueUserDataResponse{}, nil -} - func (e *matchingEngineImpl) GetTaskQueueUserData( ctx context.Context, req *matchingservice.GetTaskQueueUserDataRequest, @@ -860,23 +837,42 @@ func (e *matchingEngineImpl) GetTaskQueueUserData( if version < 0 { return nil, serviceerror.NewInvalidArgument("last_known_user_data_version must not be negative") } - resp := &matchingservice.GetTaskQueueUserDataResponse{} - userData, err := tqMgr.GetUserData(ctx) - if err != nil { - return nil, err + + if req.WaitNewData { + var cancel context.CancelFunc + ctx, cancel = newChildContext(ctx, e.config.GetUserDataLongPollTimeout(), returnEmptyTaskTimeBudget) + defer cancel() } - if userData != nil { - resp.TaskQueueHasUserData = true - if userData.Version > version { - resp.UserData = userData + + for { + resp := &matchingservice.GetTaskQueueUserDataResponse{} + userData, userDataChanged, err := tqMgr.GetUserData(ctx) + if err != nil && err != errUserDataNotPresentOnPartition { + return nil, err } - if userData.Version < version { - // This is highly unlikely but may happen due to an edge case in during ownership transfer. - // We rely on periodic refresh and client retries in this case to let the system eventually self-heal. - return nil, serviceerror.NewFailedPrecondition("Non-root partition requested task queue user data for version greater than known version") + if req.WaitNewData && userData.GetVersion() == version { + // long-poll: wait for data to change/appear + select { + case <-ctx.Done(): + resp.TaskQueueHasUserData = userData != nil + return resp, nil + case <-userDataChanged: + continue + } + } + if userData != nil { + resp.TaskQueueHasUserData = true + if userData.Version > version { + resp.UserData = userData + } else if userData.Version < version { + // This is highly unlikely but may happen due to an edge case in during ownership transfer. + // We rely on client retries in this case to let the system eventually self-heal. + return nil, serviceerror.NewFailedPrecondition( + "requested task queue user data for version greater than known version") + } } + return resp, nil } - return resp, nil } func (e *matchingEngineImpl) ApplyTaskQueueUserDataReplicationEvent( @@ -1164,7 +1160,7 @@ func (e *matchingEngineImpl) redirectToVersionedQueueForPoll( if err != nil { return nil, err } - userData, err := unversionedTQM.GetUserData(ctx) + userData, _, err := unversionedTQM.GetUserData(ctx) if err != nil { return nil, err } @@ -1204,7 +1200,7 @@ func (e *matchingEngineImpl) redirectToVersionedQueueForAdd( if err != nil { return nil, err } - userData, err := unversionedTQM.GetUserData(ctx) + userData, _, err := unversionedTQM.GetUserData(ctx) if err != nil { return nil, err } diff --git a/service/matching/matchingEngineInterfaces.go b/service/matching/matchingEngineInterfaces.go index 89b8460d8de..72e521c1d7c 100644 --- a/service/matching/matchingEngineInterfaces.go +++ b/service/matching/matchingEngineInterfaces.go @@ -46,7 +46,6 @@ type ( ListTaskQueuePartitions(ctx context.Context, request *matchingservice.ListTaskQueuePartitionsRequest) (*matchingservice.ListTaskQueuePartitionsResponse, error) UpdateWorkerBuildIdCompatibility(ctx context.Context, request *matchingservice.UpdateWorkerBuildIdCompatibilityRequest) (*matchingservice.UpdateWorkerBuildIdCompatibilityResponse, error) GetWorkerBuildIdCompatibility(ctx context.Context, request *matchingservice.GetWorkerBuildIdCompatibilityRequest) (*matchingservice.GetWorkerBuildIdCompatibilityResponse, error) - InvalidateTaskQueueUserData(ctx context.Context, request *matchingservice.InvalidateTaskQueueUserDataRequest) (*matchingservice.InvalidateTaskQueueUserDataResponse, error) GetTaskQueueUserData(ctx context.Context, request *matchingservice.GetTaskQueueUserDataRequest) (*matchingservice.GetTaskQueueUserDataResponse, error) ApplyTaskQueueUserDataReplicationEvent(ctx context.Context, request *matchingservice.ApplyTaskQueueUserDataReplicationEventRequest) (*matchingservice.ApplyTaskQueueUserDataReplicationEventResponse, error) } diff --git a/service/matching/matchingEngine_test.go b/service/matching/matchingEngine_test.go index d9c7219f5ff..a2bc5cb5d08 100644 --- a/service/matching/matchingEngine_test.go +++ b/service/matching/matchingEngine_test.go @@ -48,6 +48,7 @@ import ( taskqueuepb "go.temporal.io/api/taskqueue/v1" "go.temporal.io/api/workflowservice/v1" + clockspb "go.temporal.io/server/api/clock/v1" "go.temporal.io/server/api/historyservice/v1" "go.temporal.io/server/api/historyservicemock/v1" "go.temporal.io/server/api/matchingservice/v1" @@ -56,6 +57,7 @@ import ( tokenspb "go.temporal.io/server/api/token/v1" "go.temporal.io/server/common" "go.temporal.io/server/common/clock" + "go.temporal.io/server/common/clock/hybrid_logical_clock" "go.temporal.io/server/common/cluster" "go.temporal.io/server/common/dynamicconfig" "go.temporal.io/server/common/log" @@ -1900,7 +1902,6 @@ func (s *matchingEngineSuite) TestTaskExpiryAndCompletion() { } func (s *matchingEngineSuite) TestGetVersioningData() { - s.mockMatchingClient.EXPECT().InvalidateTaskQueueUserData(gomock.Any(), gomock.Any()).Return(nil, nil).AnyTimes() namespaceID := namespace.ID(uuid.New()) tq := "tupac" @@ -2005,44 +2006,185 @@ func (s *matchingEngineSuite) TestGetVersioningData() { s.Equal("5", majorSets[0].GetBuildIds()[0]) } -func (s *matchingEngineSuite) TestActivityQueueMetadataInvalidate() { - // Overwrite the matching mock - we expect one and only one fetch call here, after the activity queue is invalidated - mockMatch := matchingservicemock.NewMockMatchingServiceClient(s.controller) - mockMatch.EXPECT().GetTaskQueueUserData(gomock.Any(), gomock.Any()). - Return(&matchingservice.GetTaskQueueUserDataResponse{}, nil). - Times(1) - s.matchingEngine.matchingClient = mockMatch +func (s *matchingEngineSuite) TestGetTaskQueueUserData_NoData() { + namespaceID := namespace.ID(uuid.New()) + tq := "tupac" + + res, err := s.matchingEngine.GetTaskQueueUserData(context.Background(), &matchingservice.GetTaskQueueUserDataRequest{ + NamespaceId: namespaceID.String(), + TaskQueue: tq, + LastKnownUserDataVersion: 0, + }) + s.NoError(err) + s.False(res.TaskQueueHasUserData) + s.Nil(res.UserData.GetData()) +} +func (s *matchingEngineSuite) TestGetTaskQueueUserData_ReturnsData() { namespaceID := namespace.ID(uuid.New()) tq := "tupac" - res, err := s.matchingEngine.GetWorkerBuildIdCompatibility(context.Background(), &matchingservice.GetWorkerBuildIdCompatibilityRequest{ - NamespaceId: namespaceID.String(), - Request: &workflowservice.GetWorkerBuildIdCompatibilityRequest{ - Namespace: namespaceID.String(), - TaskQueue: tq, - }, + userData := &persistencespb.VersionedTaskQueueUserData{ + Version: 1, + Data: &persistencespb.TaskQueueUserData{Clock: &clockspb.HybridLogicalClock{WallClock: 123456}}, + } + s.taskManager.UpdateTaskQueueUserData(context.Background(), + &persistence.UpdateTaskQueueUserDataRequest{ + NamespaceID: namespaceID.String(), + TaskQueue: tq, + UserData: userData, + }) + userData.Version++ + + res, err := s.matchingEngine.GetTaskQueueUserData(context.Background(), &matchingservice.GetTaskQueueUserDataRequest{ + NamespaceId: namespaceID.String(), + TaskQueue: tq, + LastKnownUserDataVersion: 0, }) s.NoError(err) - s.NotNil(res) + s.True(res.TaskQueueHasUserData) + s.Equal(res.UserData, userData) +} + +func (s *matchingEngineSuite) TestGetTaskQueueUserData_ReturnsEmpty() { + namespaceID := namespace.ID(uuid.New()) + tq := "tupac" - // Force the activity queue to be loaded (invalidate won't load it - so we have to load it for invalidate to care - // about fetching) - actTqId := newTestTaskQueueID(namespaceID, tq, enumspb.TASK_QUEUE_TYPE_ACTIVITY) - ttqm, err := s.matchingEngine.getTaskQueueManager(context.Background(), actTqId, enumspb.TASK_QUEUE_KIND_NORMAL, true) + userData := &persistencespb.VersionedTaskQueueUserData{ + Version: 1, + Data: &persistencespb.TaskQueueUserData{Clock: &clockspb.HybridLogicalClock{WallClock: 123456}}, + } + s.taskManager.UpdateTaskQueueUserData(context.Background(), + &persistence.UpdateTaskQueueUserDataRequest{ + NamespaceID: namespaceID.String(), + TaskQueue: tq, + UserData: userData, + }) + userData.Version++ + + res, err := s.matchingEngine.GetTaskQueueUserData(context.Background(), &matchingservice.GetTaskQueueUserDataRequest{ + NamespaceId: namespaceID.String(), + TaskQueue: tq, + LastKnownUserDataVersion: userData.Version, + }) s.NoError(err) - s.NotNil(ttqm) - - _, err = s.matchingEngine.InvalidateTaskQueueUserData(context.Background(), &matchingservice.InvalidateTaskQueueUserDataRequest{ - NamespaceId: namespaceID.String(), - TaskQueue: tq, - TaskQueueType: enumspb.TASK_QUEUE_TYPE_ACTIVITY, - UserData: &persistencespb.VersionedTaskQueueUserData{ - Version: 1, - Data: mkUserData(1), - }, + s.True(res.TaskQueueHasUserData) + s.Nil(res.UserData.GetData()) +} + +func (s *matchingEngineSuite) TestGetTaskQueueUserData_LongPoll_Expires() { + namespaceID := namespace.ID(uuid.New()) + tq := "tupac" + + userData := &persistencespb.VersionedTaskQueueUserData{ + Version: 1, + Data: &persistencespb.TaskQueueUserData{Clock: &clockspb.HybridLogicalClock{WallClock: 123456}}, + } + s.taskManager.UpdateTaskQueueUserData(context.Background(), + &persistence.UpdateTaskQueueUserDataRequest{ + NamespaceID: namespaceID.String(), + TaskQueue: tq, + UserData: userData, + }) + userData.Version++ + + // GetTaskQueueUserData will try to return 5s with a min of 1s before the deadline, so this will block 1s + ctx, cancel := context.WithTimeout(context.Background(), 3*time.Second) + defer cancel() + + start := time.Now() + res, err := s.matchingEngine.GetTaskQueueUserData(ctx, &matchingservice.GetTaskQueueUserDataRequest{ + NamespaceId: namespaceID.String(), + TaskQueue: tq, + LastKnownUserDataVersion: userData.Version, + WaitNewData: true, + }) + s.NoError(err) + s.True(res.TaskQueueHasUserData) + s.Nil(res.UserData.GetData()) + elapsed := time.Since(start) + s.Greater(elapsed, 900*time.Millisecond) +} + +func (s *matchingEngineSuite) TestGetTaskQueueUserData_LongPoll_WakesUp_FromNothing() { + namespaceID := namespace.ID(uuid.New()) + tq := "tupac" + + ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second) + defer cancel() + + go func() { + time.Sleep(500 * time.Millisecond) + + _, err := s.matchingEngine.UpdateWorkerBuildIdCompatibility(context.Background(), &matchingservice.UpdateWorkerBuildIdCompatibilityRequest{ + NamespaceId: namespaceID.String(), + Request: &workflowservice.UpdateWorkerBuildIdCompatibilityRequest{ + Namespace: namespaceID.String(), + TaskQueue: tq, + Operation: &workflowservice.UpdateWorkerBuildIdCompatibilityRequest_AddNewBuildIdInNewDefaultSet{ + AddNewBuildIdInNewDefaultSet: "v1", + }, + }, + }) + s.NoError(err) + }() + + res, err := s.matchingEngine.GetTaskQueueUserData(ctx, &matchingservice.GetTaskQueueUserDataRequest{ + NamespaceId: namespaceID.String(), + TaskQueue: tq, + LastKnownUserDataVersion: 0, // must be zero to start + WaitNewData: true, + }) + s.NoError(err) + s.True(res.TaskQueueHasUserData) + s.NotNil(res.UserData.Data.VersioningData) +} + +func (s *matchingEngineSuite) TestGetTaskQueueUserData_LongPoll_WakesUp_From2to3() { + namespaceID := namespace.ID(uuid.New()) + tq := "tupac" + + userData := &persistencespb.VersionedTaskQueueUserData{ + Version: 1, + Data: &persistencespb.TaskQueueUserData{Clock: &clockspb.HybridLogicalClock{WallClock: 123456}}, + } + s.taskManager.UpdateTaskQueueUserData(context.Background(), + &persistence.UpdateTaskQueueUserDataRequest{ + NamespaceID: namespaceID.String(), + TaskQueue: tq, + UserData: userData, + }) + userData.Version++ + + ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second) + defer cancel() + + go func() { + time.Sleep(500 * time.Millisecond) + + _, err := s.matchingEngine.UpdateWorkerBuildIdCompatibility(context.Background(), &matchingservice.UpdateWorkerBuildIdCompatibilityRequest{ + NamespaceId: namespaceID.String(), + Request: &workflowservice.UpdateWorkerBuildIdCompatibilityRequest{ + Namespace: namespaceID.String(), + TaskQueue: tq, + Operation: &workflowservice.UpdateWorkerBuildIdCompatibilityRequest_AddNewBuildIdInNewDefaultSet{ + AddNewBuildIdInNewDefaultSet: "v1", + }, + }, + }) + s.NoError(err) + }() + + res, err := s.matchingEngine.GetTaskQueueUserData(ctx, &matchingservice.GetTaskQueueUserDataRequest{ + NamespaceId: namespaceID.String(), + TaskQueue: tq, + LastKnownUserDataVersion: userData.Version, + WaitNewData: true, }) s.NoError(err) + s.True(res.TaskQueueHasUserData) + s.True(hybrid_logical_clock.Greater(*res.UserData.Data.Clock, *userData.Data.Clock)) + s.NotNil(res.UserData.Data.VersioningData) } func (s *matchingEngineSuite) setupRecordActivityTaskStartedMock(tlName string) { @@ -2444,7 +2586,9 @@ func (m *testTaskManager) GetTaskQueueUserData(ctx context.Context, request *per // UpdateTaskQueueUserData implements persistence.TaskManager func (m *testTaskManager) UpdateTaskQueueUserData(ctx context.Context, request *persistence.UpdateTaskQueueUserDataRequest) error { tlm := m.getTaskQueueManager(newTestTaskQueueID(namespace.ID(request.NamespaceID), request.TaskQueue, enumspb.TASK_QUEUE_TYPE_WORKFLOW)) - tlm.userData = request.UserData + newData := *request.UserData + newData.Version++ + tlm.userData = &newData return nil } diff --git a/service/matching/taskQueueManager.go b/service/matching/taskQueueManager.go index 3cab50e936f..d81c8b0d3ab 100644 --- a/service/matching/taskQueueManager.go +++ b/service/matching/taskQueueManager.go @@ -34,7 +34,6 @@ import ( "time" "github.com/jonboulle/clockwork" - uberatomic "go.uber.org/atomic" commonpb "go.temporal.io/api/common/v1" enumspb "go.temporal.io/api/enums/v1" @@ -49,7 +48,6 @@ import ( "go.temporal.io/server/common/backoff" "go.temporal.io/server/common/cluster" "go.temporal.io/server/common/debug" - "go.temporal.io/server/common/dynamicconfig" "go.temporal.io/server/common/future" "go.temporal.io/server/common/headers" "go.temporal.io/server/common/log" @@ -57,7 +55,9 @@ import ( "go.temporal.io/server/common/metrics" "go.temporal.io/server/common/namespace" "go.temporal.io/server/common/persistence" + "go.temporal.io/server/common/tqname" "go.temporal.io/server/common/util" + "go.temporal.io/server/internal/goro" ) const ( @@ -78,8 +78,12 @@ var ( // this retry policy is currenly only used for matching persistence operations // that, if failed, the entire task queue needs to be reload persistenceOperationRetryPolicy = backoff.NewExponentialRetryPolicy(50 * time.Millisecond). - WithMaximumInterval(1 * time.Second). - WithExpirationInterval(30 * time.Second) + WithMaximumInterval(1 * time.Second). + WithExpirationInterval(30 * time.Second) + + // Retry policy for getting user data from root partition. Should retry forever. + getUserDataRetryPolicy = backoff.NewExponentialRetryPolicy(1 * time.Second). + WithMaximumInterval(5 * time.Minute) ) type ( @@ -118,12 +122,10 @@ type ( // if dispatched to local poller then nil and nil is returned. DispatchQueryTask(ctx context.Context, taskID string, request *matchingservice.QueryWorkflowRequest) (*matchingservice.QueryWorkflowResponse, error) // GetUserData returns the verioned user data for this task queue - GetUserData(ctx context.Context) (*persistencespb.VersionedTaskQueueUserData, error) + GetUserData(ctx context.Context) (*persistencespb.VersionedTaskQueueUserData, chan struct{}, error) // UpdateUserData allows callers to update user data for this task queue // Extra care should be taken to avoid mutating the existing data in the update function. UpdateUserData(ctx context.Context, replicate bool, updateFn UserDataUpdateFunc) error - // InvalidateUserData allows callers to invalidate cached data on this task queue - InvalidateUserData(request *matchingservice.InvalidateTaskQueueUserDataRequest) error CancelPoller(pollerID string) GetAllPollerInfo() []*taskqueuepb.PollerInfo HasPollerAfter(accessTime time.Time) bool @@ -165,19 +167,11 @@ type ( outstandingPollsLock sync.Mutex outstandingPollsMap map[string]context.CancelFunc clusterMeta cluster.Metadata + goroGroup goro.Group initializedError *future.FutureImpl[struct{}] // userDataInitialFetch is fulfilled once versioning data is fetched from the root partition. If this TQ is // the root partition, it is fulfilled as soon as it is fetched from db. userDataInitialFetch *future.FutureImpl[struct{}] - metadataPoller metadataPoller - } - - metadataPoller struct { - // Ensures that we launch the goroutine for polling for updates only one time - running *uberatomic.Bool - pollIntervalCfgFn dynamicconfig.DurationPropertyFn - stopChan chan struct{} - tqMgr *taskQueueManagerImpl } ) @@ -239,13 +233,7 @@ func newTaskQueueManager( taggedMetricsHandler: taggedMetricsHandler, initializedError: future.NewFuture[struct{}](), userDataInitialFetch: future.NewFuture[struct{}](), - metadataPoller: metadataPoller{ - running: uberatomic.NewBool(false), - pollIntervalCfgFn: e.config.UserDataPollFrequency, - stopChan: make(chan struct{}), - }, } - tlMgr.metadataPoller.tqMgr = tlMgr tlMgr.liveness = newLiveness( clockwork.NewRealClock(), @@ -302,7 +290,7 @@ func (c *taskQueueManagerImpl) Start() { c.liveness.Start() c.taskWriter.Start() c.taskReader.Start() - go c.fetchUserDataFromRootPartitionOnInit(context.TODO()) + c.goroGroup.Go(c.fetchUserDataLoop) c.logger.Info("", tag.LifeCycleStarted) c.taggedMetricsHandler.Counter(metrics.TaskQueueStartedCounter.GetMetricName()).Record(1) } @@ -328,10 +316,10 @@ func (c *taskQueueManagerImpl) Stop() { } c.taskGC.RunNow(ctx, ackLevel) } - c.metadataPoller.Stop() c.liveness.Stop() c.taskWriter.Stop() c.taskReader.Stop() + c.goroGroup.Cancel() c.logger.Info("", tag.LifeCycleStopped) c.taggedMetricsHandler.Counter(metrics.TaskQueueStoppedCounter.GetMetricName()).Record(1) // This may call Stop again, but the status check above makes that a no-op. @@ -343,9 +331,7 @@ func (c *taskQueueManagerImpl) WaitUntilInitialized(ctx context.Context) error { if err != nil { return err } - // We don't really care if the initial fetch worked or not, anything that *requires* a bit of metadata should fail - // that operation if it's never fetched OK. If the initial fetch errored, the metadataPoller will have been started. - _, _ = c.userDataInitialFetch.Get(ctx) + _, err = c.userDataInitialFetch.Get(ctx) return err } @@ -408,7 +394,7 @@ func (c *taskQueueManagerImpl) GetTask( // reached, instead of emptyTask, context timeout error is returned to the frontend by the rpc stack, // which counts against our SLO. By shortening the timeout by a very small amount, the emptyTask can be // returned to the handler before a context timeout error is generated. - childCtx, cancel := c.newChildContext(ctx, c.config.LongPollExpirationInterval(), returnEmptyTaskTimeBudget) + childCtx, cancel := newChildContext(ctx, c.config.LongPollExpirationInterval(), returnEmptyTaskTimeBudget) defer cancel() pollerID, ok := ctx.Value(pollerIDKey).(string) @@ -481,17 +467,9 @@ func (c *taskQueueManagerImpl) DispatchQueryTask( return c.matcher.OfferQuery(ctx, task) } -// GetVersioningData returns the versioning data for the task queue if any. If this task queue is a non-root partition and -// has no cached data, it will explicitly attempt a fetch from the root partition. -func (c *taskQueueManagerImpl) GetUserData(ctx context.Context) (*persistencespb.VersionedTaskQueueUserData, error) { - data, err := c.db.GetUserData(ctx) - if errors.Is(err, errUserDataNotPresentOnPartition) { - // If this is a non-root-partition with no versioning data, this call is indicating we might expect to find - // some. Since we may not have started the poller, we want to explicitly attempt to fetch now, because - // it's possible some was added to the root partition, but it failed to invalidate this partition. - return c.fetchUserDataFromRootPartition(ctx) - } - return data, err +// GetUserData returns the user data for the task queue if any. +func (c *taskQueueManagerImpl) GetUserData(ctx context.Context) (*persistencespb.VersionedTaskQueueUserData, chan struct{}, error) { + return c.db.GetUserData(ctx) } //nolint:revive // control coupling @@ -517,47 +495,6 @@ func (c *taskQueueManagerImpl) UpdateUserData(ctx context.Context, replicate boo return serviceerror.NewUnavailable("storing task queue user data succeeded but publishing to the namespace replication queue failed, please try again") } } - // We will have errored already if this was not the root workflow partition. - // Now notify partitions that the user data has changed. - numParts := util.Max(c.config.NumReadPartitions(), c.config.NumWritePartitions()) - wg := &sync.WaitGroup{} - for i := 0; i < numParts; i++ { - for _, tqt := range []enumspb.TaskQueueType{enumspb.TASK_QUEUE_TYPE_WORKFLOW, enumspb.TASK_QUEUE_TYPE_ACTIVITY} { - if i == 0 && tqt == enumspb.TASK_QUEUE_TYPE_WORKFLOW { - continue // Root workflow partition owns the data, skip it. - } - wg.Add(1) - go func(i int, tqt enumspb.TaskQueueType) { - tq := c.taskQueueID.WithPartition(i).FullName() - _, err := c.matchingClient.InvalidateTaskQueueUserData(ctx, - &matchingservice.InvalidateTaskQueueUserDataRequest{ - NamespaceId: c.taskQueueID.namespaceID.String(), - TaskQueue: tq, - TaskQueueType: tqt, - UserData: newData, - }) - if err != nil { - c.logger.Warn("Failed to notify partition of invalidated versioning data", - tag.WorkflowTaskQueueName(tq), tag.Error(err)) - } - wg.Done() - }(i, tqt) - } - } - wg.Wait() - return nil -} - -func (c *taskQueueManagerImpl) InvalidateUserData(request *matchingservice.InvalidateTaskQueueUserDataRequest) error { - if request.GetUserData() != nil { - if c.taskQueueID.OwnsUserData() { - // Should never happen. Root partitions do not get their user data invalidated. - c.logger.Warn("A root workflow partition was told to invalidate its user data, this should not happen") - return nil - } - c.db.setUserDataForNonRootPartition(request.GetUserData()) - c.metadataPoller.StartIfUnstarted() - } return nil } @@ -695,7 +632,7 @@ func executeWithRetry( } func (c *taskQueueManagerImpl) trySyncMatch(ctx context.Context, params addTaskParams) (bool, error) { - childCtx, cancel := c.newChildContext(ctx, c.config.SyncMatchWaitDuration(), time.Second) + childCtx, cancel := newChildContext(ctx, c.config.SyncMatchWaitDuration(), time.Second) // Mocking out TaskId for syncmatch as it hasn't been allocated yet fakeTaskIdWrapper := &persistencespb.AllocatedTaskInfo{ @@ -715,23 +652,21 @@ func (c *taskQueueManagerImpl) trySyncMatch(ctx context.Context, params addTaskP // method to create child context when childContext cannot use // all of parent's deadline but instead there is a need to leave // some time for parent to do some post-work -func (c *taskQueueManagerImpl) newChildContext( +func newChildContext( parent context.Context, timeout time.Duration, tailroom time.Duration, ) (context.Context, context.CancelFunc) { - select { - case <-parent.Done(): + if parent.Err() != nil { return parent, func() {} - default: } deadline, ok := parent.Deadline() if !ok { return context.WithTimeout(parent, timeout) } - remaining := deadline.Sub(time.Now().UTC()) - tailroom + remaining := time.Until(deadline) - tailroom if remaining < timeout { - timeout = time.Duration(util.Max(0, int64(remaining))) + timeout = util.Max(0, remaining) } return context.WithTimeout(parent, timeout) } @@ -748,92 +683,99 @@ func (c *taskQueueManagerImpl) TaskQueueKind() enumspb.TaskQueueKind { return c.taskQueueKind } -func (c *taskQueueManagerImpl) newIOContext() (context.Context, context.CancelFunc) { - ctx, cancel := context.WithTimeout(context.Background(), ioTimeout) - +func (c *taskQueueManagerImpl) callerInfoContext(ctx context.Context) context.Context { namespace, _ := c.namespaceRegistry.GetNamespaceName(c.taskQueueID.namespaceID) - ctx = headers.SetCallerInfo(ctx, headers.NewBackgroundCallerInfo(namespace.String())) + return headers.SetCallerInfo(ctx, headers.NewBackgroundCallerInfo(namespace.String())) +} - return ctx, cancel +func (c *taskQueueManagerImpl) newIOContext() (context.Context, context.CancelFunc) { + ctx, cancel := context.WithTimeout(context.Background(), ioTimeout) + return c.callerInfoContext(ctx), cancel } -func (c *taskQueueManagerImpl) fetchUserDataFromRootPartitionOnInit(ctx context.Context) { - if c.userDataInitialFetch.Ready() { - return +func (c *taskQueueManagerImpl) userDataFetchSource() (string, error) { + degree := c.config.ForwarderMaxChildrenPerNode() + parent, err := c.taskQueueID.Parent(degree) + if err == tqname.ErrNoParent { + // we're the root activity task queue, ask the root workflow task queue + return c.taskQueueID.FullName(), nil + } else if err != nil { + // invalid degree + return "", err } - _, err := c.fetchUserDataFromRootPartition(ctx) - c.userDataInitialFetch.Set(struct{}{}, err) + return parent.FullName(), nil } -// fetchUserDataFromRootPartition fetches user data from root partition iff this partition is not a root partition. -// Returns the fetched data, if fetching was necessary and successful. -func (c *taskQueueManagerImpl) fetchUserDataFromRootPartition(ctx context.Context) (*persistencespb.VersionedTaskQueueUserData, error) { - // Nothing to do if we are the root partition of a workflow queue, since we should own the data. - // (for versioning - any later added metadata may need to not abort so early) - if c.taskQueueID.OwnsUserData() { - return nil, nil - } +func (c *taskQueueManagerImpl) fetchUserDataLoop(ctx context.Context) error { + ctx = c.callerInfoContext(ctx) - knownUserData, err := c.db.GetUserData(ctx) - if err != nil && !errors.Is(err, errUserDataNotPresentOnPartition) { - return nil, err + // root workflow partition reads data from db + if c.taskQueueID.OwnsUserData() { + return nil } - rootTqName := c.taskQueueID.Root().FullName() - res, err := c.matchingClient.GetTaskQueueUserData(ctx, &matchingservice.GetTaskQueueUserDataRequest{ - NamespaceId: c.taskQueueID.namespaceID.String(), - TaskQueue: rootTqName, - LastKnownUserDataVersion: knownUserData.GetVersion(), - }) - // If the root partition returns nil here, then that means our data matched, and we don't need to update. - // If it's nil because it never existed, then we'd never have any data. - // It can't be nil due to removing versions, as that would result in a non-nil container with - // nil inner fields. - if res.GetUserData() != nil { - c.db.setUserDataForNonRootPartition(res.GetUserData()) - } - // We want to start the poller as long as the root partition has any kind of data (or fetching hasn't worked) - if res.GetUserData() != nil || err != nil { - c.metadataPoller.StartIfUnstarted() - } + fetchSource, err := c.userDataFetchSource() if err != nil { - return nil, err + return err } - return res.GetUserData(), nil -} -// StartIfUnstarted starts the poller if it's not already started. The passed in function is called repeatedly -// and if it returns true, the poller will shut down, at which point it may be started again. -func (mp *metadataPoller) StartIfUnstarted() { - if mp.running.Load() { - return + firstCall := true + + op := func(ctx context.Context) error { + knownUserData, _, err := c.db.GetUserData(ctx) + if err != nil && !errors.Is(err, errUserDataNotPresentOnPartition) { + return err + } + + callCtx, cancel := context.WithTimeout(ctx, c.config.GetUserDataLongPollTimeout()) + defer cancel() + + res, err := c.matchingClient.GetTaskQueueUserData(callCtx, &matchingservice.GetTaskQueueUserDataRequest{ + NamespaceId: c.taskQueueID.namespaceID.String(), + TaskQueue: fetchSource, + LastKnownUserDataVersion: knownUserData.GetVersion(), + WaitNewData: !firstCall, + }) + if err != nil { + return err + } + // If the root partition returns nil here, then that means our data matched, and we don't need to update. + // If it's nil because it never existed, then we'd never have any data. + // It can't be nil due to removing versions, as that would result in a non-nil container with + // nil inner fields. + if res.GetUserData() != nil { + c.db.setUserDataForNonOwningPartition(res.GetUserData()) + } + if firstCall { + c.userDataInitialFetch.Set(struct{}{}, err) + firstCall = false + } + return nil } - go mp.pollLoop() -} -func (mp *metadataPoller) pollLoop() { - mp.running.Store(true) - defer mp.running.Store(false) - ticker := time.NewTicker(mp.pollIntervalCfgFn()) - defer ticker.Stop() + minWaitTime := c.config.GetUserDataMinWaitTime - for { - select { - case <-mp.stopChan: - return - case <-ticker.C: - // In case the interval has changed - ticker.Reset(mp.pollIntervalCfgFn()) - data, err := mp.tqMgr.fetchUserDataFromRootPartition(context.TODO()) - if data == nil && err == nil { - // Can stop polling since there is no versioning data. Loop will be restarted if we - // are told to invalidate the data, or we attempt to fetch it via GetVersioningData. - return + for ctx.Err() == nil { + start := time.Now() + _ = backoff.ThrottleRetryContext(ctx, op, getUserDataRetryPolicy, nil) + elapsed := time.Since(start) + + // In general we want to start a new call immediately on completion of the previous + // one. But if the remote is broken and returns success immediately, we might end up + // spinning. So enforce a minimum wait time that increases as long as we keep getting + // very fast replies. + if elapsed < minWaitTime { + select { + case <-ctx.Done(): + case <-time.After(minWaitTime - elapsed): } + // Don't let this get near our call timeout, otherwise we can't tell the difference + // between a fast reply and a timeout. + minWaitTime = util.Min(minWaitTime*2, c.config.GetUserDataLongPollTimeout()/2) + } else { + minWaitTime = c.config.GetUserDataMinWaitTime } } -} -func (mp *metadataPoller) Stop() { - close(mp.stopChan) + return ctx.Err() } diff --git a/service/matching/taskQueueManager_test.go b/service/matching/taskQueueManager_test.go index 9b7a2d2e80e..4c0cbbedc47 100644 --- a/service/matching/taskQueueManager_test.go +++ b/service/matching/taskQueueManager_test.go @@ -27,7 +27,6 @@ package matching import ( "context" "errors" - "fmt" "math" "sync/atomic" "testing" @@ -38,12 +37,14 @@ import ( "github.com/stretchr/testify/require" commonpb "go.temporal.io/api/common/v1" enumspb "go.temporal.io/api/enums/v1" + "go.temporal.io/api/serviceerror" enumsspb "go.temporal.io/server/api/enums/v1" "go.temporal.io/server/api/matchingservice/v1" "go.temporal.io/server/api/matchingservicemock/v1" persistencespb "go.temporal.io/server/api/persistence/v1" "go.temporal.io/server/common" + "go.temporal.io/server/common/backoff" "go.temporal.io/server/common/cluster" "go.temporal.io/server/common/dynamicconfig" "go.temporal.io/server/common/log" @@ -55,8 +56,10 @@ import ( var rpsInf = math.Inf(1) -const defaultNamespaceId = namespace.ID("deadbeef-0000-4567-890a-bcdef0123456") -const defaultRootTqID = "tq" +const ( + defaultNamespaceId = namespace.ID("deadbeef-0000-4567-890a-bcdef0123456") + defaultRootTqID = "tq" +) type tqmTestOpts struct { config *Config @@ -64,6 +67,12 @@ type tqmTestOpts struct { matchingClientMock *matchingservicemock.MockMatchingServiceClient } +func setScoped[T any](ptr *T, val T) func() { + prev := *ptr + *ptr = val + return func() { *ptr = prev } +} + func defaultTqmTestOpts(controller *gomock.Controller) *tqmTestOpts { return &tqmTestOpts{ config: defaultTestConfig(), @@ -490,333 +499,266 @@ func TestAddTaskStandby(t *testing.T) { require.False(t, syncMatch) } -func TestTaskQueuePartitionFetchesUserDataFromRootPartitionOnInit(t *testing.T) { +func TestTQMLoadsUserDataFromPersistenceOnInit(t *testing.T) { controller := gomock.NewController(t) defer controller.Finish() ctx := context.Background() - subTqId, err := newTaskQueueIDWithPartition(defaultNamespaceId, defaultRootTqID, enumspb.TASK_QUEUE_TYPE_WORKFLOW, 1) + tqId, err := newTaskQueueIDWithPartition(defaultNamespaceId, defaultRootTqID, enumspb.TASK_QUEUE_TYPE_WORKFLOW, 0) require.NoError(t, err) tqCfg := defaultTqmTestOpts(controller) - tqCfg.tqId = subTqId + tqCfg.tqId = tqId - data := &persistencespb.VersionedTaskQueueUserData{ + data1 := &persistencespb.VersionedTaskQueueUserData{ Version: 1, Data: mkUserData(1), } - asResp := &matchingservice.GetTaskQueueUserDataResponse{ - TaskQueueHasUserData: true, - UserData: data, - } - subTq := mustCreateTestTaskQueueManagerWithConfig(t, controller, tqCfg, - func(tqm *taskQueueManagerImpl) { - mockMatchingClient := matchingservicemock.NewMockMatchingServiceClient(controller) - mockMatchingClient.EXPECT().GetTaskQueueUserData(gomock.Any(), - gomock.Eq(&matchingservice.GetTaskQueueUserDataRequest{ - NamespaceId: defaultNamespaceId.String(), - TaskQueue: defaultRootTqID, - LastKnownUserDataVersion: 0, - })). - Return(asResp, nil) - tqm.matchingClient = mockMatchingClient + tq := mustCreateTestTaskQueueManagerWithConfig(t, controller, tqCfg) + + tq.engine.taskManager.UpdateTaskQueueUserData(context.Background(), + &persistence.UpdateTaskQueueUserDataRequest{ + NamespaceID: defaultNamespaceId.String(), + TaskQueue: defaultRootTqID, + UserData: data1, }) - subTq.Start() - require.NoError(t, subTq.WaitUntilInitialized(ctx)) - userData, err := subTq.GetUserData(ctx) + data1.Version++ + + tq.Start() + require.NoError(t, tq.WaitUntilInitialized(ctx)) + userData, _, err := tq.GetUserData(ctx) require.NoError(t, err) - require.Equal(t, data, userData) - subTq.Stop() + require.Equal(t, data1, userData) + tq.Stop() } -func TestTaskQueuePartitionSendsLastKnownVersionOfUserDataWhenFetching(t *testing.T) { +func TestTQMFetchesUserDataFromOnInit(t *testing.T) { controller := gomock.NewController(t) defer controller.Finish() ctx := context.Background() - subTqId, err := newTaskQueueIDWithPartition(defaultNamespaceId, defaultRootTqID, enumspb.TASK_QUEUE_TYPE_WORKFLOW, 1) + tqId, err := newTaskQueueIDWithPartition(defaultNamespaceId, defaultRootTqID, enumspb.TASK_QUEUE_TYPE_WORKFLOW, 1) require.NoError(t, err) tqCfg := defaultTqmTestOpts(controller) - tqCfg.tqId = subTqId + tqCfg.tqId = tqId - data := &persistencespb.VersionedTaskQueueUserData{ - Version: 2, + data1 := &persistencespb.VersionedTaskQueueUserData{ + Version: 1, Data: mkUserData(1), } - asResp := &matchingservice.GetTaskQueueUserDataResponse{ - TaskQueueHasUserData: true, - UserData: data, - } - subTq := mustCreateTestTaskQueueManagerWithConfig(t, controller, tqCfg, - func(tqm *taskQueueManagerImpl) { - mockMatchingClient := matchingservicemock.NewMockMatchingServiceClient(controller) - mockMatchingClient.EXPECT().GetTaskQueueUserData(gomock.Any(), - gomock.Eq(&matchingservice.GetTaskQueueUserDataRequest{ - NamespaceId: defaultNamespaceId.String(), - TaskQueue: defaultRootTqID, - LastKnownUserDataVersion: 0, - })). - Return(asResp, nil) - tqm.matchingClient = mockMatchingClient - }) - // Don't start it. Just explicitly call fetching function. - res, err := subTq.fetchUserDataFromRootPartition(ctx) - require.NotNil(t, res) + tqCfg.matchingClientMock.EXPECT().GetTaskQueueUserData( + gomock.Any(), + &matchingservice.GetTaskQueueUserDataRequest{ + NamespaceId: defaultNamespaceId.String(), + TaskQueue: defaultRootTqID, + LastKnownUserDataVersion: 0, + WaitNewData: false, // first fetch is not long poll + }). + Return(&matchingservice.GetTaskQueueUserDataResponse{ + TaskQueueHasUserData: true, + UserData: data1, + }, nil) + + tq := mustCreateTestTaskQueueManagerWithConfig(t, controller, tqCfg) + tq.config.GetUserDataMinWaitTime = 10 * time.Second // only one fetch + tq.Start() + require.NoError(t, tq.WaitUntilInitialized(ctx)) + userData, _, err := tq.GetUserData(ctx) require.NoError(t, err) - assert.Equal(t, data, subTq.db.userData) -} - -type invalidateMatcher struct { - matchesTaskQType enumspb.TaskQueueType -} - -func (m invalidateMatcher) Matches(x interface{}) bool { - v, ok := x.(*matchingservice.InvalidateTaskQueueUserDataRequest) - return ok && v.GetTaskQueueType() == m.matchesTaskQType -} -func (m invalidateMatcher) String() string { - return fmt.Sprintf("%#v", m) -} - -func TestTaskQueueRootPartitionNotifiesChildrenOfInvalidation(t *testing.T) { - controller := gomock.NewController(t) - defer controller.Finish() - ctx := context.Background() - - rootTq := mustCreateTestTaskQueueManagerWithConfig(t, controller, defaultTqmTestOpts(controller), - func(tqm *taskQueueManagerImpl) { - mockMatchingClient := matchingservicemock.NewMockMatchingServiceClient(controller) - mockMatchingClient.EXPECT().InvalidateTaskQueueUserData( - gomock.Any(), invalidateMatcher{matchesTaskQType: enumspb.TASK_QUEUE_TYPE_WORKFLOW}). - Return(&matchingservice.InvalidateTaskQueueUserDataResponse{}, nil). - Times(tqm.config.NumReadPartitions() - 1) - mockMatchingClient.EXPECT().InvalidateTaskQueueUserData( - gomock.Any(), invalidateMatcher{matchesTaskQType: enumspb.TASK_QUEUE_TYPE_ACTIVITY}). - Return(&matchingservice.InvalidateTaskQueueUserDataResponse{}, nil). - // Not minus 1 here because root activity partition gets invalidated - Times(tqm.config.NumReadPartitions()) - tqm.matchingClient = mockMatchingClient - }) - - rootTq.Start() - require.NoError(t, rootTq.WaitUntilInitialized(ctx)) - // Make a change, mock verifies children are invalidated - require.NoError(t, rootTq.UpdateUserData(ctx, false, func(vd *persistencespb.TaskQueueUserData) (*persistencespb.TaskQueueUserData, error) { - return mkUserData(1), nil - })) - rootTq.Stop() + require.Equal(t, data1, userData) + tq.Stop() } -func TestTaskQueueSubPartitionPollsPeriodically(t *testing.T) { +func TestTQMFetchesUserDataAndFetchesAgain(t *testing.T) { controller := gomock.NewController(t) defer controller.Finish() ctx := context.Background() - subTqId, err := newTaskQueueIDWithPartition(defaultNamespaceId, defaultRootTqID, enumspb.TASK_QUEUE_TYPE_WORKFLOW, 1) + // note: using activity here + tqId, err := newTaskQueueIDWithPartition(defaultNamespaceId, defaultRootTqID, enumspb.TASK_QUEUE_TYPE_ACTIVITY, 1) require.NoError(t, err) tqCfg := defaultTqmTestOpts(controller) - tqCfg.tqId = subTqId - tqCfg.config.UserDataPollFrequency = func() time.Duration { - return time.Millisecond * 10 - } + tqCfg.tqId = tqId - asResp := &matchingservice.GetTaskQueueUserDataResponse{ - TaskQueueHasUserData: true, - UserData: &persistencespb.VersionedTaskQueueUserData{ - Version: 1, - Data: mkUserData(1), - }, + data1 := &persistencespb.VersionedTaskQueueUserData{ + Version: 1, + Data: mkUserData(1), + } + data2 := &persistencespb.VersionedTaskQueueUserData{ + Version: 2, + Data: mkUserData(2), } - subTq := mustCreateTestTaskQueueManagerWithConfig(t, controller, tqCfg, - func(tqm *taskQueueManagerImpl) { - mockMatchingClient := matchingservicemock.NewMockMatchingServiceClient(controller) - mockMatchingClient.EXPECT().GetTaskQueueUserData(gomock.Any(), gomock.Any()). - Return(asResp, nil).MinTimes(3) - tqm.matchingClient = mockMatchingClient - }) - res, err := subTq.fetchUserDataFromRootPartition(ctx) - require.NotNil(t, res) + tqCfg.matchingClientMock.EXPECT().GetTaskQueueUserData( + gomock.Any(), + &matchingservice.GetTaskQueueUserDataRequest{ + NamespaceId: defaultNamespaceId.String(), + TaskQueue: defaultRootTqID, + LastKnownUserDataVersion: 0, + WaitNewData: false, // first is not long poll + }). + Return(&matchingservice.GetTaskQueueUserDataResponse{ + TaskQueueHasUserData: true, + UserData: data1, + }, nil) + + tqCfg.matchingClientMock.EXPECT().GetTaskQueueUserData( + gomock.Any(), + &matchingservice.GetTaskQueueUserDataRequest{ + NamespaceId: defaultNamespaceId.String(), + TaskQueue: defaultRootTqID, + LastKnownUserDataVersion: 1, + WaitNewData: true, // second is long poll + }). + Return(&matchingservice.GetTaskQueueUserDataResponse{ + TaskQueueHasUserData: true, + UserData: data2, + }, nil) + + tqCfg.matchingClientMock.EXPECT().GetTaskQueueUserData( + gomock.Any(), + &matchingservice.GetTaskQueueUserDataRequest{ + NamespaceId: defaultNamespaceId.String(), + TaskQueue: defaultRootTqID, + LastKnownUserDataVersion: 2, + WaitNewData: true, + }). + Return(nil, serviceerror.NewUnavailable("hold on")).AnyTimes() + + tq := mustCreateTestTaskQueueManagerWithConfig(t, controller, tqCfg) + tq.config.GetUserDataMinWaitTime = 10 * time.Millisecond // fetch again quickly + tq.Start() + time.Sleep(100 * time.Millisecond) + require.NoError(t, tq.WaitUntilInitialized(ctx)) + userData, _, err := tq.GetUserData(ctx) require.NoError(t, err) - // Wait a bit to make sure we poll a few times - time.Sleep(time.Millisecond * 25) - subTq.Stop() + require.Equal(t, data2, userData) + tq.Stop() } -func TestTaskQueueSubPartitionDoesNotPollIfNoDataThenPollsWhenInvalidated(t *testing.T) { +func TestTQMFetchesUserDataFailsAndTriesAgain(t *testing.T) { controller := gomock.NewController(t) defer controller.Finish() ctx := context.Background() - subTqId, err := newTaskQueueIDWithPartition(defaultNamespaceId, defaultRootTqID, enumspb.TASK_QUEUE_TYPE_WORKFLOW, 1) + tqId, err := newTaskQueueIDWithPartition(defaultNamespaceId, defaultRootTqID, enumspb.TASK_QUEUE_TYPE_WORKFLOW, 1) require.NoError(t, err) tqCfg := defaultTqmTestOpts(controller) - tqCfg.tqId = subTqId - tqCfg.config.UserDataPollFrequency = func() time.Duration { - return time.Millisecond * 10 - } + tqCfg.tqId = tqId - nilDatResp := &matchingservice.GetTaskQueueUserDataResponse{ - TaskQueueHasUserData: false, - } - userData := mkUserData(1) - verionedUserData := &persistencespb.VersionedTaskQueueUserData{ + // fast retry on failure + defer setScoped(&getUserDataRetryPolicy, backoff.NewExponentialRetryPolicy(10*time.Millisecond))() + + data1 := &persistencespb.VersionedTaskQueueUserData{ Version: 1, - Data: userData, - } - hasDatResp := &matchingservice.GetTaskQueueUserDataResponse{ - TaskQueueHasUserData: true, - UserData: verionedUserData, + Data: mkUserData(1), } - subTq := mustCreateTestTaskQueueManagerWithConfig(t, controller, tqCfg, - func(tqm *taskQueueManagerImpl) { - mockMatchingClient := matchingservicemock.NewMockMatchingServiceClient(controller) - mockMatchingClient.EXPECT().GetTaskQueueUserData(gomock.Any(), gomock.Any()). - Return(nilDatResp, nil).Times(2) - mockMatchingClient.EXPECT().GetTaskQueueUserData(gomock.Any(), gomock.Any()). - Return(hasDatResp, nil).MinTimes(1) - tqm.matchingClient = mockMatchingClient - }) - res, err := subTq.fetchUserDataFromRootPartition(ctx) - require.Nil(t, res) - require.NoError(t, err) - // Wait a bit to make sure we *don't* end up polling (if we do, mock will fail with >2 fetches) - time.Sleep(time.Millisecond * 25) - // Explicitly try to get versioning data. Since we don't have any cached, it'll explicitly fetch. - existingData, err := subTq.GetUserData(ctx) - require.NoError(t, err) - require.Nil(t, existingData) - // Now invalidate, the poll loop should be started, so we'll see at least one more mock call - err = subTq.InvalidateUserData(&matchingservice.InvalidateTaskQueueUserDataRequest{ - UserData: verionedUserData, - }) + tqCfg.matchingClientMock.EXPECT().GetTaskQueueUserData( + gomock.Any(), + &matchingservice.GetTaskQueueUserDataRequest{ + NamespaceId: defaultNamespaceId.String(), + TaskQueue: defaultRootTqID, + LastKnownUserDataVersion: 0, + WaitNewData: false, + }). + Return(nil, serviceerror.NewUnavailable("wait a sec")).Times(3) + + tqCfg.matchingClientMock.EXPECT().GetTaskQueueUserData( + gomock.Any(), + &matchingservice.GetTaskQueueUserDataRequest{ + NamespaceId: defaultNamespaceId.String(), + TaskQueue: defaultRootTqID, + LastKnownUserDataVersion: 0, + WaitNewData: false, + }). + Return(&matchingservice.GetTaskQueueUserDataResponse{ + TaskQueueHasUserData: true, + UserData: data1, + }, nil) + + tq := mustCreateTestTaskQueueManagerWithConfig(t, controller, tqCfg) + tq.config.GetUserDataMinWaitTime = 10 * time.Second // wait on success + tq.Start() + time.Sleep(100 * time.Millisecond) + require.NoError(t, tq.WaitUntilInitialized(ctx)) + userData, _, err := tq.GetUserData(ctx) require.NoError(t, err) - time.Sleep(time.Millisecond * 20) + require.Equal(t, data1, userData) + tq.Stop() } -func TestTaskQueueManagerWaitInitFailThenPass(t *testing.T) { +func TestTQMFetchesUserDataUpTree(t *testing.T) { controller := gomock.NewController(t) + defer controller.Finish() ctx := context.Background() - - subTqId, err := newTaskQueueIDWithPartition(defaultNamespaceId, defaultRootTqID, enumspb.TASK_QUEUE_TYPE_WORKFLOW, 1) + tqId, err := newTaskQueueIDWithPartition(defaultNamespaceId, defaultRootTqID, enumspb.TASK_QUEUE_TYPE_WORKFLOW, 31) require.NoError(t, err) tqCfg := defaultTqmTestOpts(controller) - tqCfg.tqId = subTqId - tqCfg.config.UserDataPollFrequency = func() time.Duration { - return time.Millisecond * 10 - } + tqCfg.config.ForwarderMaxChildrenPerNode = dynamicconfig.GetIntPropertyFilteredByTaskQueueInfo(3) + tqCfg.tqId = tqId - data := mkUserData(1) - versionedData := &persistencespb.VersionedTaskQueueUserData{ + data1 := &persistencespb.VersionedTaskQueueUserData{ Version: 1, - Data: data, - } - asResp := &matchingservice.GetTaskQueueUserDataResponse{ - TaskQueueHasUserData: true, - UserData: versionedData, + Data: mkUserData(1), } - mockMatchingClient := matchingservicemock.NewMockMatchingServiceClient(controller) - tq := mustCreateTestTaskQueueManagerWithConfig(t, controller, tqCfg, - func(tqm *taskQueueManagerImpl) { - mockMatchingClient.EXPECT().GetTaskQueueUserData(gomock.Any(), gomock.Any()). - Return(nil, errors.New("some error")).Times(1) - mockMatchingClient.EXPECT().GetTaskQueueUserData(gomock.Any(), gomock.Any()). - Return(asResp, nil).Times(1) - tqm.matchingClient = mockMatchingClient - }) - + tqCfg.matchingClientMock.EXPECT().GetTaskQueueUserData( + gomock.Any(), + &matchingservice.GetTaskQueueUserDataRequest{ + NamespaceId: defaultNamespaceId.String(), + TaskQueue: tqId.Name.WithPartition(10).FullName(), + LastKnownUserDataVersion: 0, + WaitNewData: false, + }). + Return(&matchingservice.GetTaskQueueUserDataResponse{ + TaskQueueHasUserData: true, + UserData: data1, + }, nil) + + tq := mustCreateTestTaskQueueManagerWithConfig(t, controller, tqCfg) + tq.config.GetUserDataMinWaitTime = 10 * time.Second // wait on success tq.Start() - // This does not error even if initial user data fetch fails (and it does, here) require.NoError(t, tq.WaitUntilInitialized(ctx)) - // Wait long enough for poller retry to happen - time.Sleep(time.Millisecond * 15) - // Need to make sure both calls have happened *before* calling to get data, as it would make a call if the second - // call hasn't happened yet. - controller.Finish() - // Get the data and see it's set - newData, err := tq.GetUserData(ctx) + userData, _, err := tq.GetUserData(ctx) require.NoError(t, err) - require.Equal(t, versionedData, newData) + require.Equal(t, data1, userData) tq.Stop() } -func TestFetchingUserDataErrorsIfNeverFetchedFromRootSuccessfully(t *testing.T) { +func TestTQMFetchesUserDataActivityToWorkflow(t *testing.T) { controller := gomock.NewController(t) defer controller.Finish() ctx := context.Background() - subTqId, err := newTaskQueueIDWithPartition(defaultNamespaceId, defaultRootTqID, enumspb.TASK_QUEUE_TYPE_WORKFLOW, 1) + // note: activity root + tqId, err := newTaskQueueIDWithPartition(defaultNamespaceId, defaultRootTqID, enumspb.TASK_QUEUE_TYPE_ACTIVITY, 0) require.NoError(t, err) tqCfg := defaultTqmTestOpts(controller) - tqCfg.tqId = subTqId - tqCfg.config.UserDataPollFrequency = func() time.Duration { - return time.Millisecond * 10 - } + tqCfg.tqId = tqId - subTq := mustCreateTestTaskQueueManagerWithConfig(t, controller, tqCfg, - func(tqm *taskQueueManagerImpl) { - mockMatchingClient := matchingservicemock.NewMockMatchingServiceClient(controller) - mockMatchingClient.EXPECT().GetTaskQueueUserData(gomock.Any(), gomock.Any()). - Return(nil, errors.New("fetching broken!")).AnyTimes() - tqm.matchingClient = mockMatchingClient - }) - subTq.Start() - require.NoError(t, subTq.WaitUntilInitialized(ctx)) - for i := 0; i < 10; i++ { - _, err := subTq.GetUserData(ctx) - require.Error(t, err) - time.Sleep(time.Millisecond * 2) - } -} - -func TestActivityQueueGetsUserDataFromWorkflowQueue(t *testing.T) { - controller := gomock.NewController(t) - defer controller.Finish() - ctx := context.Background() - - data := mkUserData(1) - versionedData := &persistencespb.VersionedTaskQueueUserData{ + data1 := &persistencespb.VersionedTaskQueueUserData{ Version: 1, - Data: data, - } - asResp := &matchingservice.GetTaskQueueUserDataResponse{ - TaskQueueHasUserData: true, - UserData: versionedData, + Data: mkUserData(1), } - tqCfg := defaultTqmTestOpts(controller) - tqCfg.tqId.taskType = enumspb.TASK_QUEUE_TYPE_ACTIVITY - actTq := mustCreateTestTaskQueueManagerWithConfig(t, controller, tqCfg, - func(tqm *taskQueueManagerImpl) { - mockMatchingClient := matchingservicemock.NewMockMatchingServiceClient(controller) - mockMatchingClient.EXPECT().GetTaskQueueUserData(gomock.Any(), gomock.Any()). - Return(asResp, nil).Times(1) - tqm.matchingClient = mockMatchingClient - }) - actTq.Start() - require.NoError(t, actTq.WaitUntilInitialized(ctx)) - - subTqId, err := newTaskQueueIDWithPartition(defaultNamespaceId, defaultRootTqID, enumspb.TASK_QUEUE_TYPE_ACTIVITY, 1) - require.NoError(t, err) - tqCfg = defaultTqmTestOpts(controller) - tqCfg.tqId = subTqId - actTqPart := mustCreateTestTaskQueueManagerWithConfig(t, controller, tqCfg, - func(tqm *taskQueueManagerImpl) { - mockMatchingClient := matchingservicemock.NewMockMatchingServiceClient(controller) - mockMatchingClient.EXPECT().GetTaskQueueUserData(gomock.Any(), gomock.Any()). - Return(asResp, nil).Times(1) - tqm.matchingClient = mockMatchingClient - }) - actTqPart.Start() - require.NoError(t, actTqPart.WaitUntilInitialized(ctx)) - - actTqData, err := actTq.GetUserData(ctx) - require.NoError(t, err) - require.Equal(t, versionedData, actTqData) - actTqData, err = actTqPart.GetUserData(ctx) + tqCfg.matchingClientMock.EXPECT().GetTaskQueueUserData( + gomock.Any(), + &matchingservice.GetTaskQueueUserDataRequest{ + NamespaceId: defaultNamespaceId.String(), + TaskQueue: defaultRootTqID, + LastKnownUserDataVersion: 0, + WaitNewData: false, + }). + Return(&matchingservice.GetTaskQueueUserDataResponse{ + TaskQueueHasUserData: true, + UserData: data1, + }, nil) + + tq := mustCreateTestTaskQueueManagerWithConfig(t, controller, tqCfg) + tq.config.GetUserDataMinWaitTime = 10 * time.Second // wait on success + tq.Start() + require.NoError(t, tq.WaitUntilInitialized(ctx)) + userData, _, err := tq.GetUserData(ctx) require.NoError(t, err) - require.Equal(t, versionedData, actTqData) - - actTq.Stop() - actTqPart.Stop() + require.Equal(t, data1, userData) + tq.Stop() } func TestUpdateOnNonRootFails(t *testing.T) { diff --git a/service/matching/taskReader.go b/service/matching/taskReader.go index e1221351377..ea1dd75937f 100644 --- a/service/matching/taskReader.go +++ b/service/matching/taskReader.go @@ -34,7 +34,6 @@ import ( persistencespb "go.temporal.io/server/api/persistence/v1" "go.temporal.io/server/common" "go.temporal.io/server/common/backoff" - "go.temporal.io/server/common/headers" "go.temporal.io/server/common/log" "go.temporal.io/server/common/log/tag" "go.temporal.io/server/common/metrics" @@ -113,7 +112,7 @@ func (tr *taskReader) Signal() { } func (tr *taskReader) dispatchBufferedTasks(ctx context.Context) error { - ctx = tr.initContext(ctx) + ctx = tr.tlMgr.callerInfoContext(ctx) dispatchLoop: for { @@ -154,7 +153,7 @@ dispatchLoop: } func (tr *taskReader) getTasksPump(ctx context.Context) error { - ctx = tr.initContext(ctx) + ctx = tr.tlMgr.callerInfoContext(ctx) if err := tr.tlMgr.WaitUntilInitialized(ctx); err != nil { return err @@ -312,12 +311,6 @@ func (tr *taskReader) emitTaskLagMetric(ackLevel int64) { tr.taggedMetricsHandler().Gauge(metrics.TaskLagPerTaskQueueGauge.GetMetricName()).Record(float64(maxReadLevel - ackLevel)) } -func (tr *taskReader) initContext(ctx context.Context) context.Context { - namespace, _ := tr.tlMgr.namespaceRegistry.GetNamespaceName(tr.tlMgr.taskQueueID.namespaceID) - - return headers.SetCallerInfo(ctx, headers.NewBackgroundCallerInfo(namespace.String())) -} - func (tr *taskReader) backoff(duration time.Duration) { tr.backoffTimerLock.Lock() defer tr.backoffTimerLock.Unlock() diff --git a/service/matching/taskWriter.go b/service/matching/taskWriter.go index 37bc857d7ef..4da3666c636 100644 --- a/service/matching/taskWriter.go +++ b/service/matching/taskWriter.go @@ -37,7 +37,6 @@ import ( persistencespb "go.temporal.io/server/api/persistence/v1" "go.temporal.io/server/common" "go.temporal.io/server/common/backoff" - "go.temporal.io/server/common/headers" "go.temporal.io/server/common/log" "go.temporal.io/server/common/log/tag" "go.temporal.io/server/common/metrics" @@ -107,7 +106,7 @@ func (w *taskWriter) Start() { return } - w.writeLoop = goro.NewHandle(w.initContext()) + w.writeLoop = goro.NewHandle(w.tlMgr.callerInfoContext(context.Background())) w.writeLoop.Go(w.taskWriterLoop) } @@ -220,6 +219,9 @@ func (w *taskWriter) appendTasks( func (w *taskWriter) taskWriterLoop(ctx context.Context) error { err := w.initReadWriteState(ctx) w.tlMgr.initializedError.Set(struct{}{}, err) + if w.taskQueueID.OwnsUserData() { + w.tlMgr.userDataInitialFetch.Set(struct{}{}, err) + } if err != nil { // We can't recover from here without starting over, so unload the whole task queue w.tlMgr.unloadFromEngine() @@ -326,9 +328,3 @@ func (w *taskWriter) allocTaskIDBlock(ctx context.Context, prevBlockEnd int64) ( } return rangeIDToTaskIDBlock(state.rangeID, w.config.RangeSize), nil } - -func (w *taskWriter) initContext() context.Context { - namespace, _ := w.tlMgr.namespaceRegistry.GetNamespaceName(w.tlMgr.taskQueueID.namespaceID) - - return headers.SetCallerInfo(context.Background(), headers.NewBackgroundCallerInfo(namespace.String())) -} diff --git a/service/matching/taskqueue.go b/service/matching/taskqueue.go index 6595d3b3ec8..79b9f2c80e5 100644 --- a/service/matching/taskqueue.go +++ b/service/matching/taskqueue.go @@ -25,7 +25,7 @@ package matching import ( - "bytes" + "fmt" enumspb "go.temporal.io/api/enums/v1" @@ -77,16 +77,11 @@ func (tid *taskQueueID) OwnsUserData() bool { } func (tid *taskQueueID) String() string { - var b bytes.Buffer - b.WriteString("[") - b.WriteString("name=") - b.WriteString(tid.FullName()) - b.WriteString("type=") - if tid.taskType == enumspb.TASK_QUEUE_TYPE_ACTIVITY { - b.WriteString("activity") - } else { - b.WriteString("workflow") - } - b.WriteString("]") - return b.String() + return fmt.Sprintf("TaskQueue(name:%q part:%d vset:%s type:%s nsid:%.5s…)", + tid.BaseNameString(), + tid.Partition(), + tid.VersionSet(), + tid.taskType, + tid.namespaceID.String(), + ) } diff --git a/tests/versioning_test.go b/tests/versioning_test.go index 5cf81229803..7c5a2978cc9 100644 --- a/tests/versioning_test.go +++ b/tests/versioning_test.go @@ -50,10 +50,15 @@ type versioningIntegSuite struct { sdkClient sdkclient.Client } +const ( + partitionTreeDegree = 3 +) + func (s *versioningIntegSuite) SetupSuite() { s.dynamicConfigOverrides = make(map[dynamicconfig.Key]interface{}) s.dynamicConfigOverrides[dynamicconfig.MatchingMaxTaskQueueIdleTime] = 5 * time.Second s.dynamicConfigOverrides[dynamicconfig.FrontendEnableWorkerVersioningDataAPIs] = true + s.dynamicConfigOverrides[dynamicconfig.MatchingForwarderMaxChildrenPerNode] = partitionTreeDegree s.setupSuite("testdata/integration_test_cluster.yaml") } @@ -198,70 +203,42 @@ func (s *versioningIntegSuite) TestVersioningStateNotDestroyedByOtherUpdates() { s.Equal("foo", getCurrentDefault(res2)) } -func (s *versioningIntegSuite) TestVersioningChangesPropagatedToSubPartitions() { +func (s *versioningIntegSuite) TestVersioningChangesPropagate() { ctx := NewContext() - tq := "integration-versioning-sub-partitions" - - res, err := s.engine.UpdateWorkerBuildIdCompatibility(ctx, &workflowservice.UpdateWorkerBuildIdCompatibilityRequest{ - Namespace: s.namespace, - TaskQueue: tq, - Operation: &workflowservice.UpdateWorkerBuildIdCompatibilityRequest_AddNewBuildIdInNewDefaultSet{ - AddNewBuildIdInNewDefaultSet: "foo", - }, - }) - s.NoError(err) - s.NotNil(res) - - res2, err := s.engine.GetWorkerBuildIdCompatibility(ctx, &workflowservice.GetWorkerBuildIdCompatibilityRequest{ - Namespace: s.namespace, - TaskQueue: tq, - }) - s.NoError(err) - s.NotNil(res2) - s.Equal("foo", getCurrentDefault(res2)) + tq := "integration-versioning-propagate" - // Verify partitions have data - dcCol := dynamicconfig.NewCollection(s.testCluster.GetHost().dcClient, s.Logger) - partCount := dcCol.GetTaskQueuePartitionsProperty(dynamicconfig.MatchingNumTaskqueueReadPartitions)(s.namespace, tq, 0) - if partCount <= 1 { - s.T().Skip("This test makes no sense unless there are >1 partitions") - } + // ensure at least two hops + partCount := 1 + partitionTreeDegree + partitionTreeDegree*partitionTreeDegree - for i := 1; i < partCount; i++ { - subPartName, err := tqname.FromBaseName(tq) - s.NoError(err) - subPartName = subPartName.WithPartition(i) - res, err := s.engine.GetWorkerBuildIdCompatibility(ctx, &workflowservice.GetWorkerBuildIdCompatibilityRequest{ + for _, buildId := range []string{"foo", "foo-v2"} { + res, err := s.engine.UpdateWorkerBuildIdCompatibility(ctx, &workflowservice.UpdateWorkerBuildIdCompatibilityRequest{ Namespace: s.namespace, - TaskQueue: subPartName.FullName(), + TaskQueue: tq, + Operation: &workflowservice.UpdateWorkerBuildIdCompatibilityRequest_AddNewBuildIdInNewDefaultSet{ + AddNewBuildIdInNewDefaultSet: buildId, + }, }) s.NoError(err) s.NotNil(res) - s.Equal("foo", getCurrentDefault(res2)) - } - - // Make a modification, verify it propagates to partitions - res, err = s.engine.UpdateWorkerBuildIdCompatibility(ctx, &workflowservice.UpdateWorkerBuildIdCompatibilityRequest{ - Namespace: s.namespace, - TaskQueue: tq, - Operation: &workflowservice.UpdateWorkerBuildIdCompatibilityRequest_AddNewBuildIdInNewDefaultSet{ - AddNewBuildIdInNewDefaultSet: "foo-2", - }, - }) - s.NoError(err) - s.NotNil(res) - for i := 1; i < partCount; i++ { - subPartName, err := tqname.FromBaseName(tq) - s.NoError(err) - subPartName = subPartName.WithPartition(i) - res, err := s.engine.GetWorkerBuildIdCompatibility(ctx, &workflowservice.GetWorkerBuildIdCompatibilityRequest{ - Namespace: s.namespace, - TaskQueue: subPartName.FullName(), - }) - s.NoError(err) - s.NotNil(res) - s.Equal("foo-2", getCurrentDefault(res)) + // Verify partitions have data + s.Eventually(func() bool { + for i := 0; i < partCount; i++ { + partName, err := tqname.FromBaseName(tq) + s.NoError(err) + partName = partName.WithPartition(i) + res, err := s.engine.GetWorkerBuildIdCompatibility(ctx, &workflowservice.GetWorkerBuildIdCompatibilityRequest{ + Namespace: s.namespace, + TaskQueue: partName.FullName(), + }) + s.NoError(err) + s.NotNil(res) + if getCurrentDefault(res) != buildId { + return false + } + } + return true + }, 10*time.Second, 100*time.Millisecond) } }