Fix replication for UpdateWorkflowExecutionWithNew (#5531)

## What changed?
<!-- Describe what has changed in this PR -->
- When workflow in the source cluster completes and starts a new run in
the same transaction. Replication should also apply that in one
transaction in standby cluster. Today this only happens when the current
workflow closes with continue as new event, but there are other cases
like cron and retry where workflow can close with
completed/timedout/failed event and also has a new run.

## Why?
<!-- Tell your future self why have you made these changes -->
- Transactional guarantee should be preserved by replication

## How did you test it?
<!-- How have you verified this change? Tested locally? Added a unit
test? Checked in staging env? -->
- New unit tests
- Run canary using global namespace.

## Potential risks
<!-- Assuming the worst case, what can be broken when deploying this
change to production? -->
- Replication task may go to dlq in worst case

## Documentation
<!-- Have you made sure this change doesn't falsify anything currently
stated in `docs/`? If significant
new behavior is added, have you described that in `docs/`? -->
- N/A

## Is hotfix candidate?
<!-- Is this PR a hotfix candidate or does it require a notification to
be sent to the broader community? (Yes/No) -->
- No.
This commit is contained in:
Yichao Yang
2024-03-25 10:47:29 -07:00
committed by GitHub
parent 38817a34c9
commit 00fab090ff
44 changed files with 2622 additions and 2000 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -986,6 +986,7 @@ type HistoryTaskAttributes struct {
// New run events does not need version history since there is no prior events.
NewRunEvents *v11.DataBlob `protobuf:"bytes,7,opt,name=new_run_events,json=newRunEvents,proto3" json:"new_run_events,omitempty"`
BaseExecutionInfo *v16.BaseExecutionInfo `protobuf:"bytes,8,opt,name=base_execution_info,json=baseExecutionInfo,proto3" json:"base_execution_info,omitempty"`
NewRunId string `protobuf:"bytes,9,opt,name=new_run_id,json=newRunId,proto3" json:"new_run_id,omitempty"`
}
func (x *HistoryTaskAttributes) Reset() {
@@ -1069,6 +1070,13 @@ func (x *HistoryTaskAttributes) GetBaseExecutionInfo() *v16.BaseExecutionInfo {
return nil
}
func (x *HistoryTaskAttributes) GetNewRunId() string {
if x != nil {
return x.NewRunId
}
return ""
}
type SyncWorkflowStateTaskAttributes struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -1192,342 +1200,343 @@ var file_temporal_server_api_replication_v1_message_proto_rawDesc = []byte{
0x6f, 0x1a, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65,
0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x65, 0x6e, 0x75, 0x6d, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65,
0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x27,
0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f,
0x61, 0x70, 0x69, 0x2f, 0x65, 0x6e, 0x75, 0x6d, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x61, 0x73, 0x6b,
0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x61,
0x70, 0x69, 0x2f, 0x65, 0x6e, 0x75, 0x6d, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x61, 0x73, 0x6b,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2c, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2f,
0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72,
0x79, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x1a, 0x3f, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2f, 0x73, 0x65, 0x72, 0x76,
0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x63,
0x6f, 0x1a, 0x3f, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65,
0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x63,
0x65, 0x2f, 0x76, 0x31, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x6d, 0x75, 0x74,
0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
0x34, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f,
0x61, 0x70, 0x69, 0x2f, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x63, 0x65, 0x2f, 0x76,
0x31, 0x2f, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x71, 0x75, 0x65, 0x75, 0x65, 0x73, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2f, 0x61, 0x70, 0x69,
0x31, 0x2f, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x71, 0x75, 0x65, 0x75, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x1a, 0x24, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2f, 0x61, 0x70, 0x69,
0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67,
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x27, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c,
0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x2f, 0x76, 0x31,
0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x29,
0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x70, 0x6c,
0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x74,
0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x70, 0x6c,
0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67,
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x25, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c,
0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x6d,
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2d, 0x74, 0x65,
0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69,
0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x73, 0x73,
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2d, 0x74, 0x65, 0x6d,
0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f,
0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x73, 0x73,
0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xea, 0x08, 0x0a, 0x0f, 0x52, 0x65, 0x70,
0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x52, 0x0a, 0x09, 0x74,
0x61, 0x73, 0x6b, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x31, 0x2e,
0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e,
0x61, 0x70, 0x69, 0x2e, 0x65, 0x6e, 0x75, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6c,
0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x61,
0x70, 0x69, 0x2e, 0x65, 0x6e, 0x75, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6c,
0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08,
0x74, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x42, 0x02, 0x68, 0x00, 0x12, 0x28, 0x0a, 0x0e, 0x73,
0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01,
0x28, 0x03, 0x52, 0x0c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x64,
0x42, 0x02, 0x68, 0x00, 0x12, 0x7d, 0x0a, 0x19, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65,
0x5f, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18,
0x28, 0x03, 0x52, 0x0c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x42,
0x02, 0x68, 0x00, 0x12, 0x7d, 0x0a, 0x19, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f,
0x74, 0x61, 0x73, 0x6b, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18,
0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2e,
0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61,
0x63, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x48,
0x00, 0x52, 0x17, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x41,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63,
0x65, 0x54, 0x61, 0x73, 0x6b, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x48, 0x00,
0x52, 0x17, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x41,
0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x42, 0x02, 0x68, 0x00, 0x12, 0x91, 0x01, 0x0a,
0x21, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75,
0x73, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73,
0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x41, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61,
0x6c, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x70, 0x6c,
0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x68,
0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x41, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c,
0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x70, 0x6c, 0x69,
0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x68,
0x61, 0x72, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x54, 0x61, 0x73, 0x6b, 0x41, 0x74, 0x74, 0x72,
0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x48, 0x00, 0x52, 0x1d, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x68, 0x61,
0x72, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x54, 0x61, 0x73, 0x6b, 0x41, 0x74, 0x74, 0x72,
0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x42, 0x02, 0x68, 0x00, 0x12, 0x87, 0x01, 0x0a, 0x1d, 0x73, 0x79,
0x6e, 0x63, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x5f,
0x72, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x54, 0x61, 0x73, 0x6b, 0x41, 0x74, 0x74, 0x72, 0x69,
0x62, 0x75, 0x74, 0x65, 0x73, 0x42, 0x02, 0x68, 0x00, 0x12, 0x87, 0x01, 0x0a, 0x1d, 0x73, 0x79, 0x6e,
0x63, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x5f,
0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x3e, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72,
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x54,
0x61, 0x73, 0x6b, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x48, 0x00, 0x52, 0x1a,
0x73, 0x79, 0x6e, 0x63, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x54, 0x61, 0x73, 0x6b, 0x41,
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x54, 0x61,
0x73, 0x6b, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x48, 0x00, 0x52, 0x1a, 0x73,
0x79, 0x6e, 0x63, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x54, 0x61, 0x73, 0x6b, 0x41,
0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x42, 0x02, 0x68, 0x00, 0x12, 0x77, 0x0a, 0x17,
0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x61, 0x74, 0x74,
0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x74,
0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x61, 0x70,
0x69, 0x2e, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e,
0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x54, 0x61, 0x73, 0x6b, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62,
0x75, 0x74, 0x65, 0x73, 0x48, 0x00, 0x52, 0x15, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x54, 0x61,
0x73, 0x6b, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x42, 0x02, 0x68, 0x00,
0x12, 0x97, 0x01, 0x0a, 0x23, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f,
0x77, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x61, 0x74, 0x74, 0x72,
0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x43, 0x2e, 0x74, 0x65,
0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x61, 0x74, 0x74, 0x72,
0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x74, 0x65,
0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69,
0x2e, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e,
0x53, 0x79, 0x6e, 0x63, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x74, 0x65,
0x54, 0x61, 0x73, 0x6b, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x48, 0x00, 0x52,
0x1f, 0x73, 0x79, 0x6e, 0x63, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x74,
0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x54, 0x61, 0x73, 0x6b, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62,
0x75, 0x74, 0x65, 0x73, 0x48, 0x00, 0x52, 0x15, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x54, 0x61,
0x73, 0x6b, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x42, 0x02, 0x68, 0x00, 0x12,
0x97, 0x01, 0x0a, 0x23, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77,
0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69,
0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x43, 0x2e, 0x74, 0x65,
0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69,
0x2e, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x53,
0x79, 0x6e, 0x63, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x74, 0x65, 0x54,
0x61, 0x73, 0x6b, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x48, 0x00, 0x52, 0x1f,
0x73, 0x79, 0x6e, 0x63, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x74,
0x65, 0x54, 0x61, 0x73, 0x6b, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x42, 0x02,
0x68, 0x00, 0x12, 0x8b, 0x01, 0x0a, 0x1f, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x71, 0x75, 0x65, 0x75,
0x65, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69,
0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x74, 0x65, 0x6d,
0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e,
0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61,
0x68, 0x00, 0x12, 0x8b, 0x01, 0x0a, 0x1f, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x71, 0x75, 0x65, 0x75, 0x65,
0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62,
0x75, 0x74, 0x65, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x74, 0x65, 0x6d, 0x70,
0x6f, 0x72, 0x61, 0x6c, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72,
0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61,
0x73, 0x6b, 0x51, 0x75, 0x65, 0x75, 0x65, 0x55, 0x73, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x41, 0x74,
0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x48, 0x00, 0x52, 0x1b, 0x74, 0x61, 0x73, 0x6b,
0x51, 0x75, 0x65, 0x75, 0x65, 0x55, 0x73, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x41, 0x74, 0x74, 0x72,
0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x42, 0x02, 0x68, 0x00, 0x12, 0x38, 0x0a, 0x04, 0x64, 0x61, 0x74,
0x61, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61,
0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x48, 0x00, 0x52, 0x1b, 0x74, 0x61, 0x73, 0x6b, 0x51,
0x75, 0x65, 0x75, 0x65, 0x55, 0x73, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x41, 0x74, 0x74, 0x72, 0x69,
0x62, 0x75, 0x74, 0x65, 0x73, 0x42, 0x02, 0x68, 0x00, 0x12, 0x38, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61,
0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61,
0x6c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x44,
0x61, 0x74, 0x61, 0x42, 0x6c, 0x6f, 0x62, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x42, 0x02, 0x68,
0x00, 0x12, 0x47, 0x0a, 0x0f, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x74,
0x69, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74,
0x61, 0x6d, 0x70, 0x52, 0x0e, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x54, 0x69,
0x6d, 0x65, 0x42, 0x02, 0x68, 0x00, 0x42, 0x0c, 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62,
0x75, 0x74, 0x65, 0x73, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x4a, 0x04, 0x08, 0x07, 0x10, 0x08, 0x22,
0x94, 0x02, 0x0a, 0x10, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x6f,
0x6b, 0x65, 0x6e, 0x12, 0x1d, 0x0a, 0x08, 0x73, 0x68, 0x61, 0x72, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01,
0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x73, 0x68, 0x61, 0x72, 0x64, 0x49, 0x64, 0x42, 0x02, 0x68, 0x00,
0x61, 0x74, 0x61, 0x42, 0x6c, 0x6f, 0x62, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x42, 0x02, 0x68, 0x00,
0x12, 0x47, 0x0a, 0x0f, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x74, 0x69,
0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61,
0x6d, 0x70, 0x52, 0x0e, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x54, 0x69,
0x6d, 0x65, 0x42, 0x02, 0x68, 0x00, 0x42, 0x0c, 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75,
0x74, 0x65, 0x73, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x4a, 0x04, 0x08, 0x07, 0x10, 0x08, 0x22, 0x94,
0x02, 0x0a, 0x10, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x6b,
0x65, 0x6e, 0x12, 0x1d, 0x0a, 0x08, 0x73, 0x68, 0x61, 0x72, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20,
0x01, 0x28, 0x05, 0x52, 0x07, 0x73, 0x68, 0x61, 0x72, 0x64, 0x49, 0x64, 0x42, 0x02, 0x68, 0x00,
0x12, 0x3d, 0x0a, 0x19, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x69, 0x65, 0x76, 0x65,
0x64, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01,
0x28, 0x03, 0x52, 0x16, 0x6c, 0x61, 0x73, 0x74, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x76, 0x65, 0x64,
0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x64, 0x42, 0x02, 0x68, 0x00, 0x12, 0x3d, 0x0a, 0x19,
0x6c, 0x61, 0x73, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x64, 0x5f, 0x6d, 0x65,
0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x16, 0x6c,
0x61, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73,
0x61, 0x67, 0x65, 0x49, 0x64, 0x42, 0x02, 0x68, 0x00, 0x12, 0x63, 0x0a, 0x1e, 0x6c, 0x61, 0x73, 0x74,
0x5f, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x64, 0x5f, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69,
0x6c, 0x69, 0x74, 0x79, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a,
0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x1b, 0x6c, 0x61, 0x73, 0x74, 0x50,
0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x64, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74,
0x79, 0x54, 0x69, 0x6d, 0x65, 0x42, 0x02, 0x68, 0x00, 0x22, 0x52, 0x0a, 0x0f, 0x53, 0x79, 0x6e, 0x63,
0x53, 0x68, 0x61, 0x72, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x3f, 0x0a, 0x0b, 0x73, 0x74,
0x61, 0x74, 0x75, 0x73, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a,
0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x75,
0x73, 0x54, 0x69, 0x6d, 0x65, 0x42, 0x02, 0x68, 0x00, 0x22, 0xb3, 0x01, 0x0a, 0x14, 0x53, 0x79, 0x6e,
0x63, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65,
0x12, 0x3a, 0x0a, 0x17, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x5f, 0x6c, 0x6f, 0x77,
0x5f, 0x77, 0x61, 0x74, 0x65, 0x72, 0x6d, 0x61, 0x72, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52,
0x15, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x4c, 0x6f, 0x77, 0x57, 0x61, 0x74,
0x65, 0x72, 0x6d, 0x61, 0x72, 0x6b, 0x42, 0x02, 0x68, 0x00, 0x12, 0x5f, 0x0a, 0x1c, 0x69, 0x6e, 0x63,
0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x5f, 0x6c, 0x6f, 0x77, 0x5f, 0x77, 0x61, 0x74, 0x65, 0x72, 0x6d,
0x61, 0x72, 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e,
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54,
0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x19, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x73,
0x69, 0x76, 0x65, 0x4c, 0x6f, 0x77, 0x57, 0x61, 0x74, 0x65, 0x72, 0x6d, 0x61, 0x72, 0x6b, 0x54, 0x69,
0x6d, 0x65, 0x42, 0x02, 0x68, 0x00, 0x22, 0xbe, 0x02, 0x0a, 0x13, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x64, 0x0a, 0x11,
0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x73,
0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61,
0x6c, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x70, 0x6c,
0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x10, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x42, 0x02, 0x68, 0x00, 0x12, 0x3d, 0x0a,
0x19, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x69, 0x65, 0x76, 0x65, 0x64, 0x5f, 0x6d,
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52,
0x16, 0x6c, 0x61, 0x73, 0x74, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x76, 0x65, 0x64, 0x4d, 0x65, 0x73,
0x73, 0x61, 0x67, 0x65, 0x49, 0x64, 0x42, 0x02, 0x68, 0x00, 0x12, 0x1d, 0x0a, 0x08, 0x68, 0x61, 0x73,
0x5f, 0x6d, 0x6f, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x68, 0x61, 0x73, 0x4d,
0x6f, 0x72, 0x65, 0x42, 0x02, 0x68, 0x00, 0x12, 0x63, 0x0a, 0x11, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x73,
0x68, 0x61, 0x72, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x33, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2e, 0x73, 0x65, 0x72, 0x76,
0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x68, 0x61, 0x72, 0x64, 0x53, 0x74, 0x61,
0x74, 0x75, 0x73, 0x52, 0x0f, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x68, 0x61, 0x72, 0x64, 0x53, 0x74, 0x61,
0x74, 0x75, 0x73, 0x42, 0x02, 0x68, 0x00, 0x22, 0xa4, 0x02, 0x0a, 0x1b, 0x57, 0x6f, 0x72, 0x6b,
0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65,
0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x64, 0x0a, 0x11, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x33, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72,
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
0x76, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x61,
0x73, 0x6b, 0x52, 0x10, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x61,
0x73, 0x6b, 0x73, 0x42, 0x02, 0x68, 0x00, 0x12, 0x3c, 0x0a, 0x18, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73,
0x69, 0x76, 0x65, 0x5f, 0x68, 0x69, 0x67, 0x68, 0x5f, 0x77, 0x61, 0x74, 0x65, 0x72, 0x6d, 0x61, 0x72,
0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x16, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76,
0x65, 0x48, 0x69, 0x67, 0x68, 0x57, 0x61, 0x74, 0x65, 0x72, 0x6d, 0x61, 0x72, 0x6b, 0x42, 0x02,
0x68, 0x00, 0x12, 0x61, 0x0a, 0x1d, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x5f, 0x68,
0x69, 0x67, 0x68, 0x5f, 0x77, 0x61, 0x74, 0x65, 0x72, 0x6d, 0x61, 0x72, 0x6b, 0x5f, 0x74, 0x69, 0x6d,
0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d,
0x70, 0x52, 0x1a, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x48, 0x69, 0x67, 0x68,
0x57, 0x61, 0x74, 0x65, 0x72, 0x6d, 0x61, 0x72, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x42, 0x02, 0x68, 0x00,
0x22, 0x84, 0x03, 0x0a, 0x13, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54,
0x61, 0x73, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x25, 0x0a, 0x0c, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70,
0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x61, 0x6d,
0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x42, 0x02, 0x68, 0x00, 0x12, 0x23, 0x0a, 0x0b, 0x77,
0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
0x52, 0x0a, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x49, 0x64, 0x42, 0x02, 0x68, 0x00, 0x12,
0x19, 0x0a, 0x06, 0x72, 0x75, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05,
0x72, 0x75, 0x6e, 0x49, 0x64, 0x42, 0x02, 0x68, 0x00, 0x12, 0x47, 0x0a, 0x09, 0x74, 0x61, 0x73, 0x6b,
0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x74, 0x65, 0x6d,
0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69,
0x2e, 0x65, 0x6e, 0x75, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70,
0x65, 0x52, 0x08, 0x74, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x42, 0x02, 0x68, 0x00, 0x12, 0x1b,
0x0a, 0x07, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06,
0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x42, 0x02, 0x68, 0x00, 0x12, 0x1c, 0x0a, 0x07, 0x76, 0x65, 0x72,
0x73, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73,
0x69, 0x6f, 0x6e, 0x42, 0x02, 0x68, 0x00, 0x12, 0x28, 0x0a, 0x0e, 0x66, 0x69, 0x72, 0x73, 0x74, 0x5f,
0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x66,
0x69, 0x72, 0x73, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x42, 0x02, 0x68, 0x00, 0x12, 0x26,
0x0a, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x08,
0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x6e, 0x65, 0x78, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x49,
0x64, 0x42, 0x02, 0x68, 0x00, 0x12, 0x30, 0x0a, 0x12, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65,
0x64, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52,
0x10, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x49, 0x64,
0x42, 0x02, 0x68, 0x00, 0x22, 0xc0, 0x04, 0x0a, 0x17, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63,
0x65, 0x54, 0x61, 0x73, 0x6b, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x12, 0x65,
0x0a, 0x13, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x6f, 0x70, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x30, 0x2e, 0x74, 0x65, 0x6d,
0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e,
0x65, 0x6e, 0x75, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63,
0x65, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x12, 0x6e, 0x61, 0x6d, 0x65, 0x73,
0x70, 0x61, 0x63, 0x65, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x02, 0x68,
0x00, 0x12, 0x12, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64,
0x42, 0x02, 0x68, 0x00, 0x12, 0x40, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x28, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2e, 0x61, 0x70, 0x69, 0x2e,
0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x61, 0x6d, 0x65,
0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x42,
0x02, 0x68, 0x00, 0x12, 0x46, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x04, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2e, 0x61, 0x70, 0x69,
0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x61, 0x6d,
0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x06, 0x63, 0x6f, 0x6e,
0x66, 0x69, 0x67, 0x42, 0x02, 0x68, 0x00, 0x12, 0x6a, 0x0a, 0x12, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x05, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x37, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2e, 0x61, 0x70, 0x69,
0x2e, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4e,
0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x11, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x02, 0x68, 0x00, 0x12, 0x29,
0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18,
0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x56, 0x65, 0x72, 0x73,
0x69, 0x6f, 0x6e, 0x42, 0x02, 0x68, 0x00, 0x12, 0x2d, 0x0a, 0x10, 0x66, 0x61, 0x69, 0x6c, 0x6f, 0x76,
0x65, 0x72, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52,
0x0f, 0x66, 0x61, 0x69, 0x6c, 0x6f, 0x76, 0x65, 0x72, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
0x42, 0x02, 0x68, 0x00, 0x12, 0x5a, 0x0a, 0x10, 0x66, 0x61, 0x69, 0x6c, 0x6f, 0x76, 0x65, 0x72, 0x5f,
0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x74,
0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x70, 0x6c, 0x69,
0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x61, 0x69, 0x6c, 0x6f, 0x76, 0x65,
0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0f, 0x66, 0x61, 0x69, 0x6c, 0x6f, 0x76, 0x65, 0x72,
0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x42, 0x02, 0x68, 0x00, 0x22, 0xaa, 0x01, 0x0a, 0x1d,
0x53, 0x79, 0x6e, 0x63, 0x53, 0x68, 0x61, 0x72, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x54, 0x61,
0x73, 0x6b, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x12, 0x29, 0x0a, 0x0e, 0x73,
0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72,
0x42, 0x02, 0x68, 0x00, 0x12, 0x1d, 0x0a, 0x08, 0x73, 0x68, 0x61, 0x72, 0x64, 0x5f, 0x69, 0x64,
0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x73, 0x68, 0x61, 0x72, 0x64, 0x49, 0x64, 0x42, 0x02,
0x68, 0x00, 0x12, 0x3f, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, 0x74, 0x69, 0x6d, 0x65,
0x64, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28,
0x03, 0x52, 0x16, 0x6c, 0x61, 0x73, 0x74, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x76, 0x65, 0x64, 0x4d,
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x64, 0x42, 0x02, 0x68, 0x00, 0x12, 0x3d, 0x0a, 0x19, 0x6c,
0x61, 0x73, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x64, 0x5f, 0x6d, 0x65, 0x73,
0x73, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x16, 0x6c,
0x61, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61,
0x67, 0x65, 0x49, 0x64, 0x42, 0x02, 0x68, 0x00, 0x12, 0x63, 0x0a, 0x1e, 0x6c, 0x61, 0x73, 0x74, 0x5f,
0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x64, 0x5f, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c,
0x69, 0x74, 0x79, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e,
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x1b, 0x6c, 0x61, 0x73, 0x74, 0x50, 0x72,
0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x64, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79,
0x54, 0x69, 0x6d, 0x65, 0x42, 0x02, 0x68, 0x00, 0x22, 0x52, 0x0a, 0x0f, 0x53, 0x79, 0x6e, 0x63, 0x53,
0x68, 0x61, 0x72, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x3f, 0x0a, 0x0b, 0x73, 0x74, 0x61,
0x74, 0x75, 0x73, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e,
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73,
0x54, 0x69, 0x6d, 0x65, 0x42, 0x02, 0x68, 0x00, 0x22, 0xb3, 0x01, 0x0a, 0x14, 0x53, 0x79, 0x6e, 0x63,
0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12,
0x3a, 0x0a, 0x17, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x5f, 0x6c, 0x6f, 0x77, 0x5f,
0x77, 0x61, 0x74, 0x65, 0x72, 0x6d, 0x61, 0x72, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52,
0x15, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x4c, 0x6f, 0x77, 0x57, 0x61, 0x74, 0x65,
0x72, 0x6d, 0x61, 0x72, 0x6b, 0x42, 0x02, 0x68, 0x00, 0x12, 0x5f, 0x0a, 0x1c, 0x69, 0x6e, 0x63, 0x6c,
0x75, 0x73, 0x69, 0x76, 0x65, 0x5f, 0x6c, 0x6f, 0x77, 0x5f, 0x77, 0x61, 0x74, 0x65, 0x72, 0x6d, 0x61,
0x72, 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67,
0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69,
0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x19, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x73, 0x69,
0x76, 0x65, 0x4c, 0x6f, 0x77, 0x57, 0x61, 0x74, 0x65, 0x72, 0x6d, 0x61, 0x72, 0x6b, 0x54, 0x69, 0x6d,
0x65, 0x42, 0x02, 0x68, 0x00, 0x22, 0xbe, 0x02, 0x0a, 0x13, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x64, 0x0a, 0x11, 0x72,
0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x18,
0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c,
0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x70, 0x6c, 0x69,
0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x10, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x42, 0x02, 0x68, 0x00, 0x12, 0x3d, 0x0a, 0x19,
0x6c, 0x61, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x69, 0x65, 0x76, 0x65, 0x64, 0x5f, 0x6d, 0x65,
0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x16,
0x6c, 0x61, 0x73, 0x74, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x76, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73,
0x61, 0x67, 0x65, 0x49, 0x64, 0x42, 0x02, 0x68, 0x00, 0x12, 0x1d, 0x0a, 0x08, 0x68, 0x61, 0x73, 0x5f,
0x6d, 0x6f, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x68, 0x61, 0x73, 0x4d, 0x6f,
0x72, 0x65, 0x42, 0x02, 0x68, 0x00, 0x12, 0x63, 0x0a, 0x11, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x73, 0x68,
0x61, 0x72, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x33, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65,
0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x68, 0x61, 0x72, 0x64, 0x53, 0x74, 0x61, 0x74,
0x75, 0x73, 0x52, 0x0f, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x68, 0x61, 0x72, 0x64, 0x53, 0x74, 0x61, 0x74,
0x75, 0x73, 0x42, 0x02, 0x68, 0x00, 0x22, 0xa4, 0x02, 0x0a, 0x1b, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c,
0x6f, 0x77, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x73,
0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x64, 0x0a, 0x11, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33,
0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e,
0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76,
0x31, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x61, 0x73,
0x6b, 0x52, 0x10, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x61, 0x73,
0x6b, 0x73, 0x42, 0x02, 0x68, 0x00, 0x12, 0x3c, 0x0a, 0x18, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69,
0x76, 0x65, 0x5f, 0x68, 0x69, 0x67, 0x68, 0x5f, 0x77, 0x61, 0x74, 0x65, 0x72, 0x6d, 0x61, 0x72, 0x6b,
0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x16, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65,
0x48, 0x69, 0x67, 0x68, 0x57, 0x61, 0x74, 0x65, 0x72, 0x6d, 0x61, 0x72, 0x6b, 0x42, 0x02, 0x68, 0x00,
0x12, 0x61, 0x0a, 0x1d, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x5f, 0x68, 0x69,
0x67, 0x68, 0x5f, 0x77, 0x61, 0x74, 0x65, 0x72, 0x6d, 0x61, 0x72, 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65,
0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70,
0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x42, 0x02, 0x68, 0x00,
0x22, 0xfd, 0x06, 0x0a, 0x1a, 0x53, 0x79, 0x6e, 0x63, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79,
0x54, 0x61, 0x73, 0x6b, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x12, 0x25, 0x0a,
0x0c, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x0b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x42, 0x02,
0x68, 0x00, 0x12, 0x23, 0x0a, 0x0b, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x69,
0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77,
0x49, 0x64, 0x42, 0x02, 0x68, 0x00, 0x12, 0x19, 0x0a, 0x06, 0x72, 0x75, 0x6e, 0x5f, 0x69, 0x64, 0x18,
0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x72, 0x75, 0x6e, 0x49, 0x64, 0x42, 0x02, 0x68, 0x00, 0x12,
0x1c, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52,
0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x02, 0x68, 0x00, 0x12, 0x30, 0x0a, 0x12, 0x73,
0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x69,
0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65,
0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x42, 0x02, 0x68, 0x00, 0x12, 0x45, 0x0a, 0x0e, 0x73,
0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0d, 0x73,
0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x42, 0x02, 0x68, 0x00, 0x12,
0x2c, 0x0a, 0x10, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f,
0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64,
0x45, 0x76, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x42, 0x02, 0x68, 0x00, 0x12, 0x41, 0x0a, 0x0c, 0x73, 0x74,
0x61, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0b, 0x73, 0x74, 0x61, 0x72,
0x74, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x42, 0x02, 0x68, 0x00, 0x12, 0x4e, 0x0a, 0x13, 0x6c, 0x61,
0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65,
0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d,
0x70, 0x52, 0x11, 0x6c, 0x61, 0x73, 0x74, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x54,
0x69, 0x6d, 0x65, 0x42, 0x02, 0x68, 0x00, 0x12, 0x3e, 0x0a, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c,
0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61,
0x6c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x50,
0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x52, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73,
0x42, 0x02, 0x68, 0x00, 0x12, 0x1c, 0x0a, 0x07, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x18, 0x0b,
0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x42, 0x02, 0x68, 0x00,
0x12, 0x47, 0x0a, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x18,
0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2e,
0x61, 0x70, 0x69, 0x2e, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x46,
0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x52, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x46, 0x61, 0x69, 0x6c, 0x75,
0x72, 0x65, 0x42, 0x02, 0x68, 0x00, 0x12, 0x34, 0x0a, 0x14, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x77, 0x6f,
0x72, 0x6b, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x0d, 0x20, 0x01,
0x28, 0x09, 0x52, 0x12, 0x6c, 0x61, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x49, 0x64, 0x65,
0x6e, 0x74, 0x69, 0x74, 0x79, 0x42, 0x02, 0x68, 0x00, 0x12, 0x5b, 0x0a, 0x0f, 0x76, 0x65, 0x72, 0x73,
0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x0e, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x2e, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2e, 0x73, 0x65, 0x72, 0x76,
0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x76, 0x31,
0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x0e,
0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x42, 0x02, 0x68,
0x00, 0x12, 0x66, 0x0a, 0x13, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74,
0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e,
0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x61,
0x70, 0x69, 0x2e, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61,
0x73, 0x65, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x11,
0x62, 0x61, 0x73, 0x65, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66,
0x6f, 0x42, 0x02, 0x68, 0x00, 0x22, 0xe2, 0x03, 0x0a, 0x15, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79,
0x54, 0x61, 0x73, 0x6b, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x12, 0x25, 0x0a,
0x0c, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01,
0x28, 0x09, 0x52, 0x0b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x42, 0x02,
0x68, 0x00, 0x12, 0x23, 0x0a, 0x0b, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x69,
0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77,
0x49, 0x64, 0x42, 0x02, 0x68, 0x00, 0x12, 0x19, 0x0a, 0x06, 0x72, 0x75, 0x6e, 0x5f, 0x69, 0x64, 0x18,
0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x72, 0x75, 0x6e, 0x49, 0x64, 0x42, 0x02, 0x68, 0x00, 0x12,
0x6a, 0x0a, 0x15, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72,
0x79, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x74,
0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x61,
0x70, 0x69, 0x2e, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x65, 0x72,
0x73, 0x69, 0x6f, 0x6e, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x13,
0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x49, 0x74, 0x65,
0x6d, 0x73, 0x42, 0x02, 0x68, 0x00, 0x12, 0x3c, 0x0a, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18,
0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c,
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61,
0x74, 0x61, 0x42, 0x6c, 0x6f, 0x62, 0x52, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x42, 0x02, 0x68,
0x00, 0x12, 0x4a, 0x0a, 0x0e, 0x6e, 0x65, 0x77, 0x5f, 0x72, 0x75, 0x6e, 0x5f, 0x65, 0x76, 0x65, 0x6e,
0x74, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72,
0x61, 0x6c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31,
0x2e, 0x44, 0x61, 0x74, 0x61, 0x42, 0x6c, 0x6f, 0x62, 0x52, 0x0c, 0x6e, 0x65, 0x77, 0x52, 0x75, 0x6e,
0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x42, 0x02, 0x68, 0x00, 0x12, 0x66, 0x0a, 0x13, 0x62, 0x61, 0x73,
0x65, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18,
0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2e,
0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c,
0x6f, 0x77, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74,
0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x11, 0x62, 0x61, 0x73, 0x65, 0x45, 0x78, 0x65, 0x63,
0x75, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x02, 0x68, 0x00, 0x4a, 0x04, 0x08, 0x01,
0x10, 0x02, 0x22, 0x86, 0x01, 0x0a, 0x1f, 0x53, 0x79, 0x6e, 0x63, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c,
0x6f, 0x77, 0x53, 0x74, 0x61, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62,
0x75, 0x74, 0x65, 0x73, 0x12, 0x63, 0x0a, 0x0e, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77,
0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x74, 0x65,
0x52, 0x1a, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x48, 0x69, 0x67, 0x68, 0x57, 0x61,
0x74, 0x65, 0x72, 0x6d, 0x61, 0x72, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x42, 0x02, 0x68, 0x00, 0x22,
0x84, 0x03, 0x0a, 0x13, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x61,
0x73, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x25, 0x0a, 0x0c, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61,
0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x61, 0x6d, 0x65,
0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x42, 0x02, 0x68, 0x00, 0x12, 0x23, 0x0a, 0x0b, 0x77, 0x6f,
0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a,
0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x49, 0x64, 0x42, 0x02, 0x68, 0x00, 0x12, 0x19,
0x0a, 0x06, 0x72, 0x75, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x72,
0x75, 0x6e, 0x49, 0x64, 0x42, 0x02, 0x68, 0x00, 0x12, 0x47, 0x0a, 0x09, 0x74, 0x61, 0x73, 0x6b, 0x5f,
0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x74, 0x65, 0x6d, 0x70,
0x6f, 0x72, 0x61, 0x6c, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x65,
0x6e, 0x75, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65,
0x52, 0x08, 0x74, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x42, 0x02, 0x68, 0x00, 0x12, 0x1b, 0x0a,
0x07, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x74,
0x61, 0x73, 0x6b, 0x49, 0x64, 0x42, 0x02, 0x68, 0x00, 0x12, 0x1c, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73,
0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f,
0x6e, 0x42, 0x02, 0x68, 0x00, 0x12, 0x28, 0x0a, 0x0e, 0x66, 0x69, 0x72, 0x73, 0x74, 0x5f, 0x65, 0x76,
0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x66, 0x69,
0x72, 0x73, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x42, 0x02, 0x68, 0x00, 0x12, 0x26, 0x0a,
0x0d, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x08, 0x20,
0x01, 0x28, 0x03, 0x52, 0x0b, 0x6e, 0x65, 0x78, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x42,
0x02, 0x68, 0x00, 0x12, 0x30, 0x0a, 0x12, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x5f,
0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10,
0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x42,
0x02, 0x68, 0x00, 0x22, 0xc0, 0x04, 0x0a, 0x17, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65,
0x54, 0x61, 0x73, 0x6b, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x12, 0x65, 0x0a,
0x13, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x30, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6f,
0x72, 0x61, 0x6c, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x65,
0x6e, 0x75, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65,
0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x12, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70,
0x61, 0x63, 0x65, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x02, 0x68, 0x00, 0x12,
0x12, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x42, 0x02,
0x68, 0x00, 0x12, 0x40, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x28, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6e,
0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x73,
0x70, 0x61, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x42, 0x02, 0x68,
0x00, 0x12, 0x46, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x2a, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6e,
0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x61, 0x6d, 0x65,
0x73, 0x70, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66,
0x69, 0x67, 0x42, 0x02, 0x68, 0x00, 0x12, 0x6a, 0x0a, 0x12, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x37, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72,
0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x61,
0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x11, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x02, 0x68, 0x00, 0x12, 0x29, 0x0a, 0x0e,
0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20,
0x01, 0x28, 0x03, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f,
0x6e, 0x42, 0x02, 0x68, 0x00, 0x12, 0x2d, 0x0a, 0x10, 0x66, 0x61, 0x69, 0x6c, 0x6f, 0x76, 0x65,
0x72, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f,
0x66, 0x61, 0x69, 0x6c, 0x6f, 0x76, 0x65, 0x72, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x02,
0x68, 0x00, 0x12, 0x5a, 0x0a, 0x10, 0x66, 0x61, 0x69, 0x6c, 0x6f, 0x76, 0x65, 0x72, 0x5f, 0x68, 0x69,
0x73, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x74, 0x65, 0x6d,
0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x61, 0x69, 0x6c, 0x6f, 0x76, 0x65, 0x72,
0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0f, 0x66, 0x61, 0x69, 0x6c, 0x6f, 0x76, 0x65, 0x72, 0x48,
0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x42, 0x02, 0x68, 0x00, 0x22, 0xaa, 0x01, 0x0a, 0x1d, 0x53, 0x79,
0x6e, 0x63, 0x53, 0x68, 0x61, 0x72, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x54, 0x61, 0x73, 0x6b,
0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x12, 0x29, 0x0a, 0x0e, 0x73, 0x6f, 0x75,
0x72, 0x63, 0x65, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x52, 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x42,
0x02, 0x68, 0x00, 0x12, 0x1d, 0x0a, 0x08, 0x73, 0x68, 0x61, 0x72, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x02,
0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x73, 0x68, 0x61, 0x72, 0x64, 0x49, 0x64, 0x42, 0x02, 0x68, 0x00,
0x12, 0x3f, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52,
0x0a, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x42, 0x02, 0x68, 0x00, 0x22, 0xfd,
0x06, 0x0a, 0x1a, 0x53, 0x79, 0x6e, 0x63, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x54, 0x61,
0x73, 0x6b, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0c, 0x6e,
0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x0b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x42, 0x02, 0x68,
0x00, 0x12, 0x23, 0x0a, 0x0b, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x69, 0x64, 0x18,
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x49, 0x64,
0x42, 0x02, 0x68, 0x00, 0x12, 0x19, 0x0a, 0x06, 0x72, 0x75, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20,
0x01, 0x28, 0x09, 0x52, 0x05, 0x72, 0x75, 0x6e, 0x49, 0x64, 0x42, 0x02, 0x68, 0x00, 0x12, 0x1c, 0x0a,
0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x76,
0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x02, 0x68, 0x00, 0x12, 0x30, 0x0a, 0x12, 0x73, 0x63,
0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18,
0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x45,
0x76, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x42, 0x02, 0x68, 0x00, 0x12, 0x45, 0x0a, 0x0e, 0x73, 0x63, 0x68,
0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0d, 0x73, 0x63, 0x68,
0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x42, 0x02, 0x68, 0x00, 0x12, 0x2c, 0x0a,
0x10, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64,
0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x45, 0x76,
0x65, 0x6e, 0x74, 0x49, 0x64, 0x42, 0x02, 0x68, 0x00, 0x12, 0x41, 0x0a, 0x0c, 0x73, 0x74, 0x61, 0x72,
0x74, 0x65, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a,
0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0b, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65,
0x64, 0x54, 0x69, 0x6d, 0x65, 0x42, 0x02, 0x68, 0x00, 0x12, 0x4e, 0x0a, 0x13, 0x6c, 0x61, 0x73, 0x74,
0x5f, 0x68, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x09,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52,
0x11, 0x6c, 0x61, 0x73, 0x74, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x54, 0x69, 0x6d,
0x65, 0x42, 0x02, 0x68, 0x00, 0x12, 0x3e, 0x0a, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18,
0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2e,
0x61, 0x70, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x79,
0x6c, 0x6f, 0x61, 0x64, 0x73, 0x52, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x42, 0x02,
0x68, 0x00, 0x12, 0x1c, 0x0a, 0x07, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x18, 0x0b, 0x20, 0x01,
0x28, 0x05, 0x52, 0x07, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x42, 0x02, 0x68, 0x00, 0x12, 0x47,
0x0a, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x18, 0x0c, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2e, 0x61, 0x70,
0x69, 0x2e, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x61, 0x69,
0x6c, 0x75, 0x72, 0x65, 0x52, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65,
0x42, 0x02, 0x68, 0x00, 0x12, 0x34, 0x0a, 0x14, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x77, 0x6f, 0x72, 0x6b,
0x65, 0x72, 0x5f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09,
0x52, 0x12, 0x6c, 0x61, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x49, 0x64, 0x65, 0x6e, 0x74,
0x69, 0x74, 0x79, 0x42, 0x02, 0x68, 0x00, 0x12, 0x5b, 0x0a, 0x0f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f,
0x6e, 0x5f, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x2e, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72,
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x56,
0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x0e, 0x76, 0x65,
0x72, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x42, 0x02, 0x68, 0x00, 0x12,
0x66, 0x0a, 0x13, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f,
0x6e, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x74, 0x65,
0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69,
0x2e, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x57,
0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x4d, 0x75, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x74, 0x61,
0x74, 0x65, 0x52, 0x0d, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x74,
0x65, 0x42, 0x02, 0x68, 0x00, 0x22, 0xc8, 0x01, 0x0a, 0x1b, 0x54, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65,
0x75, 0x65, 0x55, 0x73, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75,
0x74, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0c, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f,
0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61,
0x63, 0x65, 0x49, 0x64, 0x42, 0x02, 0x68, 0x00, 0x12, 0x2a, 0x0a, 0x0f, 0x74, 0x61, 0x73, 0x6b, 0x5f,
0x71, 0x75, 0x65, 0x75, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
0x52, 0x0d, 0x74, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65, 0x75, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x42, 0x02,
0x68, 0x00, 0x12, 0x56, 0x0a, 0x09, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2e, 0x73,
0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74,
0x65, 0x6e, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65, 0x75,
0x65, 0x55, 0x73, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x44, 0x61,
0x74, 0x61, 0x42, 0x02, 0x68, 0x00, 0x42, 0x35, 0x5a, 0x33, 0x67, 0x6f, 0x2e, 0x74, 0x65, 0x6d, 0x70,
0x6f, 0x72, 0x61, 0x6c, 0x2e, 0x69, 0x6f, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x61, 0x70,
0x69, 0x2f, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x3b,
0x72, 0x65, 0x70, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x33,
0x2e, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x73, 0x65,
0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x11, 0x62, 0x61,
0x73, 0x65, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x02,
0x68, 0x00, 0x22, 0x84, 0x04, 0x0a, 0x15, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x54, 0x61,
0x73, 0x6b, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0c, 0x6e,
0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
0x52, 0x0b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x42, 0x02, 0x68, 0x00,
0x12, 0x23, 0x0a, 0x0b, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x69, 0x64, 0x18, 0x03,
0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x49, 0x64,
0x42, 0x02, 0x68, 0x00, 0x12, 0x19, 0x0a, 0x06, 0x72, 0x75, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20,
0x01, 0x28, 0x09, 0x52, 0x05, 0x72, 0x75, 0x6e, 0x49, 0x64, 0x42, 0x02, 0x68, 0x00, 0x12, 0x6a, 0x0a,
0x15, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x5f,
0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x74, 0x65, 0x6d,
0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e,
0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69,
0x6f, 0x6e, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x13, 0x76, 0x65,
0x72, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x49, 0x74, 0x65, 0x6d, 0x73,
0x42, 0x02, 0x68, 0x00, 0x12, 0x3c, 0x0a, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x06, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2e, 0x61, 0x70,
0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61,
0x42, 0x6c, 0x6f, 0x62, 0x52, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x42, 0x02, 0x68, 0x00, 0x12,
0x4a, 0x0a, 0x0e, 0x6e, 0x65, 0x77, 0x5f, 0x72, 0x75, 0x6e, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73,
0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c,
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61,
0x74, 0x61, 0x42, 0x6c, 0x6f, 0x62, 0x52, 0x0c, 0x6e, 0x65, 0x77, 0x52, 0x75, 0x6e, 0x45, 0x76, 0x65,
0x6e, 0x74, 0x73, 0x42, 0x02, 0x68, 0x00, 0x12, 0x66, 0x0a, 0x13, 0x62, 0x61, 0x73, 0x65, 0x5f,
0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x08, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2e, 0x73, 0x65,
0x72, 0x76, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77,
0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e,
0x49, 0x6e, 0x66, 0x6f, 0x52, 0x11, 0x62, 0x61, 0x73, 0x65, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74,
0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x02, 0x68, 0x00, 0x12, 0x20, 0x0a, 0x0a, 0x6e, 0x65,
0x77, 0x5f, 0x72, 0x75, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e,
0x65, 0x77, 0x52, 0x75, 0x6e, 0x49, 0x64, 0x42, 0x02, 0x68, 0x00, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02,
0x22, 0x86, 0x01, 0x0a, 0x1f, 0x53, 0x79, 0x6e, 0x63, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77,
0x53, 0x74, 0x61, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74,
0x65, 0x73, 0x12, 0x63, 0x0a, 0x0e, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x73,
0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x74, 0x65, 0x6d, 0x70,
0x6f, 0x72, 0x61, 0x6c, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70,
0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x6f, 0x72,
0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x4d, 0x75, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65,
0x52, 0x0d, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x74, 0x65, 0x42,
0x02, 0x68, 0x00, 0x22, 0xc8, 0x01, 0x0a, 0x1b, 0x54, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65, 0x75, 0x65,
0x55, 0x73, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65,
0x73, 0x12, 0x25, 0x0a, 0x0c, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65,
0x49, 0x64, 0x42, 0x02, 0x68, 0x00, 0x12, 0x2a, 0x0a, 0x0f, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x71, 0x75,
0x65, 0x75, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d,
0x74, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65, 0x75, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x42, 0x02, 0x68, 0x00,
0x12, 0x56, 0x0a, 0x09, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x35, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2e, 0x73, 0x65, 0x72,
0x76, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e,
0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65, 0x75, 0x65, 0x55,
0x73, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61,
0x42, 0x02, 0x68, 0x00, 0x42, 0x35, 0x5a, 0x33, 0x67, 0x6f, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72,
0x61, 0x6c, 0x2e, 0x69, 0x6f, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f,
0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x3b, 0x72, 0x65,
0x70, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (

View File

@@ -905,6 +905,9 @@ const (
ReplicationTaskProcessorShardQPS = "history.ReplicationTaskProcessorShardQPS"
// ReplicationEnableDLQMetrics is the flag to emit DLQ metrics
ReplicationEnableDLQMetrics = "history.ReplicationEnableDLQMetrics"
// ReplicationEnableUpdateWithNewTaskMerge is the flag controlling whether replication task merging logic
// should be enabled for non continuedAsNew workflow UpdateWithNew case.
ReplicationEnableUpdateWithNewTaskMerge = "history.ReplicationEnableUpdateWithNewTaskMerge"
// HistoryTaskDLQEnabled enables the history task DLQ. This applies to internal tasks like transfer and timer tasks.
// Do not turn this on if you aren't using Cassandra as the history task DLQ is not implemented for other databases.
HistoryTaskDLQEnabled = "history.TaskDLQEnabled"

View File

@@ -48,3 +48,5 @@ frontend.enableNexusHTTPHandler:
- value: true
matching.queryWorkflowTaskTimeoutLogRate:
- value: 1.0
history.ReplicationEnableUpdateWithNewTaskMerge:
- value: true

View File

@@ -51,3 +51,5 @@ frontend.enableNexusHTTPHandler:
- value: true
matching.queryWorkflowTaskTimeoutLogRate:
- value: 1.0
history.ReplicationEnableUpdateWithNewTaskMerge:
- value: true

View File

@@ -429,6 +429,7 @@ message ReplicateEventsV2Request {
// New run events does not need version history since there is no prior events.
temporal.api.common.v1.DataBlob new_run_events = 5;
temporal.server.api.workflow.v1.BaseExecutionInfo base_execution_info = 6;
string new_run_id = 7;
}
message ReplicateEventsV2Response {

View File

@@ -152,7 +152,7 @@ message HistoryTaskAttributes {
// New run events does not need version history since there is no prior events.
temporal.api.common.v1.DataBlob new_run_events = 7;
temporal.server.api.workflow.v1.BaseExecutionInfo base_execution_info = 8;
string new_run_id = 9;
}
message SyncWorkflowStateTaskAttributes {

View File

@@ -262,6 +262,7 @@ type Config struct {
ReplicationTaskProcessorHostQPS dynamicconfig.FloatPropertyFn
ReplicationTaskProcessorShardQPS dynamicconfig.FloatPropertyFn
ReplicationEnableDLQMetrics dynamicconfig.BoolPropertyFn
ReplicationEnableUpdateWithNewTaskMerge dynamicconfig.BoolPropertyFn
ReplicationStreamSyncStatusDuration dynamicconfig.DurationPropertyFn
ReplicationProcessorSchedulerQueueSize dynamicconfig.IntPropertyFn
@@ -477,6 +478,7 @@ func NewConfig(
ReplicationTaskProcessorHostQPS: dc.GetFloat64Property(dynamicconfig.ReplicationTaskProcessorHostQPS, 1500),
ReplicationTaskProcessorShardQPS: dc.GetFloat64Property(dynamicconfig.ReplicationTaskProcessorShardQPS, 30),
ReplicationEnableDLQMetrics: dc.GetBoolProperty(dynamicconfig.ReplicationEnableDLQMetrics, true),
ReplicationEnableUpdateWithNewTaskMerge: dc.GetBoolProperty(dynamicconfig.ReplicationEnableUpdateWithNewTaskMerge, false),
ReplicationStreamSyncStatusDuration: dc.GetDurationProperty(dynamicconfig.ReplicationStreamSyncStatusDuration, 1*time.Second),
ReplicationProcessorSchedulerQueueSize: dc.GetIntProperty(dynamicconfig.ReplicationProcessorSchedulerQueueSize, 128),
ReplicationProcessorSchedulerWorkerCount: dc.GetIntProperty(dynamicconfig.ReplicationProcessorSchedulerWorkerCount, 512),

View File

@@ -660,6 +660,7 @@ func (e *historyEngineImpl) ReplicateHistoryEvents(
versionHistoryItems []*historyspb.VersionHistoryItem,
historyEvents [][]*historypb.HistoryEvent,
newEvents []*historypb.HistoryEvent,
newRunID string,
) error {
return e.nDCHistoryReplicator.ReplicateHistoryEvents(
ctx,
@@ -668,6 +669,7 @@ func (e *historyEngineImpl) ReplicateHistoryEvents(
versionHistoryItems,
historyEvents,
newEvents,
newRunID,
)
}

View File

@@ -192,6 +192,7 @@ func (r *HistoryImporterImpl) applyEvents(
versionHistoryItems,
eventsSlice,
nil,
"",
)
if err != nil {
return nil, false, err

View File

@@ -58,7 +58,7 @@ const (
)
type (
stateBuilderProvider func(
mutableStateRebuilderProvider func(
mutableState workflow.MutableState,
logger log.Logger,
) workflow.MutableStateRebuilder
@@ -111,6 +111,7 @@ type (
versionHistoryItems []*historyspb.VersionHistoryItem,
events [][]*historypb.HistoryEvent,
newEvents []*historypb.HistoryEvent,
newRunID string,
) error
}
@@ -231,6 +232,7 @@ func (r *HistoryReplicatorImpl) ReplicateHistoryEvents(
versionHistoryItems []*historyspb.VersionHistoryItem,
eventsSlice [][]*historypb.HistoryEvent,
newEvents []*historypb.HistoryEvent,
newRunID string,
) error {
task, err := newReplicationTaskFromBatch(
r.clusterMetadata,
@@ -240,6 +242,7 @@ func (r *HistoryReplicatorImpl) ReplicateHistoryEvents(
versionHistoryItems,
eventsSlice,
newEvents,
newRunID,
)
if err != nil {
return err
@@ -280,7 +283,7 @@ func (r *HistoryReplicatorImpl) doApplyEvents(
default:
// apply events, other than simple start workflow execution
// the continue as new + start workflow execution combination will also be processed here
// the update + start workflow execution combination will also be processed here
mutableState, err := wfContext.LoadMutableState(ctx, r.shardContext)
switch err.(type) {
case nil:

View File

@@ -44,11 +44,11 @@ type (
) (workflow.MutableState, Output, error)
MutableStateMapperImpl struct {
shardContext shard.Context
newBufferEventFlusher bufferEventFlusherProvider
newBranchMgr branchMgrProvider
newConflictResolver conflictResolverProvider
newStateBuilder stateBuilderProvider
shardContext shard.Context
newBufferEventFlusher bufferEventFlusherProvider
newBranchMgr branchMgrProvider
newConflictResolver conflictResolverProvider
newMutableStateRebuilder mutableStateRebuilderProvider
}
PrepareHistoryBranchOut struct {
@@ -74,14 +74,14 @@ func NewMutableStateMapping(
newBufferEventFlusher bufferEventFlusherProvider,
newBranchMgr branchMgrProvider,
newConflictResolver conflictResolverProvider,
newStateBuilder stateBuilderProvider,
newMutableStateRebuilder mutableStateRebuilderProvider,
) *MutableStateMapperImpl {
return &MutableStateMapperImpl{
shardContext: shardContext,
newBufferEventFlusher: newBufferEventFlusher,
newBranchMgr: newBranchMgr,
newConflictResolver: newConflictResolver,
newStateBuilder: newStateBuilder,
shardContext: shardContext,
newBufferEventFlusher: newBufferEventFlusher,
newBranchMgr: newBranchMgr,
newConflictResolver: newConflictResolver,
newMutableStateRebuilder: newMutableStateRebuilder,
}
}
@@ -233,14 +233,15 @@ func (m *MutableStateMapperImpl) ApplyEvents(
mutableState workflow.MutableState,
task replicationTask,
) (workflow.MutableState, workflow.MutableState, error) {
stateBuilder := m.newStateBuilder(mutableState, task.getLogger())
newMutableState, err := stateBuilder.ApplyEvents(
mutableStateRebuilder := m.newMutableStateRebuilder(mutableState, task.getLogger())
newMutableState, err := mutableStateRebuilder.ApplyEvents(
ctx,
task.getNamespaceID(),
uuid.New().String(),
task.getExecution(),
task.getEvents(),
task.getNewEvents(),
task.getNewRunID(),
)
if err != nil {
task.getLogger().Error(

View File

@@ -116,6 +116,7 @@ func (s *mutableStateMapperSuite) TestGetOrCreateHistoryBranch_ValidEventBatch_N
nil,
eventSlices,
nil,
"",
)
s.mockBranchMgr.EXPECT().
GetOrCreate(gomock.Any(), gomock.Any(), int64(11), gomock.Any()).Return(true, int32(0), nil).Times(1)
@@ -158,6 +159,7 @@ func (s *mutableStateMapperSuite) TestGetOrCreateHistoryBranch_ValidEventBatch_F
nil,
eventSlices,
nil,
"",
)
s.mockBranchMgr.EXPECT().
GetOrCreate(gomock.Any(), gomock.Any(), int64(11), gomock.Any()).Return(false, int32(0), nil).Times(1)
@@ -201,6 +203,7 @@ func (s *mutableStateMapperSuite) TestGetOrCreateHistoryBranch_ValidEventBatch_A
nil,
eventSlices,
nil,
"",
)
s.mockBranchMgr.EXPECT().
GetOrCreate(gomock.Any(), gomock.Any(), int64(11), gomock.Any()).Return(false, int32(0), nil).Times(1)

View File

@@ -62,6 +62,7 @@ type (
getSourceCluster() string
getEvents() [][]*historypb.HistoryEvent
getNewEvents() []*historypb.HistoryEvent
getNewRunID() string
getLogger() log.Logger
getBaseWorkflowInfo() *workflowspb.BaseExecutionInfo
getVersionHistory() *historyspb.VersionHistory
@@ -82,8 +83,8 @@ type (
versionHistory *historyspb.VersionHistory
events [][]*historypb.HistoryEvent
newEvents []*historypb.HistoryEvent
newRunID string
// startTime time.Time
logger log.Logger
}
)
@@ -101,8 +102,8 @@ var (
ErrEventVersionMismatch = serviceerror.NewInvalidArgument("event version mismatch")
// ErrNoNewRunHistory is returned if there is no new run history
ErrNoNewRunHistory = serviceerror.NewInvalidArgument("no new run history events")
// ErrLastEventIsNotContinueAsNew is returned if the last event is not continue as new
ErrLastEventIsNotContinueAsNew = serviceerror.NewInvalidArgument("last event is not continue as new")
// ErrNoNewRunID is returned if there is newRunHistory but no new runID
ErrNoNewRunID = serviceerror.NewInvalidArgument("no new run ID")
// ErrEmptyEventSlice is returned if any of event slice is empty
ErrEmptyEventSlice = serviceerror.NewInvalidArgument("event slice is empty")
// ErrEventSlicesNotConsecutive is returned if event slices are not consecutive
@@ -136,6 +137,7 @@ func newReplicationTaskFromRequest(
request.VersionHistoryItems,
[][]*historypb.HistoryEvent{events},
newEvents,
request.NewRunId,
)
}
@@ -147,6 +149,7 @@ func newReplicationTaskFromBatch(
versionHistoryItems []*historyspb.VersionHistoryItem,
eventsSlice [][]*historypb.HistoryEvent,
newEvents []*historypb.HistoryEvent,
newRunID string,
) (*replicationTaskImpl, error) {
if len(eventsSlice) == 0 {
@@ -174,6 +177,7 @@ func newReplicationTaskFromBatch(
versionHistoryItems,
eventsSlice,
newEvents,
newRunID,
)
}
@@ -185,6 +189,7 @@ func newReplicationTask(
versionHistoryItems []*historyspb.VersionHistoryItem,
eventsSlice [][]*historypb.HistoryEvent,
newEvents []*historypb.HistoryEvent,
newRunID string,
) (*replicationTaskImpl, error) {
versionHistory := &historyspb.VersionHistory{
@@ -211,6 +216,16 @@ func newReplicationTask(
eventTime = util.MaxTime(eventTime, timestamp.TimeValue(event.GetEventTime()))
}
if len(newEvents) != 0 && newRunID == "" {
// This is for backward compatibility, old replication tasks generated for continuedAsNew case
// doesn't have newRunID field set. In that case, we need to get newRunID from the last event.
if lastEvent.GetEventType() != enumspb.EVENT_TYPE_WORKFLOW_EXECUTION_CONTINUED_AS_NEW ||
lastEvent.GetWorkflowExecutionContinuedAsNewEventAttributes() == nil {
return nil, ErrNoNewRunID
}
newRunID = lastEvent.GetWorkflowExecutionContinuedAsNewEventAttributes().GetNewExecutionRunId()
}
logger = log.With(
logger,
tag.WorkflowID(workflowKey.WorkflowID),
@@ -232,6 +247,7 @@ func newReplicationTask(
versionHistory: versionHistory,
events: eventsSlice,
newEvents: newEvents,
newRunID: newRunID,
logger: logger,
}, nil
@@ -284,6 +300,10 @@ func (t *replicationTaskImpl) getNewEvents() []*historypb.HistoryEvent {
return t.newEvents
}
func (t *replicationTaskImpl) getNewRunID() string {
return t.newRunID
}
func (t *replicationTaskImpl) getLogger() log.Logger {
return t.logger
}
@@ -366,19 +386,16 @@ func (t *replicationTaskImpl) splitTask() (_ replicationTask, _ replicationTask,
if len(t.newEvents) == 0 {
return nil, nil, ErrNoNewRunHistory
}
newHistoryEvents := t.newEvents
if t.getLastEvent().GetEventType() != enumspb.EVENT_TYPE_WORKFLOW_EXECUTION_CONTINUED_AS_NEW ||
t.getLastEvent().GetWorkflowExecutionContinuedAsNewEventAttributes() == nil {
return nil, nil, ErrLastEventIsNotContinueAsNew
if len(t.newRunID) == 0 {
return nil, nil, ErrNoNewRunID
}
newRunID := t.getLastEvent().GetWorkflowExecutionContinuedAsNewEventAttributes().GetNewExecutionRunId()
newFirstEvent := newHistoryEvents[0]
newLastEvent := newHistoryEvents[len(newHistoryEvents)-1]
newFirstEvent := t.newEvents[0]
newLastEvent := t.newEvents[len(t.newEvents)-1]
newEventTime := time.Time{}
for _, event := range newHistoryEvents {
for _, event := range t.newEvents {
newEventTime = util.MaxTime(newEventTime, timestamp.TimeValue(event.GetEventTime()))
}
@@ -393,7 +410,7 @@ func (t *replicationTaskImpl) splitTask() (_ replicationTask, _ replicationTask,
logger := log.With(
t.logger,
tag.WorkflowID(t.workflowKey.WorkflowID),
tag.WorkflowRunID(newRunID),
tag.WorkflowRunID(t.newRunID),
tag.SourceCluster(t.sourceCluster),
tag.IncomingVersion(t.version),
tag.WorkflowFirstEventID(newFirstEvent.GetEventId()),
@@ -403,7 +420,7 @@ func (t *replicationTaskImpl) splitTask() (_ replicationTask, _ replicationTask,
newRunTask := &replicationTaskImpl{
sourceCluster: t.sourceCluster,
workflowKey: definition.NewWorkflowKey(
t.workflowKey.NamespaceID, t.workflowKey.WorkflowID, newRunID,
t.workflowKey.NamespaceID, t.workflowKey.WorkflowID, t.newRunID,
),
version: t.version,
firstEvent: newFirstEvent,
@@ -411,12 +428,14 @@ func (t *replicationTaskImpl) splitTask() (_ replicationTask, _ replicationTask,
eventTime: newEventTime,
baseWorkflowInfo: nil,
versionHistory: newVersionHistory,
events: [][]*historypb.HistoryEvent{newHistoryEvents},
events: [][]*historypb.HistoryEvent{t.newEvents},
newEvents: []*historypb.HistoryEvent{},
newRunID: "",
logger: logger,
}
t.newEvents = nil
t.newRunID = ""
return t, newRunTask, nil
}
@@ -455,6 +474,10 @@ func validateReplicateEventsRequest(
return events, nil, nil
}
// validation on NewRunId is done in newReplicationTask,
// so that some backward compatiblity logic can be used by
// newReplicationTaskFromBatch
newRunEvents, err := deserializeBlob(historySerializer, request.NewRunEvents)
if err != nil {
return nil, nil, err

View File

@@ -177,6 +177,7 @@ func (s *replicationTaskSuite) TestSkipDuplicatedEvents_ValidInput_SkipEvents()
nil,
[][]*historypb.HistoryEvent{slice1, slice2},
nil,
"",
)
err := task.skipDuplicatedEvents(1)
s.NoError(err)
@@ -216,6 +217,7 @@ func (s *replicationTaskSuite) TestSkipDuplicatedEvents_InvalidInput_ErrorOut()
nil,
[][]*historypb.HistoryEvent{slice1, slice2},
nil,
"",
)
err := task.skipDuplicatedEvents(2)
s.Error(err)
@@ -251,6 +253,7 @@ func (s *replicationTaskSuite) TestSkipDuplicatedEvents_ZeroInput_DoNothing() {
nil,
[][]*historypb.HistoryEvent{slice1, slice2},
nil,
"",
)
err := task.skipDuplicatedEvents(0)
s.NoError(err)

View File

@@ -242,6 +242,7 @@ func (r *StateRebuilderImpl) applyEvents(
},
[][]*historypb.HistoryEvent{events},
nil, // no new run history when rebuilding mutable state
"",
)
if err != nil {
r.logger.Error("StateRebuilder unable to Rebuild mutable state.", tag.Error(err))

View File

@@ -160,8 +160,8 @@ func (s *stateRebuilderSuite) TestApplyEvents() {
workflowKey := definition.NewWorkflowKey(s.namespaceID.String(), s.workflowID, s.runID)
mockStateBuilder := workflow.NewMockMutableStateRebuilder(s.controller)
mockStateBuilder.EXPECT().ApplyEvents(
mockStateRebuilder := workflow.NewMockMutableStateRebuilder(s.controller)
mockStateRebuilder.EXPECT().ApplyEvents(
gomock.Any(),
s.namespaceID,
requestID,
@@ -171,9 +171,10 @@ func (s *stateRebuilderSuite) TestApplyEvents() {
}),
[][]*historypb.HistoryEvent{events},
[]*historypb.HistoryEvent(nil),
"",
).Return(nil, nil)
err := s.nDCStateRebuilder.applyEvents(context.Background(), workflowKey, mockStateBuilder, events, requestID)
err := s.nDCStateRebuilder.applyEvents(context.Background(), workflowKey, mockStateRebuilder, events, requestID)
s.NoError(err)
}

View File

@@ -146,6 +146,7 @@ func newDLQHandler(
versionHistory,
[][]*historypb.HistoryEvent{events},
nil,
"",
)
},

View File

@@ -60,6 +60,7 @@ type (
versionHistoryItems []*historyspb.VersionHistoryItem,
historyEvents [][]*historypb.HistoryEvent,
newEvents []*historypb.HistoryEvent,
newRunID string,
) error
}
@@ -90,6 +91,7 @@ func (h *historyEventsHandlerImpl) HandleHistoryEvents(
versionHistoryItems []*historyspb.VersionHistoryItem,
historyEvents [][]*historypb.HistoryEvent,
newEvents []*historypb.HistoryEvent,
newRunID string,
) error {
if len(historyEvents) == 0 {
return serviceerror.NewInvalidArgument("Empty batches")
@@ -118,6 +120,7 @@ func (h *historyEventsHandlerImpl) HandleHistoryEvents(
versionHistoryItems,
remoteEvents,
newEvents,
newRunID,
); err != nil {
return err
}

View File

@@ -63,15 +63,15 @@ func (m *MockHistoryEventsHandler) EXPECT() *MockHistoryEventsHandlerMockRecorde
}
// HandleHistoryEvents mocks base method.
func (m *MockHistoryEventsHandler) HandleHistoryEvents(ctx context.Context, sourceClusterName string, workflowKey definition.WorkflowKey, baseExecutionInfo *workflow.BaseExecutionInfo, versionHistoryItems []*history0.VersionHistoryItem, historyEvents [][]*history.HistoryEvent, newEvents []*history.HistoryEvent) error {
func (m *MockHistoryEventsHandler) HandleHistoryEvents(ctx context.Context, sourceClusterName string, workflowKey definition.WorkflowKey, baseExecutionInfo *workflow.BaseExecutionInfo, versionHistoryItems []*history0.VersionHistoryItem, historyEvents [][]*history.HistoryEvent, newEvents []*history.HistoryEvent, newRunID string) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "HandleHistoryEvents", ctx, sourceClusterName, workflowKey, baseExecutionInfo, versionHistoryItems, historyEvents, newEvents)
ret := m.ctrl.Call(m, "HandleHistoryEvents", ctx, sourceClusterName, workflowKey, baseExecutionInfo, versionHistoryItems, historyEvents, newEvents, newRunID)
ret0, _ := ret[0].(error)
return ret0
}
// HandleHistoryEvents indicates an expected call of HandleHistoryEvents.
func (mr *MockHistoryEventsHandlerMockRecorder) HandleHistoryEvents(ctx, sourceClusterName, workflowKey, baseExecutionInfo, versionHistoryItems, historyEvents, newEvents interface{}) *gomock.Call {
func (mr *MockHistoryEventsHandlerMockRecorder) HandleHistoryEvents(ctx, sourceClusterName, workflowKey, baseExecutionInfo, versionHistoryItems, historyEvents, newEvents, newRunID interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandleHistoryEvents", reflect.TypeOf((*MockHistoryEventsHandler)(nil).HandleHistoryEvents), ctx, sourceClusterName, workflowKey, baseExecutionInfo, versionHistoryItems, historyEvents, newEvents)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandleHistoryEvents", reflect.TypeOf((*MockHistoryEventsHandler)(nil).HandleHistoryEvents), ctx, sourceClusterName, workflowKey, baseExecutionInfo, versionHistoryItems, historyEvents, newEvents, newRunID)
}

View File

@@ -123,6 +123,7 @@ func (s *historyEventHandlerSuite) TestHandleHistoryEvents_RemoteOnly() {
versionHistory.Items,
historyEvents,
nil,
"",
).Return(nil).Times(1)
err := s.historyEventHandler.HandleHistoryEvents(
@@ -133,6 +134,7 @@ func (s *historyEventHandlerSuite) TestHandleHistoryEvents_RemoteOnly() {
versionHistory.Items,
historyEvents,
nil,
"",
)
s.Nil(err)
}
@@ -188,6 +190,7 @@ func (s *historyEventHandlerSuite) TestHandleHistoryEvents_LocalOnly() {
versionHistory.Items,
[][]*historypb.HistoryEvent{historyEvents},
nil,
"",
)
s.Nil(err)
}
@@ -290,6 +293,7 @@ func (s *historyEventHandlerSuite) TestHandleHistoryEvents_LocalAndRemote_Handle
versionHistory.Items,
remoteHistoryEvents,
nil,
"",
).Return(nil).Times(1),
)
@@ -301,6 +305,7 @@ func (s *historyEventHandlerSuite) TestHandleHistoryEvents_LocalAndRemote_Handle
versionHistory.Items,
initialHistoryEvents,
nil,
"",
)
s.Nil(err)
}

View File

@@ -46,6 +46,7 @@ type (
versionHistoryItems []*historyspb.VersionHistoryItem,
historyEvents [][]*historypb.HistoryEvent,
newEvents []*historypb.HistoryEvent,
newRunID string,
) error
}
@@ -67,6 +68,7 @@ func (f futureEventsHandlerImpl) HandleRemoteGeneratedHistoryEvents(
versionHistoryItems []*historyspb.VersionHistoryItem,
historyEvents [][]*historypb.HistoryEvent,
newEvents []*historypb.HistoryEvent,
newRunID string,
) error {
shardContext, err := f.shardController.GetShardByNamespaceWorkflow(
namespace.ID(workflowKey.NamespaceID),
@@ -86,5 +88,6 @@ func (f futureEventsHandlerImpl) HandleRemoteGeneratedHistoryEvents(
versionHistoryItems,
historyEvents,
newEvents,
newRunID,
)
}

View File

@@ -63,15 +63,15 @@ func (m *MockRemoteGeneratedEventsHandler) EXPECT() *MockRemoteGeneratedEventsHa
}
// HandleRemoteGeneratedHistoryEvents mocks base method.
func (m *MockRemoteGeneratedEventsHandler) HandleRemoteGeneratedHistoryEvents(ctx context.Context, workflowKey definition.WorkflowKey, baseExecutionInfo *workflow.BaseExecutionInfo, versionHistoryItems []*history0.VersionHistoryItem, historyEvents [][]*history.HistoryEvent, newEvents []*history.HistoryEvent) error {
func (m *MockRemoteGeneratedEventsHandler) HandleRemoteGeneratedHistoryEvents(ctx context.Context, workflowKey definition.WorkflowKey, baseExecutionInfo *workflow.BaseExecutionInfo, versionHistoryItems []*history0.VersionHistoryItem, historyEvents [][]*history.HistoryEvent, newEvents []*history.HistoryEvent, newRunID string) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "HandleRemoteGeneratedHistoryEvents", ctx, workflowKey, baseExecutionInfo, versionHistoryItems, historyEvents, newEvents)
ret := m.ctrl.Call(m, "HandleRemoteGeneratedHistoryEvents", ctx, workflowKey, baseExecutionInfo, versionHistoryItems, historyEvents, newEvents, newRunID)
ret0, _ := ret[0].(error)
return ret0
}
// HandleRemoteGeneratedHistoryEvents indicates an expected call of HandleRemoteGeneratedHistoryEvents.
func (mr *MockRemoteGeneratedEventsHandlerMockRecorder) HandleRemoteGeneratedHistoryEvents(ctx, workflowKey, baseExecutionInfo, versionHistoryItems, historyEvents, newEvents interface{}) *gomock.Call {
func (mr *MockRemoteGeneratedEventsHandlerMockRecorder) HandleRemoteGeneratedHistoryEvents(ctx, workflowKey, baseExecutionInfo, versionHistoryItems, historyEvents, newEvents, newRunID interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandleRemoteGeneratedHistoryEvents", reflect.TypeOf((*MockRemoteGeneratedEventsHandler)(nil).HandleRemoteGeneratedHistoryEvents), ctx, workflowKey, baseExecutionInfo, versionHistoryItems, historyEvents, newEvents)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandleRemoteGeneratedHistoryEvents", reflect.TypeOf((*MockRemoteGeneratedEventsHandler)(nil).HandleRemoteGeneratedHistoryEvents), ctx, workflowKey, baseExecutionInfo, versionHistoryItems, historyEvents, newEvents, newRunID)
}

View File

@@ -112,6 +112,7 @@ func (s *futureEventsHandlerSuite) TestHandleFutureHistoryEvents() {
versionHistory.Items,
historyEvents,
nil,
"",
).Times(1)
err := s.futureEventHandler.HandleRemoteGeneratedHistoryEvents(
@@ -121,6 +122,7 @@ func (s *futureEventsHandlerSuite) TestHandleFutureHistoryEvents() {
versionHistory.Items,
historyEvents,
nil,
"",
)
s.Nil(err)
}

View File

@@ -58,6 +58,7 @@ type (
versionHistoryItems []*historyspb.VersionHistoryItem
eventsBlob *common.DataBlob
newRunEventsBlob *common.DataBlob
newRunID string
deserializeLock sync.Mutex
eventsDesResponse *eventsDeserializeResponse
@@ -99,6 +100,7 @@ func NewExecutableHistoryTask(
versionHistoryItems: task.VersionHistoryItems,
eventsBlob: task.GetEvents(),
newRunEventsBlob: task.GetNewRunEvents(),
newRunID: task.GetNewRunId(),
batchable: true,
}
}
@@ -159,6 +161,7 @@ func (e *ExecutableHistoryTask) Execute() error {
e.versionHistoryItems,
events,
newRunEvents,
e.newRunID,
)
}
@@ -170,6 +173,7 @@ func (e *ExecutableHistoryTask) Execute() error {
e.versionHistoryItems,
events,
newRunEvents,
e.newRunID,
)
}
@@ -351,6 +355,9 @@ func (e *ExecutableHistoryTask) BatchWith(incomingTask BatchableTask) (Trackable
err: nil,
},
batchable: true,
// we have validated that currentTask has no new run events in e.checkEvents(),
// so e.newRunID must be empty.
newRunID: incomingHistoryTask.newRunID,
}, true
}
@@ -387,12 +394,12 @@ func (e *ExecutableHistoryTask) validateIncomingBatchTask(incomingTask Batchable
return nil, err
}
events, newRunEvents, err := incomingHistoryTask.getDeserializedEvents()
events, _, err := incomingHistoryTask.getDeserializedEvents()
if err != nil {
return nil, err
}
if err = e.checkEvents(events, newRunEvents); err != nil {
if err = e.checkEvents(events); err != nil {
return nil, err
}
@@ -435,7 +442,9 @@ func (e *ExecutableHistoryTask) checkBaseExecutionInfo(incomingTaskExecutionInfo
return nil
}
func (e *ExecutableHistoryTask) checkEvents(incomingEventBatches [][]*historypb.HistoryEvent, incomingNewRunEvents []*historypb.HistoryEvent) error {
func (e *ExecutableHistoryTask) checkEvents(
incomingEventBatches [][]*historypb.HistoryEvent,
) error {
if len(incomingEventBatches) == 0 {
return serviceerror.NewInvalidArgument("incoming task is empty")
}

View File

@@ -84,6 +84,7 @@ type (
task *ExecutableHistoryTask
events []*historypb.HistoryEvent
newRunEvents []*historypb.HistoryEvent
newRunID string
processToolBox ProcessToolBox
}
)
@@ -129,6 +130,7 @@ func (s *executableHistoryTaskSuite) SetupTest() {
Version: version,
}}, enumspb.ENCODING_TYPE_PROTO3)
s.newRunEvents, _ = s.eventSerializer.DeserializeEvents(newEventsBlob)
s.newRunID = uuid.NewString()
s.replicationTask = &replicationspb.HistoryTaskAttributes{
NamespaceId: uuid.NewString(),
@@ -141,6 +143,7 @@ func (s *executableHistoryTaskSuite) SetupTest() {
}},
Events: eventsBlob,
NewRunEvents: newEventsBlob,
NewRunId: s.newRunID,
}
s.sourceClusterName = cluster.TestCurrentClusterName
@@ -194,6 +197,7 @@ func (s *executableHistoryTaskSuite) TestExecute_Process() {
s.task.versionHistoryItems,
[][]*historypb.HistoryEvent{s.events},
s.newRunEvents,
s.newRunID,
).Return(nil).Times(1)
err := s.task.Execute()
@@ -246,6 +250,7 @@ func (s *executableHistoryTaskSuite) TestHandleErr_Resend_Success() {
s.task.versionHistoryItems,
[][]*historypb.HistoryEvent{s.events},
s.newRunEvents,
s.newRunID,
).Return(nil)
err := serviceerrors.NewRetryReplication(
@@ -424,6 +429,20 @@ func (s *executableHistoryTaskSuite) TestBatchWith_CurrentTaskHasNewRunEvents_Ba
s.False(success)
}
func (s *executableHistoryTaskSuite) TestBatchWith_IncomingTaskHasNewRunEvents_BatchSuccess() {
currentTask, incomingTask := s.generateTwoBatchableTasks()
incomingTask.newRunID = uuid.NewString()
incomingTask.eventsDesResponse.newRunEvents = []*historypb.HistoryEvent{
{
EventId: 104,
Version: 3,
},
}
batchedTask, success := currentTask.BatchWith(incomingTask)
s.True(success)
s.Equal(incomingTask.newRunID, batchedTask.(*ExecutableHistoryTask).newRunID)
}
func (s *executableHistoryTaskSuite) generateTwoBatchableTasks() (*ExecutableHistoryTask, *ExecutableHistoryTask) {
currentEvent := [][]*historypb.HistoryEvent{
{
@@ -477,8 +496,8 @@ func (s *executableHistoryTaskSuite) generateTwoBatchableTasks() (*ExecutableHis
sourceCluster := uuid.NewString()
sourceTaskId := int64(111)
incomingTaskId := int64(120)
currentTask := s.buildExecutableHistoryTask(currentEvent, nil, sourceTaskId, currentVersionHistoryItems, workflowKeyCurrent, sourceCluster)
incomingTask := s.buildExecutableHistoryTask(incomingEvent, nil, incomingTaskId, incomingVersionHistoryItems, workflowKeyIncoming, sourceCluster)
currentTask := s.buildExecutableHistoryTask(currentEvent, nil, "", sourceTaskId, currentVersionHistoryItems, workflowKeyCurrent, sourceCluster)
incomingTask := s.buildExecutableHistoryTask(incomingEvent, nil, "", incomingTaskId, incomingVersionHistoryItems, workflowKeyIncoming, sourceCluster)
resultTask, batched := currentTask.BatchWith(incomingTask)
@@ -503,6 +522,7 @@ func (s *executableHistoryTaskSuite) generateTwoBatchableTasks() (*ExecutableHis
func (s *executableHistoryTaskSuite) buildExecutableHistoryTask(
events [][]*historypb.HistoryEvent,
newRunEvents []*historypb.HistoryEvent,
newRunID string,
taskId int64,
versionHistoryItems []*history.VersionHistoryItem,
workflowKey definition.WorkflowKey,
@@ -518,6 +538,7 @@ func (s *executableHistoryTaskSuite) buildExecutableHistoryTask(
VersionHistoryItems: versionHistoryItems,
Events: eventsBlob,
NewRunEvents: newRunEventsBlob,
NewRunId: newRunID,
}
executableTask := NewMockExecutableTask(s.controller)
executableTask.EXPECT().TaskID().Return(taskId).AnyTimes()

View File

@@ -205,6 +205,7 @@ func ndcHistoryResenderProvider(
versionHistory,
[][]*historypb.HistoryEvent{events},
nil,
"",
)
}
@@ -230,6 +231,7 @@ func ndcHistoryResenderProvider(
versionHistory,
[][]*historypb.HistoryEvent{events},
nil,
"",
)
},
serializer,

View File

@@ -264,6 +264,8 @@ func convertHistoryReplicationTask(
definition.NewWorkflowKey(taskInfo.NamespaceID, taskInfo.WorkflowID, taskInfo.NewRunID),
taskInfo.Version,
common.FirstEventID,
// when generating the replication task,
// we validated that new run contains only 1 replication task (event batch)
common.FirstEventID+1,
workflowCache,
eventBlobCache,
@@ -290,6 +292,7 @@ func convertHistoryReplicationTask(
VersionHistoryItems: currentVersionHistory,
Events: currentEvents,
NewRunEvents: newEvents,
NewRunId: taskInfo.NewRunID,
},
},
VisibilityTime: timestamppb.New(taskInfo.VisibilityTimestamp),

View File

@@ -84,7 +84,6 @@ type (
newWorkflowContext *workflow.MockContext
newMutableState *workflow.MockMutableState
newReleaseFn wcache.ReleaseCacheFunc
newLockReleased bool
}
)
@@ -718,6 +717,7 @@ func (s *rawTaskConverterSuite) TestConvertHistoryReplicationTask_WithNewRun() {
VersionHistoryItems: versionHistory.Items,
Events: events,
NewRunEvents: newEvents,
NewRunId: s.newRunID,
},
},
VisibilityTime: timestamppb.New(task.VisibilityTimestamp),
@@ -811,6 +811,7 @@ func (s *rawTaskConverterSuite) TestConvertHistoryReplicationTask_WithoutNewRun(
VersionHistoryItems: versionHistory.Items,
Events: events,
NewRunEvents: nil,
NewRunId: "",
},
},
VisibilityTime: timestamppb.New(task.VisibilityTimestamp),

View File

@@ -244,6 +244,7 @@ func (e *taskExecutorImpl) handleHistoryReplicationTask(
Events: attr.Events,
// new run events does not need version history since there is no prior events
NewRunEvents: attr.NewRunEvents,
NewRunId: attr.NewRunId,
}
ctx, cancel := e.newTaskContext(ctx, attr.NamespaceId)
defer cancel()

View File

@@ -401,6 +401,7 @@ func (p *taskProcessorImpl) convertTaskToDLQTask(
TaskType: enumsspb.TASK_TYPE_REPLICATION_SYNC_ACTIVITY,
ScheduledEventId: taskAttributes.GetScheduledEventId(),
Version: taskAttributes.GetVersion(),
VisibilityTime: replicationTask.GetVisibilityTime(),
},
}, nil
@@ -426,14 +427,17 @@ func (p *taskProcessorImpl) convertTaskToDLQTask(
ShardID: p.shard.GetShardID(),
SourceClusterName: p.sourceCluster,
TaskInfo: &persistencespb.ReplicationTaskInfo{
NamespaceId: taskAttributes.GetNamespaceId(),
WorkflowId: taskAttributes.GetWorkflowId(),
RunId: taskAttributes.GetRunId(),
TaskId: replicationTask.GetSourceTaskId(),
TaskType: enumsspb.TASK_TYPE_REPLICATION_HISTORY,
FirstEventId: firstEvent.GetEventId(),
NextEventId: nextEventID,
Version: firstEvent.GetVersion(),
NamespaceId: taskAttributes.GetNamespaceId(),
WorkflowId: taskAttributes.GetWorkflowId(),
RunId: taskAttributes.GetRunId(),
TaskId: replicationTask.GetSourceTaskId(),
TaskType: enumsspb.TASK_TYPE_REPLICATION_HISTORY,
FirstEventId: firstEvent.GetEventId(),
NextEventId: nextEventID,
Version: firstEvent.GetVersion(),
VisibilityTime: replicationTask.GetVisibilityTime(),
NewRunId: taskAttributes.GetNewRunId(),
// BranchToken & NewRunBranchToken should also be populated but are deprecated
},
}, nil
@@ -455,12 +459,13 @@ func (p *taskProcessorImpl) convertTaskToDLQTask(
ShardID: p.shard.GetShardID(),
SourceClusterName: p.sourceCluster,
TaskInfo: &persistencespb.ReplicationTaskInfo{
NamespaceId: executionInfo.GetNamespaceId(),
WorkflowId: executionInfo.GetWorkflowId(),
RunId: executionState.GetRunId(),
TaskId: replicationTask.GetSourceTaskId(),
TaskType: enumsspb.TASK_TYPE_REPLICATION_SYNC_WORKFLOW_STATE,
Version: lastItem.GetVersion(),
NamespaceId: executionInfo.GetNamespaceId(),
WorkflowId: executionInfo.GetWorkflowId(),
RunId: executionState.GetRunId(),
TaskId: replicationTask.GetSourceTaskId(),
TaskType: enumsspb.TASK_TYPE_REPLICATION_SYNC_WORKFLOW_STATE,
Version: lastItem.GetVersion(),
VisibilityTime: replicationTask.GetVisibilityTime(),
},
}, nil

View File

@@ -128,6 +128,7 @@ func NewTaskProcessorManager(
versionHistory,
[][]*historypb.HistoryEvent{events},
nil,
"",
)
},
shard.GetPayloadSerializer(),

View File

@@ -83,6 +83,7 @@ type (
versionHistoryItems []*historyspb.VersionHistoryItem,
historyEvents [][]*historypb.HistoryEvent,
newEvents []*historypb.HistoryEvent,
newRunID string,
) error
ReplicateEventsV2(ctx context.Context, request *historyservice.ReplicateEventsV2Request) error
ReplicateWorkflowState(ctx context.Context, request *historyservice.ReplicateWorkflowStateRequest) error

View File

@@ -613,17 +613,17 @@ func (mr *MockEngineMockRecorder) ReplicateEventsV2(ctx, request interface{}) *g
}
// ReplicateHistoryEvents mocks base method.
func (m *MockEngine) ReplicateHistoryEvents(ctx context.Context, workflowKey definition.WorkflowKey, baseExecutionInfo *workflow.BaseExecutionInfo, versionHistoryItems []*history0.VersionHistoryItem, historyEvents [][]*history.HistoryEvent, newEvents []*history.HistoryEvent) error {
func (m *MockEngine) ReplicateHistoryEvents(ctx context.Context, workflowKey definition.WorkflowKey, baseExecutionInfo *workflow.BaseExecutionInfo, versionHistoryItems []*history0.VersionHistoryItem, historyEvents [][]*history.HistoryEvent, newEvents []*history.HistoryEvent, newRunID string) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ReplicateHistoryEvents", ctx, workflowKey, baseExecutionInfo, versionHistoryItems, historyEvents, newEvents)
ret := m.ctrl.Call(m, "ReplicateHistoryEvents", ctx, workflowKey, baseExecutionInfo, versionHistoryItems, historyEvents, newEvents, newRunID)
ret0, _ := ret[0].(error)
return ret0
}
// ReplicateHistoryEvents indicates an expected call of ReplicateHistoryEvents.
func (mr *MockEngineMockRecorder) ReplicateHistoryEvents(ctx, workflowKey, baseExecutionInfo, versionHistoryItems, historyEvents, newEvents interface{}) *gomock.Call {
func (mr *MockEngineMockRecorder) ReplicateHistoryEvents(ctx, workflowKey, baseExecutionInfo, versionHistoryItems, historyEvents, newEvents, newRunID interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReplicateHistoryEvents", reflect.TypeOf((*MockEngine)(nil).ReplicateHistoryEvents), ctx, workflowKey, baseExecutionInfo, versionHistoryItems, historyEvents, newEvents)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReplicateHistoryEvents", reflect.TypeOf((*MockEngine)(nil).ReplicateHistoryEvents), ctx, workflowKey, baseExecutionInfo, versionHistoryItems, historyEvents, newEvents, newRunID)
}
// ReplicateWorkflowState mocks base method.

View File

@@ -41,11 +41,11 @@ type (
FirstEventID int64
NextEventID int64
Version int64
NewRunID string
// deprecated
BranchToken []byte
// deprecated
BranchToken []byte
NewRunBranchToken []byte
NewRunID string
}
)

View File

@@ -191,5 +191,6 @@ func NewDynamicConfig() *configs.Config {
config.EnableAPIGetCurrentRunIDLock = dynamicconfig.GetBoolPropertyFn(true)
config.FrontendAccessHistoryFraction = dynamicconfig.GetFloatPropertyFn(1.0)
config.EnableMutableStateTransitionHistory = dynamicconfig.GetBoolPropertyFn(true)
config.ReplicationEnableUpdateWithNewTaskMerge = dynamicconfig.GetBoolPropertyFn(true)
return config
}

View File

@@ -178,6 +178,7 @@ func (f *timerQueueFactory) CreateQueue(
versionHistory,
[][]*historypb.HistoryEvent{events},
nil,
"",
)
},
shard.GetPayloadSerializer(),

View File

@@ -174,6 +174,7 @@ func (f *transferQueueFactory) CreateQueue(
versionHistory,
[][]*historypb.HistoryEvent{events},
nil,
"",
)
},
shard.GetPayloadSerializer(),

View File

@@ -617,8 +617,7 @@ func (c *ContextImpl) UpdateWorkflowExecutionWithNew(
}
}
if err := c.mergeContinueAsNewReplicationTasks(
updateMode,
if err := c.mergeUpdateWithNewReplicationTasks(
updateWorkflow,
newWorkflow,
); err != nil {
@@ -698,48 +697,64 @@ func (c *ContextImpl) SubmitClosedWorkflowSnapshot(
)
}
func (c *ContextImpl) mergeContinueAsNewReplicationTasks(
updateMode persistence.UpdateWorkflowMode,
func (c *ContextImpl) mergeUpdateWithNewReplicationTasks(
currentWorkflowMutation *persistence.WorkflowMutation,
newWorkflowSnapshot *persistence.WorkflowSnapshot,
) error {
if currentWorkflowMutation.ExecutionState.Status != enumspb.WORKFLOW_EXECUTION_STATUS_CONTINUED_AS_NEW {
return nil
} else if updateMode == persistence.UpdateWorkflowModeBypassCurrent && newWorkflowSnapshot == nil {
// update current workflow as zombie & continue as new without new zombie workflow
// this case can be valid if new workflow is already created by resend
if newWorkflowSnapshot == nil {
return nil
}
// current workflow is doing continue as new
// namespace could be local or global with only one cluster,
// or current cluster is standby cluster for the namespace,
// so no replication task is generated.
//
// TODO: What does the following comment mean?
// it is possible that continue as new is done as part of passive logic
if len(currentWorkflowMutation.Tasks[tasks.CategoryReplication]) == 0 {
numCurrentReplicationTasks := len(currentWorkflowMutation.Tasks[tasks.CategoryReplication])
numNewReplicationTasks := len(newWorkflowSnapshot.Tasks[tasks.CategoryReplication])
if numCurrentReplicationTasks == 0 && numNewReplicationTasks == 0 {
return nil
}
if numCurrentReplicationTasks == 0 {
return serviceerror.NewInternal("current workflow has no replication task, while new workflow contains replication task")
}
if numNewReplicationTasks != 1 {
// TODO: support more than one replication tasks (batch of events) in the new workflow
return serviceerror.NewInternal("new workflow in update-with-new should contain exactly one replication task")
}
if currentWorkflowMutation.ExecutionState.Status != enumspb.WORKFLOW_EXECUTION_STATUS_CONTINUED_AS_NEW &&
!c.config.ReplicationEnableUpdateWithNewTaskMerge() {
// we need to make sure target cell is able to handle updateWithNew
// for non continuedAsNewcase before enabling this feature
return nil
}
if newWorkflowSnapshot == nil || len(newWorkflowSnapshot.Tasks[tasks.CategoryReplication]) != 1 {
return serviceerror.NewInternal("unable to find replication task from new workflow for continue as new replication")
}
// merge the new run first event batch replication task
// to current event batch replication task
// current workflow is closing with new workflow
// merge the new run's replication task to current workflow's replication task
// so that they can be applied transactionally in the standby cluster.
// TODO: this logic should be more generic so that the first replication task
// in the new run doesn't have to be HistoryReplicationTask
newRunTask := newWorkflowSnapshot.Tasks[tasks.CategoryReplication][0].(*tasks.HistoryReplicationTask)
delete(newWorkflowSnapshot.Tasks, tasks.CategoryReplication)
newRunBranchToken := newRunTask.BranchToken
newRunID := newRunTask.RunID
taskUpdated := false
for _, replicationTask := range currentWorkflowMutation.Tasks[tasks.CategoryReplication] {
for idx := numCurrentReplicationTasks - 1; idx >= 0; idx-- {
replicationTask := currentWorkflowMutation.Tasks[tasks.CategoryReplication][idx]
if task, ok := replicationTask.(*tasks.HistoryReplicationTask); ok {
taskUpdated = true
task.NewRunBranchToken = newRunBranchToken
task.NewRunID = newRunID
break
}
}
if !taskUpdated {
return serviceerror.NewInternal("unable to find replication task from current workflow for continue as new replication")
return serviceerror.NewInternal("unable to find HistoryReplicationTask from current workflow for update-with-new replication")
}
return nil
}

View File

@@ -0,0 +1,172 @@
// The MIT License
//
// Copyright (c) 2020 Temporal Technologies Inc. All rights reserved.
//
// Copyright (c) 2020 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
package workflow
import (
"testing"
"time"
"github.com/pborman/uuid"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
enumspb "go.temporal.io/api/enums/v1"
enumsspb "go.temporal.io/server/api/enums/v1"
persistencespb "go.temporal.io/server/api/persistence/v1"
"go.temporal.io/server/common/definition"
"go.temporal.io/server/common/log"
"go.temporal.io/server/common/metrics"
"go.temporal.io/server/common/persistence"
"go.temporal.io/server/service/history/tasks"
"go.temporal.io/server/service/history/tests"
)
type (
contextSuite struct {
suite.Suite
*require.Assertions
workflowContext *ContextImpl
}
)
func TestContextSuite(t *testing.T) {
suite.Run(t, new(contextSuite))
}
func (s *contextSuite) SetupTest() {
s.Assertions = require.New(s.T())
configs := tests.NewDynamicConfig()
s.workflowContext = NewContext(
configs,
tests.WorkflowKey,
log.NewNoopLogger(),
log.NewNoopLogger(),
metrics.NoopMetricsHandler,
)
}
func (s *contextSuite) TestMergeReplicationTasks_NoNewRun() {
currentWorkflowMutation := &persistence.WorkflowMutation{
ExecutionState: &persistencespb.WorkflowExecutionState{
Status: enumspb.WORKFLOW_EXECUTION_STATUS_RUNNING,
},
}
err := s.workflowContext.mergeUpdateWithNewReplicationTasks(
currentWorkflowMutation,
nil, // no new run
)
s.NoError(err)
s.Empty(currentWorkflowMutation.Tasks)
}
func (s *contextSuite) TestMergeReplicationTasks_LocalNamespace() {
currentWorkflowMutation := &persistence.WorkflowMutation{
ExecutionState: &persistencespb.WorkflowExecutionState{
Status: enumspb.WORKFLOW_EXECUTION_STATUS_COMPLETED,
State: enumsspb.WORKFLOW_EXECUTION_STATE_COMPLETED,
},
// no replication tasks
}
newWorkflowSnapshot := &persistence.WorkflowSnapshot{
ExecutionState: &persistencespb.WorkflowExecutionState{
Status: enumspb.WORKFLOW_EXECUTION_STATUS_RUNNING,
State: enumsspb.WORKFLOW_EXECUTION_STATE_RUNNING,
},
}
err := s.workflowContext.mergeUpdateWithNewReplicationTasks(
currentWorkflowMutation,
newWorkflowSnapshot,
)
s.NoError(err)
s.Empty(currentWorkflowMutation.Tasks) // verify no change to tasks
s.Empty(newWorkflowSnapshot.Tasks) // verify no change to tasks
}
func (s *contextSuite) TestMergeReplicationTasks_SingleReplicationTask() {
currentWorkflowMutation := &persistence.WorkflowMutation{
ExecutionState: &persistencespb.WorkflowExecutionState{
Status: enumspb.WORKFLOW_EXECUTION_STATUS_COMPLETED,
State: enumsspb.WORKFLOW_EXECUTION_STATE_COMPLETED,
},
Tasks: map[tasks.Category][]tasks.Task{
tasks.CategoryReplication: {
&tasks.HistoryReplicationTask{
WorkflowKey: tests.WorkflowKey,
VisibilityTimestamp: time.Now(),
FirstEventID: 5,
NextEventID: 10,
Version: tests.Version,
},
&tasks.HistoryReplicationTask{
WorkflowKey: tests.WorkflowKey,
VisibilityTimestamp: time.Now(),
FirstEventID: 10,
NextEventID: 20,
Version: tests.Version,
},
},
},
}
newRunID := uuid.New()
newWorkflowSnapshot := &persistence.WorkflowSnapshot{
ExecutionState: &persistencespb.WorkflowExecutionState{
Status: enumspb.WORKFLOW_EXECUTION_STATUS_RUNNING,
State: enumsspb.WORKFLOW_EXECUTION_STATE_RUNNING,
},
Tasks: map[tasks.Category][]tasks.Task{
tasks.CategoryReplication: {
&tasks.HistoryReplicationTask{
WorkflowKey: definition.NewWorkflowKey(
string(tests.NamespaceID),
tests.WorkflowID,
newRunID,
),
VisibilityTimestamp: time.Now(),
FirstEventID: 1,
NextEventID: 3,
Version: tests.Version,
},
},
},
}
err := s.workflowContext.mergeUpdateWithNewReplicationTasks(
currentWorkflowMutation,
newWorkflowSnapshot,
)
s.NoError(err)
s.Len(currentWorkflowMutation.Tasks[tasks.CategoryReplication], 2)
s.Empty(newWorkflowSnapshot.Tasks[tasks.CategoryReplication]) // verify no change to tasks
mergedReplicationTasks := currentWorkflowMutation.Tasks[tasks.CategoryReplication]
s.Empty(mergedReplicationTasks[0].(*tasks.HistoryReplicationTask).NewRunID)
s.Equal(newRunID, mergedReplicationTasks[1].(*tasks.HistoryReplicationTask).NewRunID)
}

View File

@@ -57,6 +57,7 @@ type (
execution *commonpb.WorkflowExecution,
history [][]*historypb.HistoryEvent,
newRunHistory []*historypb.HistoryEvent,
newRunID string,
) (MutableState, error)
}
@@ -99,14 +100,15 @@ func (b *MutableStateRebuilderImpl) ApplyEvents(
execution *commonpb.WorkflowExecution,
history [][]*historypb.HistoryEvent,
newRunHistory []*historypb.HistoryEvent,
newRunID string,
) (MutableState, error) {
for i := 0; i < len(history)-1; i++ {
_, err := b.applyEvents(ctx, namespaceID, requestID, execution, history[i], nil)
_, err := b.applyEvents(ctx, namespaceID, requestID, execution, history[i], nil, "")
if err != nil {
return nil, err
}
}
newMutableState, err := b.applyEvents(ctx, namespaceID, requestID, execution, history[len(history)-1], newRunHistory)
newMutableState, err := b.applyEvents(ctx, namespaceID, requestID, execution, history[len(history)-1], newRunHistory, newRunID)
if err != nil {
return nil, err
}
@@ -129,6 +131,7 @@ func (b *MutableStateRebuilderImpl) applyEvents(
execution *commonpb.WorkflowExecution,
history []*historypb.HistoryEvent,
newRunHistory []*historypb.HistoryEvent,
newRunID string,
) (MutableState, error) {
if len(history) == 0 {
@@ -136,7 +139,6 @@ func (b *MutableStateRebuilderImpl) applyEvents(
}
firstEvent := history[0]
lastEvent := history[len(history)-1]
var newRunMutableState MutableState
taskGenerator := taskGeneratorProvider.NewTaskGenerator(b.shard, b.mutableState)
@@ -624,45 +626,23 @@ func (b *MutableStateRebuilderImpl) applyEvents(
}
case enumspb.EVENT_TYPE_WORKFLOW_EXECUTION_CONTINUED_AS_NEW:
// The length of newRunHistory can be zero in resend case
if len(newRunHistory) != 0 {
newRunID := event.GetWorkflowExecutionContinuedAsNewEventAttributes().GetNewExecutionRunId()
newExecution := commonpb.WorkflowExecution{
WorkflowId: execution.WorkflowId,
RunId: newRunID,
}
newRunMutableState = NewMutableState(
b.shard,
b.shard.GetEventsCache(),
b.logger,
b.mutableState.GetNamespaceEntry(),
newExecution.WorkflowId,
newExecution.RunId,
timestamp.TimeValue(newRunHistory[0].GetEventTime()),
)
newRunStateBuilder := NewMutableStateRebuilder(b.shard, b.logger, newRunMutableState)
_, err := newRunStateBuilder.ApplyEvents(
ctx,
namespaceID,
uuid.New(),
&newExecution,
[][]*historypb.HistoryEvent{newRunHistory},
nil,
)
if err != nil {
return nil, err
}
// This is for backward compatibility, old replication tasks generated for continuedAsNew case
// doesn't have newRunID field set. In that case, we need to get newRunID from the last event.
continuedAsNewRunID := event.GetWorkflowExecutionContinuedAsNewEventAttributes().GetNewExecutionRunId()
if newRunID == "" {
newRunID = continuedAsNewRunID
} else if newRunID != continuedAsNewRunID {
return nil, serviceerror.NewInternal(fmt.Sprintf(
"ApplyEvents encounted newRunID mismatch for continuedAsNew event, task newRunID: %v, event newRunID: %v",
newRunID,
continuedAsNewRunID,
))
}
err := b.mutableState.ApplyWorkflowExecutionContinuedAsNewEvent(
if err := b.mutableState.ApplyWorkflowExecutionContinuedAsNewEvent(
firstEvent.GetEventId(),
event,
)
if err != nil {
); err != nil {
return nil, err
}
@@ -691,5 +671,58 @@ func (b *MutableStateRebuilderImpl) applyEvents(
return nil, serviceerror.NewInvalidArgument(fmt.Sprintf("Unknown event type: %v", event.GetEventType()))
}
}
// The length of newRunHistory can be zero in resend case
if len(newRunHistory) == 0 {
return nil, nil
}
if b.mutableState.GetExecutionState().Status == enumspb.WORKFLOW_EXECUTION_STATUS_RUNNING {
return nil, serviceerror.NewInternal("Cannot apply events for new run when current run is still running")
}
return b.applyNewRunHistory(
ctx,
namespaceID,
&commonpb.WorkflowExecution{
WorkflowId: execution.WorkflowId,
RunId: newRunID,
},
newRunHistory,
)
}
func (b *MutableStateRebuilderImpl) applyNewRunHistory(
ctx context.Context,
namespaceID namespace.ID,
newExecution *commonpb.WorkflowExecution,
newRunHistory []*historypb.HistoryEvent,
) (MutableState, error) {
newRunMutableState := NewMutableState(
b.shard,
b.shard.GetEventsCache(),
b.logger,
b.mutableState.GetNamespaceEntry(),
newExecution.WorkflowId,
newExecution.RunId,
timestamp.TimeValue(newRunHistory[0].GetEventTime()),
)
newRunStateBuilder := NewMutableStateRebuilder(b.shard, b.logger, newRunMutableState)
_, err := newRunStateBuilder.ApplyEvents(
ctx,
namespaceID,
uuid.New(),
newExecution,
[][]*historypb.HistoryEvent{newRunHistory},
nil,
"",
)
if err != nil {
return nil, err
}
return newRunMutableState, nil
}

View File

@@ -62,16 +62,16 @@ func (m *MockMutableStateRebuilder) EXPECT() *MockMutableStateRebuilderMockRecor
}
// ApplyEvents mocks base method.
func (m *MockMutableStateRebuilder) ApplyEvents(ctx context.Context, namespaceID namespace.ID, requestID string, execution *v1.WorkflowExecution, history [][]*v10.HistoryEvent, newRunHistory []*v10.HistoryEvent) (MutableState, error) {
func (m *MockMutableStateRebuilder) ApplyEvents(ctx context.Context, namespaceID namespace.ID, requestID string, execution *v1.WorkflowExecution, history [][]*v10.HistoryEvent, newRunHistory []*v10.HistoryEvent, newRunID string) (MutableState, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ApplyEvents", ctx, namespaceID, requestID, execution, history, newRunHistory)
ret := m.ctrl.Call(m, "ApplyEvents", ctx, namespaceID, requestID, execution, history, newRunHistory, newRunID)
ret0, _ := ret[0].(MutableState)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ApplyEvents indicates an expected call of ApplyEvents.
func (mr *MockMutableStateRebuilderMockRecorder) ApplyEvents(ctx, namespaceID, requestID, execution, history, newRunHistory interface{}) *gomock.Call {
func (mr *MockMutableStateRebuilderMockRecorder) ApplyEvents(ctx, namespaceID, requestID, execution, history, newRunHistory, newRunID interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplyEvents", reflect.TypeOf((*MockMutableStateRebuilder)(nil).ApplyEvents), ctx, namespaceID, requestID, execution, history, newRunHistory)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplyEvents", reflect.TypeOf((*MockMutableStateRebuilder)(nil).ApplyEvents), ctx, namespaceID, requestID, execution, history, newRunHistory, newRunID)
}

View File

@@ -211,7 +211,7 @@ func (s *stateBuilderSuite) TestApplyEvents_EventTypeWorkflowExecutionStarted_No
s.mockMutableState.EXPECT().ClearStickyTaskQueue()
s.mockMutableState.EXPECT().SetHistoryTree(nil, timestamp.DurationFromSeconds(100), tests.RunID).Return(nil)
_, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), nil)
_, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), nil, "")
s.Nil(err)
s.Equal(event.TaskId, s.executionInfo.LastEventTaskId)
}
@@ -260,7 +260,7 @@ func (s *stateBuilderSuite) TestApplyEvents_EventTypeWorkflowExecutionStarted_Wi
s.mockMutableState.EXPECT().ClearStickyTaskQueue()
s.mockMutableState.EXPECT().SetHistoryTree(nil, timestamp.DurationFromSeconds(100), tests.RunID).Return(nil)
_, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), nil)
_, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), nil, "")
s.Nil(err)
s.Equal(event.TaskId, s.executionInfo.LastEventTaskId)
}
@@ -292,11 +292,73 @@ func (s *stateBuilderSuite) TestApplyEvents_EventTypeWorkflowExecutionTimedOut()
).Return(nil)
s.mockMutableState.EXPECT().ClearStickyTaskQueue()
_, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), nil)
_, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), nil, "")
s.Nil(err)
s.Equal(event.TaskId, s.executionInfo.LastEventTaskId)
}
func (s *stateBuilderSuite) TestApplyEvents_EventTypeWorkflowExecutionTimedOut_WithNewRunHistory() {
version := int64(1)
requestID := uuid.New()
execution := &commonpb.WorkflowExecution{
WorkflowId: "some random workflow ID",
RunId: tests.RunID,
}
newRunID := uuid.New()
now := time.Now().UTC()
evenType := enumspb.EVENT_TYPE_WORKFLOW_EXECUTION_TIMED_OUT
event := &historypb.HistoryEvent{
TaskId: rand.Int63(),
Version: version,
EventId: 130,
EventTime: timestamppb.New(now),
EventType: evenType,
Attributes: &historypb.HistoryEvent_WorkflowExecutionTimedOutEventAttributes{
WorkflowExecutionTimedOutEventAttributes: &historypb.WorkflowExecutionTimedOutEventAttributes{
NewExecutionRunId: newRunID,
},
},
}
newRunStartedEvent := &historypb.HistoryEvent{
TaskId: rand.Int63(),
Version: version,
EventId: 1,
EventTime: timestamppb.New(now),
EventType: enumspb.EVENT_TYPE_WORKFLOW_EXECUTION_STARTED,
Attributes: &historypb.HistoryEvent_WorkflowExecutionStartedEventAttributes{WorkflowExecutionStartedEventAttributes: &historypb.WorkflowExecutionStartedEventAttributes{
WorkflowExecutionTimeout: durationpb.New(100 * time.Second),
WorkflowTaskTimeout: durationpb.New(10 * time.Second),
TaskQueue: &taskqueuepb.TaskQueue{Name: "some random taskqueue"},
WorkflowType: &commonpb.WorkflowType{Name: "some random workflow type"},
FirstWorkflowTaskBackoff: durationpb.New(10 * time.Second),
}},
}
newRunEvents := []*historypb.HistoryEvent{newRunStartedEvent}
s.mockMutableState.EXPECT().ApplyWorkflowExecutionTimedoutEvent(event.GetEventId(), protomock.Eq(event)).Return(nil)
s.mockMutableState.EXPECT().GetNamespaceEntry().Return(tests.GlobalNamespaceEntry).AnyTimes()
s.mockMutableState.EXPECT().GetExecutionState().Return(&persistencespb.WorkflowExecutionState{
CreateRequestId: uuid.New(),
State: enumsspb.WORKFLOW_EXECUTION_STATE_COMPLETED,
Status: enumspb.WORKFLOW_EXECUTION_STATUS_TIMED_OUT,
})
s.mockUpdateVersion(event)
s.mockTaskGenerator.EXPECT().GenerateWorkflowCloseTasks(
now,
false,
).Return(nil)
s.mockMutableState.EXPECT().ClearStickyTaskQueue()
s.setupMockForNewRunStartedEvent(newRunStartedEvent)
newRunStateBuilder, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), newRunEvents, newRunID)
s.Nil(err)
s.NotNil(newRunStateBuilder)
s.Equal(event.TaskId, s.executionInfo.LastEventTaskId)
}
func (s *stateBuilderSuite) TestApplyEvents_EventTypeWorkflowExecutionTerminated() {
version := int64(1)
requestID := uuid.New()
@@ -323,11 +385,68 @@ func (s *stateBuilderSuite) TestApplyEvents_EventTypeWorkflowExecutionTerminated
false,
).Return(nil)
s.mockMutableState.EXPECT().ClearStickyTaskQueue()
_, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), nil)
_, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), nil, "")
s.Nil(err)
s.Equal(event.TaskId, s.executionInfo.LastEventTaskId)
}
func (s *stateBuilderSuite) TestApplyEvents_EventTypeWorkflowExecutionTerminated_WithNewRunHistory() {
version := int64(1)
requestID := uuid.New()
execution := &commonpb.WorkflowExecution{
WorkflowId: "some random workflow ID",
RunId: tests.RunID,
}
now := time.Now().UTC()
evenType := enumspb.EVENT_TYPE_WORKFLOW_EXECUTION_TERMINATED
event := &historypb.HistoryEvent{
TaskId: rand.Int63(),
Version: version,
EventId: 130,
EventTime: timestamppb.New(now),
EventType: evenType,
Attributes: &historypb.HistoryEvent_WorkflowExecutionTerminatedEventAttributes{WorkflowExecutionTerminatedEventAttributes: &historypb.WorkflowExecutionTerminatedEventAttributes{}},
}
newRunStartedEvent := &historypb.HistoryEvent{
TaskId: rand.Int63(),
Version: version,
EventId: 1,
EventTime: timestamppb.New(now),
EventType: enumspb.EVENT_TYPE_WORKFLOW_EXECUTION_STARTED,
Attributes: &historypb.HistoryEvent_WorkflowExecutionStartedEventAttributes{WorkflowExecutionStartedEventAttributes: &historypb.WorkflowExecutionStartedEventAttributes{
WorkflowExecutionTimeout: durationpb.New(100 * time.Second),
WorkflowTaskTimeout: durationpb.New(10 * time.Second),
TaskQueue: &taskqueuepb.TaskQueue{Name: "some random taskqueue"},
WorkflowType: &commonpb.WorkflowType{Name: "some random workflow type"},
FirstWorkflowTaskBackoff: durationpb.New(10 * time.Second),
}},
}
newRunEvents := []*historypb.HistoryEvent{newRunStartedEvent}
s.mockMutableState.EXPECT().ApplyWorkflowExecutionTerminatedEvent(event.GetEventId(), protomock.Eq(event)).Return(nil)
s.mockMutableState.EXPECT().GetNamespaceEntry().Return(tests.GlobalNamespaceEntry).AnyTimes()
s.mockMutableState.EXPECT().GetExecutionState().Return(&persistencespb.WorkflowExecutionState{
CreateRequestId: uuid.New(),
State: enumsspb.WORKFLOW_EXECUTION_STATE_COMPLETED,
Status: enumspb.WORKFLOW_EXECUTION_STATUS_TERMINATED,
})
s.mockUpdateVersion(event)
s.mockTaskGenerator.EXPECT().GenerateWorkflowCloseTasks(
now,
false,
).Return(nil)
s.mockMutableState.EXPECT().ClearStickyTaskQueue()
s.setupMockForNewRunStartedEvent(newRunStartedEvent)
newRunStateBuilder, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), newRunEvents, uuid.New())
s.Nil(err)
s.NotNil(newRunStateBuilder)
s.Equal(event.TaskId, s.executionInfo.LastEventTaskId)
}
func (s *stateBuilderSuite) TestApplyEvents_EventTypeWorkflowExecutionFailed() {
version := int64(1)
requestID := uuid.New()
@@ -355,11 +474,73 @@ func (s *stateBuilderSuite) TestApplyEvents_EventTypeWorkflowExecutionFailed() {
).Return(nil)
s.mockMutableState.EXPECT().ClearStickyTaskQueue()
_, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), nil)
_, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), nil, "")
s.Nil(err)
s.Equal(event.TaskId, s.executionInfo.LastEventTaskId)
}
func (s *stateBuilderSuite) TestApplyEvents_EventTypeWorkflowExecutionFailed_WithNewRunHistory() {
version := int64(1)
requestID := uuid.New()
execution := &commonpb.WorkflowExecution{
WorkflowId: "some random workflow ID",
RunId: tests.RunID,
}
newRunID := uuid.New()
now := time.Now().UTC()
evenType := enumspb.EVENT_TYPE_WORKFLOW_EXECUTION_FAILED
event := &historypb.HistoryEvent{
TaskId: rand.Int63(),
Version: version,
EventId: 130,
EventTime: timestamppb.New(now),
EventType: evenType,
Attributes: &historypb.HistoryEvent_WorkflowExecutionFailedEventAttributes{
WorkflowExecutionFailedEventAttributes: &historypb.WorkflowExecutionFailedEventAttributes{
NewExecutionRunId: newRunID,
},
},
}
newRunStartedEvent := &historypb.HistoryEvent{
TaskId: rand.Int63(),
Version: version,
EventId: 1,
EventTime: timestamppb.New(now),
EventType: enumspb.EVENT_TYPE_WORKFLOW_EXECUTION_STARTED,
Attributes: &historypb.HistoryEvent_WorkflowExecutionStartedEventAttributes{WorkflowExecutionStartedEventAttributes: &historypb.WorkflowExecutionStartedEventAttributes{
WorkflowExecutionTimeout: durationpb.New(100 * time.Second),
WorkflowTaskTimeout: durationpb.New(10 * time.Second),
TaskQueue: &taskqueuepb.TaskQueue{Name: "some random taskqueue"},
WorkflowType: &commonpb.WorkflowType{Name: "some random workflow type"},
FirstWorkflowTaskBackoff: durationpb.New(10 * time.Second),
}},
}
newRunEvents := []*historypb.HistoryEvent{newRunStartedEvent}
s.mockMutableState.EXPECT().ApplyWorkflowExecutionFailedEvent(event.GetEventId(), protomock.Eq(event)).Return(nil)
s.mockMutableState.EXPECT().GetNamespaceEntry().Return(tests.GlobalNamespaceEntry).AnyTimes()
s.mockMutableState.EXPECT().GetExecutionState().Return(&persistencespb.WorkflowExecutionState{
CreateRequestId: uuid.New(),
State: enumsspb.WORKFLOW_EXECUTION_STATE_COMPLETED,
Status: enumspb.WORKFLOW_EXECUTION_STATUS_FAILED,
})
s.mockUpdateVersion(event)
s.mockTaskGenerator.EXPECT().GenerateWorkflowCloseTasks(
now,
false,
).Return(nil)
s.mockMutableState.EXPECT().ClearStickyTaskQueue()
s.setupMockForNewRunStartedEvent(newRunStartedEvent)
newRunStateBuilder, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), newRunEvents, newRunID)
s.Nil(err)
s.NotNil(newRunStateBuilder)
s.Equal(event.TaskId, s.executionInfo.LastEventTaskId)
}
func (s *stateBuilderSuite) TestApplyEvents_EventTypeWorkflowExecutionCompleted() {
version := int64(1)
requestID := uuid.New()
@@ -387,11 +568,73 @@ func (s *stateBuilderSuite) TestApplyEvents_EventTypeWorkflowExecutionCompleted(
).Return(nil)
s.mockMutableState.EXPECT().ClearStickyTaskQueue()
_, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), nil)
_, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), nil, "")
s.Nil(err)
s.Equal(event.TaskId, s.executionInfo.LastEventTaskId)
}
func (s *stateBuilderSuite) TestApplyEvents_EventTypeWorkflowExecutionCompleted_WithNewRunHistory() {
version := int64(1)
requestID := uuid.New()
execution := &commonpb.WorkflowExecution{
WorkflowId: "some random workflow ID",
RunId: tests.RunID,
}
newRunID := uuid.New()
now := time.Now().UTC()
evenType := enumspb.EVENT_TYPE_WORKFLOW_EXECUTION_COMPLETED
event := &historypb.HistoryEvent{
TaskId: rand.Int63(),
Version: version,
EventId: 130,
EventTime: timestamppb.New(now),
EventType: evenType,
Attributes: &historypb.HistoryEvent_WorkflowExecutionCompletedEventAttributes{
WorkflowExecutionCompletedEventAttributes: &historypb.WorkflowExecutionCompletedEventAttributes{
NewExecutionRunId: newRunID,
},
},
}
newRunStartedEvent := &historypb.HistoryEvent{
TaskId: rand.Int63(),
Version: version,
EventId: 1,
EventTime: timestamppb.New(now),
EventType: enumspb.EVENT_TYPE_WORKFLOW_EXECUTION_STARTED,
Attributes: &historypb.HistoryEvent_WorkflowExecutionStartedEventAttributes{WorkflowExecutionStartedEventAttributes: &historypb.WorkflowExecutionStartedEventAttributes{
WorkflowExecutionTimeout: durationpb.New(100 * time.Second),
WorkflowTaskTimeout: durationpb.New(10 * time.Second),
TaskQueue: &taskqueuepb.TaskQueue{Name: "some random taskqueue"},
WorkflowType: &commonpb.WorkflowType{Name: "some random workflow type"},
FirstWorkflowTaskBackoff: durationpb.New(10 * time.Second),
}},
}
newRunEvents := []*historypb.HistoryEvent{newRunStartedEvent}
s.mockMutableState.EXPECT().ApplyWorkflowExecutionCompletedEvent(event.GetEventId(), event).Return(nil)
s.mockMutableState.EXPECT().GetNamespaceEntry().Return(tests.GlobalNamespaceEntry).AnyTimes()
s.mockMutableState.EXPECT().GetExecutionState().Return(&persistencespb.WorkflowExecutionState{
CreateRequestId: uuid.New(),
State: enumsspb.WORKFLOW_EXECUTION_STATE_COMPLETED,
Status: enumspb.WORKFLOW_EXECUTION_STATUS_COMPLETED,
})
s.mockUpdateVersion(event)
s.mockTaskGenerator.EXPECT().GenerateWorkflowCloseTasks(
now,
false,
).Return(nil)
s.mockMutableState.EXPECT().ClearStickyTaskQueue()
s.setupMockForNewRunStartedEvent(newRunStartedEvent)
newRunStateBuilder, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), newRunEvents, newRunID)
s.Nil(err)
s.NotNil(newRunStateBuilder)
s.Equal(event.TaskId, s.executionInfo.LastEventTaskId)
}
func (s *stateBuilderSuite) TestApplyEvents_EventTypeWorkflowExecutionCanceled() {
version := int64(1)
requestID := uuid.New()
@@ -419,7 +662,7 @@ func (s *stateBuilderSuite) TestApplyEvents_EventTypeWorkflowExecutionCanceled()
).Return(nil)
s.mockMutableState.EXPECT().ClearStickyTaskQueue()
_, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), nil)
_, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), nil, "")
s.Nil(err)
s.Equal(event.TaskId, s.executionInfo.LastEventTaskId)
}
@@ -511,6 +754,11 @@ func (s *stateBuilderSuite) TestApplyEvents_EventTypeWorkflowExecutionContinuedA
).Return(nil)
s.mockMutableState.EXPECT().GetNamespaceEntry().Return(tests.GlobalNamespaceEntry).AnyTimes()
s.mockMutableState.EXPECT().GetWorkflowKey().Return(definition.NewWorkflowKey(tests.GlobalNamespaceEntry.ID().String(), execution.WorkflowId, execution.RunId)).AnyTimes()
s.mockMutableState.EXPECT().GetExecutionState().Return(&persistencespb.WorkflowExecutionState{
CreateRequestId: uuid.New(),
State: enumsspb.WORKFLOW_EXECUTION_STATE_COMPLETED,
Status: enumspb.WORKFLOW_EXECUTION_STATUS_CONTINUED_AS_NEW,
})
s.mockUpdateVersion(continueAsNewEvent)
s.mockTaskGenerator.EXPECT().GenerateWorkflowCloseTasks(
now,
@@ -534,7 +782,7 @@ func (s *stateBuilderSuite) TestApplyEvents_EventTypeWorkflowExecutionContinuedA
s.mockTaskGeneratorForNew.EXPECT().GenerateUserTimerTasks().Return(nil)
newRunStateBuilder, err := s.stateRebuilder.ApplyEvents(
context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(continueAsNewEvent), newRunEvents,
context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(continueAsNewEvent), newRunEvents, "",
)
s.Nil(err)
s.NotNil(newRunStateBuilder)
@@ -578,7 +826,7 @@ func (s *stateBuilderSuite) TestApplyEvents_EventTypeWorkflowExecutionContinuedA
// new workflow namespace
s.mockNamespaceCache.EXPECT().GetNamespace(tests.ParentNamespace).Return(tests.GlobalParentNamespaceEntry, nil).AnyTimes()
newRunStateBuilder, err := s.stateRebuilder.ApplyEvents(
context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(continueAsNewEvent), nil,
context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(continueAsNewEvent), nil, "",
)
s.Nil(err)
s.Nil(newRunStateBuilder)
@@ -608,7 +856,7 @@ func (s *stateBuilderSuite) TestApplyEvents_EventTypeWorkflowExecutionSignaled()
s.mockMutableState.EXPECT().ApplyWorkflowExecutionSignaled(protomock.Eq(event)).Return(nil)
s.mockMutableState.EXPECT().ClearStickyTaskQueue()
_, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), nil)
_, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), nil, "")
s.Nil(err)
s.Equal(event.TaskId, s.executionInfo.LastEventTaskId)
}
@@ -636,7 +884,7 @@ func (s *stateBuilderSuite) TestApplyEvents_EventTypeWorkflowExecutionCancelRequ
s.mockUpdateVersion(event)
s.mockMutableState.EXPECT().ClearStickyTaskQueue()
_, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), nil)
_, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), nil, "")
s.Nil(err)
s.Equal(event.TaskId, s.executionInfo.LastEventTaskId)
}
@@ -667,7 +915,7 @@ func (s *stateBuilderSuite) TestApplyEvents_EventTypeUpsertWorkflowSearchAttribu
s.mockTaskGenerator.EXPECT().GenerateUpsertVisibilityTask().Return(nil)
s.mockMutableState.EXPECT().ClearStickyTaskQueue()
_, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), nil)
_, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), nil, "")
s.Nil(err)
s.Equal(event.TaskId, s.executionInfo.LastEventTaskId)
}
@@ -698,7 +946,7 @@ func (s *stateBuilderSuite) TestApplyEvents_EventTypeWorkflowPropertiesModified(
s.mockTaskGenerator.EXPECT().GenerateUpsertVisibilityTask().Return(nil)
s.mockMutableState.EXPECT().ClearStickyTaskQueue()
_, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), nil)
_, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), nil, "")
s.Nil(err)
s.Equal(event.TaskId, s.executionInfo.LastEventTaskId)
}
@@ -725,7 +973,7 @@ func (s *stateBuilderSuite) TestApplyEvents_EventTypeMarkerRecorded() {
s.mockUpdateVersion(event)
s.mockMutableState.EXPECT().ClearStickyTaskQueue()
_, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), nil)
_, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), nil, "")
s.Nil(err)
s.Equal(event.TaskId, s.executionInfo.LastEventTaskId)
}
@@ -777,7 +1025,7 @@ func (s *stateBuilderSuite) TestApplyEvents_EventTypeWorkflowTaskScheduled() {
).Return(nil)
s.mockMutableState.EXPECT().ClearStickyTaskQueue()
_, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), nil)
_, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), nil, "")
s.Nil(err)
s.Equal(event.TaskId, s.executionInfo.LastEventTaskId)
}
@@ -826,7 +1074,7 @@ func (s *stateBuilderSuite) TestApplyEvents_EventTypeWorkflowTaskStarted() {
).Return(nil)
s.mockMutableState.EXPECT().ClearStickyTaskQueue()
_, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), nil)
_, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), nil, "")
s.Nil(err)
s.Equal(event.TaskId, s.executionInfo.LastEventTaskId)
}
@@ -871,7 +1119,7 @@ func (s *stateBuilderSuite) TestApplyEvents_EventTypeWorkflowTaskTimedOut() {
).Return(nil)
s.mockMutableState.EXPECT().ClearStickyTaskQueue()
_, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), nil)
_, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), nil, "")
s.Nil(err)
s.Equal(event.TaskId, s.executionInfo.LastEventTaskId)
}
@@ -915,7 +1163,7 @@ func (s *stateBuilderSuite) TestApplyEvents_EventTypeWorkflowTaskFailed() {
).Return(nil)
s.mockMutableState.EXPECT().ClearStickyTaskQueue()
_, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), nil)
_, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), nil, "")
s.Nil(err)
s.Equal(event.TaskId, s.executionInfo.LastEventTaskId)
}
@@ -948,7 +1196,7 @@ func (s *stateBuilderSuite) TestApplyEvents_EventTypeWorkflowTaskCompleted() {
s.mockUpdateVersion(event)
s.mockMutableState.EXPECT().ClearStickyTaskQueue()
_, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), nil)
_, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), nil, "")
s.Nil(err)
s.Equal(event.TaskId, s.executionInfo.LastEventTaskId)
}
@@ -993,7 +1241,7 @@ func (s *stateBuilderSuite) TestApplyEvents_EventTypeTimerStarted() {
// need to be refreshed each time
s.mockMutableState.EXPECT().ClearStickyTaskQueue()
_, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), nil)
_, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), nil, "")
s.Nil(err)
s.Equal(event.TaskId, s.executionInfo.LastEventTaskId)
}
@@ -1024,7 +1272,7 @@ func (s *stateBuilderSuite) TestApplyEvents_EventTypeTimerFired() {
// need to be refreshed each time
s.mockMutableState.EXPECT().ClearStickyTaskQueue()
_, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), nil)
_, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), nil, "")
s.Nil(err)
s.Equal(event.TaskId, s.executionInfo.LastEventTaskId)
}
@@ -1055,7 +1303,7 @@ func (s *stateBuilderSuite) TestApplyEvents_EventTypeTimerCanceled() {
// need to be refreshed each time
s.mockMutableState.EXPECT().ClearStickyTaskQueue()
_, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), nil)
_, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), nil, "")
s.Nil(err)
s.Equal(event.TaskId, s.executionInfo.LastEventTaskId)
}
@@ -1113,7 +1361,7 @@ func (s *stateBuilderSuite) TestApplyEvents_EventTypeActivityTaskScheduled() {
// need to be refreshed each time
s.mockMutableState.EXPECT().ClearStickyTaskQueue()
_, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), nil)
_, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), nil, "")
s.Nil(err)
s.Equal(event.TaskId, s.executionInfo.LastEventTaskId)
}
@@ -1156,7 +1404,7 @@ func (s *stateBuilderSuite) TestApplyEvents_EventTypeActivityTaskStarted() {
// need to be refreshed each time
s.mockMutableState.EXPECT().ClearStickyTaskQueue()
_, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(startedEvent), nil)
_, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(startedEvent), nil, "")
s.Nil(err)
s.Equal(startedEvent.TaskId, s.executionInfo.LastEventTaskId)
}
@@ -1188,7 +1436,7 @@ func (s *stateBuilderSuite) TestApplyEvents_EventTypeActivityTaskTimedOut() {
// // need to be refreshed each time
s.mockMutableState.EXPECT().ClearStickyTaskQueue()
_, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), nil)
_, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), nil, "")
s.Nil(err)
s.Equal(event.TaskId, s.executionInfo.LastEventTaskId)
}
@@ -1219,7 +1467,7 @@ func (s *stateBuilderSuite) TestApplyEvents_EventTypeActivityTaskFailed() {
// need to be refreshed each time
s.mockMutableState.EXPECT().ClearStickyTaskQueue()
_, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), nil)
_, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), nil, "")
s.Nil(err)
s.Equal(event.TaskId, s.executionInfo.LastEventTaskId)
}
@@ -1250,7 +1498,7 @@ func (s *stateBuilderSuite) TestApplyEvents_EventTypeActivityTaskCompleted() {
// need to be refreshed each time
s.mockMutableState.EXPECT().ClearStickyTaskQueue()
_, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), nil)
_, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), nil, "")
s.Nil(err)
s.Equal(event.TaskId, s.executionInfo.LastEventTaskId)
}
@@ -1278,7 +1526,7 @@ func (s *stateBuilderSuite) TestApplyEvents_EventTypeActivityTaskCancelRequested
s.mockUpdateVersion(event)
s.mockMutableState.EXPECT().ClearStickyTaskQueue()
_, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), nil)
_, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), nil, "")
s.Nil(err)
s.Equal(event.TaskId, s.executionInfo.LastEventTaskId)
}
@@ -1309,7 +1557,7 @@ func (s *stateBuilderSuite) TestApplyEvents_EventTypeActivityTaskCanceled() {
// need to be refreshed each time
s.mockMutableState.EXPECT().ClearStickyTaskQueue()
_, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), nil)
_, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), nil, "")
s.Nil(err)
s.Equal(event.TaskId, s.executionInfo.LastEventTaskId)
}
@@ -1362,7 +1610,7 @@ func (s *stateBuilderSuite) TestApplyEvents_EventTypeStartChildWorkflowExecution
).Return(nil)
s.mockMutableState.EXPECT().ClearStickyTaskQueue()
_, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), nil)
_, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), nil, "")
s.Nil(err)
s.Equal(event.TaskId, s.executionInfo.LastEventTaskId)
}
@@ -1390,7 +1638,7 @@ func (s *stateBuilderSuite) TestApplyEvents_EventTypeStartChildWorkflowExecution
s.mockUpdateVersion(event)
s.mockMutableState.EXPECT().ClearStickyTaskQueue()
_, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), nil)
_, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), nil, "")
s.Nil(err)
s.Equal(event.TaskId, s.executionInfo.LastEventTaskId)
}
@@ -1418,7 +1666,7 @@ func (s *stateBuilderSuite) TestApplyEvents_EventTypeChildWorkflowExecutionStart
s.mockUpdateVersion(event)
s.mockMutableState.EXPECT().ClearStickyTaskQueue()
_, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), nil)
_, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), nil, "")
s.Nil(err)
s.Equal(event.TaskId, s.executionInfo.LastEventTaskId)
}
@@ -1446,7 +1694,7 @@ func (s *stateBuilderSuite) TestApplyEvents_EventTypeChildWorkflowExecutionTimed
s.mockUpdateVersion(event)
s.mockMutableState.EXPECT().ClearStickyTaskQueue()
_, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), nil)
_, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), nil, "")
s.Nil(err)
s.Equal(event.TaskId, s.executionInfo.LastEventTaskId)
}
@@ -1474,7 +1722,7 @@ func (s *stateBuilderSuite) TestApplyEvents_EventTypeChildWorkflowExecutionTermi
s.mockUpdateVersion(event)
s.mockMutableState.EXPECT().ClearStickyTaskQueue()
_, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), nil)
_, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), nil, "")
s.Nil(err)
s.Equal(event.TaskId, s.executionInfo.LastEventTaskId)
}
@@ -1502,7 +1750,7 @@ func (s *stateBuilderSuite) TestApplyEvents_EventTypeChildWorkflowExecutionFaile
s.mockUpdateVersion(event)
s.mockMutableState.EXPECT().ClearStickyTaskQueue()
_, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), nil)
_, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), nil, "")
s.Nil(err)
s.Equal(event.TaskId, s.executionInfo.LastEventTaskId)
}
@@ -1530,7 +1778,7 @@ func (s *stateBuilderSuite) TestApplyEvents_EventTypeChildWorkflowExecutionCompl
s.mockUpdateVersion(event)
s.mockMutableState.EXPECT().ClearStickyTaskQueue()
_, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), nil)
_, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), nil, "")
s.Nil(err)
s.Equal(event.TaskId, s.executionInfo.LastEventTaskId)
}
@@ -1587,7 +1835,7 @@ func (s *stateBuilderSuite) TestApplyEvents_EventTypeRequestCancelExternalWorkfl
).Return(nil)
s.mockMutableState.EXPECT().ClearStickyTaskQueue()
_, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), nil)
_, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), nil, "")
s.Nil(err)
s.Equal(event.TaskId, s.executionInfo.LastEventTaskId)
}
@@ -1615,7 +1863,7 @@ func (s *stateBuilderSuite) TestApplyEvents_EventTypeRequestCancelExternalWorkfl
s.mockUpdateVersion(event)
s.mockMutableState.EXPECT().ClearStickyTaskQueue()
_, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), nil)
_, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), nil, "")
s.Nil(err)
s.Equal(event.TaskId, s.executionInfo.LastEventTaskId)
}
@@ -1643,7 +1891,7 @@ func (s *stateBuilderSuite) TestApplyEvents_EventTypeExternalWorkflowExecutionCa
s.mockUpdateVersion(event)
s.mockMutableState.EXPECT().ClearStickyTaskQueue()
_, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), nil)
_, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), nil, "")
s.Nil(err)
s.Equal(event.TaskId, s.executionInfo.LastEventTaskId)
}
@@ -1671,7 +1919,7 @@ func (s *stateBuilderSuite) TestApplyEvents_EventTypeChildWorkflowExecutionCance
s.mockUpdateVersion(event)
s.mockMutableState.EXPECT().ClearStickyTaskQueue()
_, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), nil)
_, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), nil, "")
s.Nil(err)
s.Equal(event.TaskId, s.executionInfo.LastEventTaskId)
}
@@ -1734,7 +1982,7 @@ func (s *stateBuilderSuite) TestApplyEvents_EventTypeSignalExternalWorkflowExecu
).Return(nil)
s.mockMutableState.EXPECT().ClearStickyTaskQueue()
_, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), nil)
_, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), nil, "")
s.Nil(err)
s.Equal(event.TaskId, s.executionInfo.LastEventTaskId)
}
@@ -1762,7 +2010,7 @@ func (s *stateBuilderSuite) TestApplyEvents_EventTypeSignalExternalWorkflowExecu
s.mockUpdateVersion(event)
s.mockMutableState.EXPECT().ClearStickyTaskQueue()
_, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), nil)
_, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), nil, "")
s.Nil(err)
s.Equal(event.TaskId, s.executionInfo.LastEventTaskId)
}
@@ -1790,7 +2038,7 @@ func (s *stateBuilderSuite) TestApplyEvents_EventTypeExternalWorkflowExecutionSi
s.mockUpdateVersion(event)
s.mockMutableState.EXPECT().ClearStickyTaskQueue()
_, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), nil)
_, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), nil, "")
s.Nil(err)
s.Equal(event.TaskId, s.executionInfo.LastEventTaskId)
}
@@ -1822,7 +2070,7 @@ func (s *stateBuilderSuite) TestApplyEvents_EventTypeWorkflowExecutionUpdateAcce
s.mockUpdateVersion(event)
s.mockMutableState.EXPECT().ClearStickyTaskQueue()
_, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), nil)
_, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), nil, "")
s.NoError(err)
s.Equal(event.TaskId, s.executionInfo.LastEventTaskId)
}
@@ -1852,11 +2100,33 @@ func (s *stateBuilderSuite) TestApplyEvents_EventTypeWorkflowExecutionUpdateComp
s.mockUpdateVersion(event)
s.mockMutableState.EXPECT().ClearStickyTaskQueue()
_, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), nil)
_, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), nil, "")
s.NoError(err)
s.Equal(event.TaskId, s.executionInfo.LastEventTaskId)
}
func (s *stateBuilderSuite) setupMockForNewRunStartedEvent(
newRunStartedEvent *historypb.HistoryEvent,
) {
s.mockTaskGeneratorForNew.EXPECT().GenerateRecordWorkflowStartedTasks(
protomock.Eq(newRunStartedEvent),
).Return(nil)
s.mockTaskGeneratorForNew.EXPECT().GenerateWorkflowStartTasks(
protomock.Eq(newRunStartedEvent),
).Return(nil)
backoffDuration := newRunStartedEvent.GetWorkflowExecutionStartedEventAttributes().GetFirstWorkflowTaskBackoff().AsDuration()
if backoffDuration > 0 {
s.mockTaskGeneratorForNew.EXPECT().GenerateDelayedWorkflowTasks(
protomock.Eq(newRunStartedEvent),
).Return(nil)
}
s.mockTaskGeneratorForNew.EXPECT().GenerateActivityTimerTasks().Return(nil)
s.mockTaskGeneratorForNew.EXPECT().GenerateUserTimerTasks().Return(nil)
}
func (p *testTaskGeneratorProvider) NewTaskGenerator(
_ shard.Context,
mutableState MutableState,

View File

@@ -2091,16 +2091,17 @@ func (s *NDCFunctionalTestSuite) generateNewRunHistory(
version int64,
workflowType string,
taskQueue string,
) *commonpb.DataBlob {
) (*commonpb.DataBlob, string) {
// TODO temporary code to generate first event & version history
// we should generate these as part of modeled based testing
if event.GetWorkflowExecutionContinuedAsNewEventAttributes() == nil {
return nil
return nil, ""
}
event.GetWorkflowExecutionContinuedAsNewEventAttributes().NewExecutionRunId = uuid.New()
newRunID := uuid.New()
event.GetWorkflowExecutionContinuedAsNewEventAttributes().NewExecutionRunId = newRunID
newRunFirstEvent := &historypb.HistoryEvent{
EventId: common.FirstEventID,
@@ -2127,13 +2128,14 @@ func (s *NDCFunctionalTestSuite) generateNewRunHistory(
FirstExecutionRunId: runID,
Attempt: 1,
WorkflowExecutionExpirationTime: timestamppb.New(time.Now().UTC().Add(time.Minute)),
WorkflowId: workflowID,
}},
}
eventBlob, err := s.serializer.SerializeEvents([]*historypb.HistoryEvent{newRunFirstEvent}, enumspb.ENCODING_TYPE_PROTO3)
s.NoError(err)
return eventBlob
return eventBlob, newRunID
}
func (s *NDCFunctionalTestSuite) generateEventBlobs(
@@ -2142,18 +2144,18 @@ func (s *NDCFunctionalTestSuite) generateEventBlobs(
workflowType string,
taskqueue string,
batch *historypb.History,
) (*commonpb.DataBlob, *commonpb.DataBlob) {
) (*commonpb.DataBlob, *commonpb.DataBlob, string) {
// TODO temporary code to generate next run first event
// we should generate these as part of modeled based testing
lastEvent := batch.Events[len(batch.Events)-1]
newRunEventBlob := s.generateNewRunHistory(
newRunEventBlob, newRunID := s.generateNewRunHistory(
lastEvent, s.namespace, s.namespaceID, workflowID, runID, lastEvent.GetVersion(), workflowType, taskqueue,
)
// must serialize events batch after attempt on continue as new as generateNewRunHistory will
// modify the NewExecutionRunId attr
eventBlob, err := s.serializer.SerializeEvents(batch.Events, enumspb.ENCODING_TYPE_PROTO3)
s.NoError(err)
return eventBlob, newRunEventBlob
return eventBlob, newRunEventBlob, newRunID
}
func (s *NDCFunctionalTestSuite) applyEvents(
@@ -2171,7 +2173,7 @@ func (s *NDCFunctionalTestSuite) applyEvents(
common.IsServiceClientTransientError,
)
for _, batch := range eventBatches {
eventBlob, newRunEventBlob := s.generateEventBlobs(workflowID, runID, workflowType, taskqueue, batch)
eventBlob, newRunEventBlob, newRunID := s.generateEventBlobs(workflowID, runID, workflowType, taskqueue, batch)
req := &historyservice.ReplicateEventsV2Request{
NamespaceId: s.namespaceID.String(),
WorkflowExecution: &commonpb.WorkflowExecution{
@@ -2181,6 +2183,7 @@ func (s *NDCFunctionalTestSuite) applyEvents(
VersionHistoryItems: versionHistory.GetItems(),
Events: eventBlob,
NewRunEvents: newRunEventBlob,
NewRunId: newRunID,
}
resp, err := historyClient.ReplicateEventsV2(s.newContext(), req)
@@ -2213,7 +2216,7 @@ func (s *NDCFunctionalTestSuite) importEvents(
)
var token []byte
for _, batch := range eventBatches {
eventBlob, _ := s.generateEventBlobs(workflowID, runID, workflowType, taskqueue, batch)
eventBlob, _, _ := s.generateEventBlobs(workflowID, runID, workflowType, taskqueue, batch)
req := &historyservice.ImportWorkflowExecutionRequest{
NamespaceId: s.namespaceID.String(),
Execution: &commonpb.WorkflowExecution{
@@ -2264,7 +2267,7 @@ func (s *NDCFunctionalTestSuite) applyEventsThroughFetcher(
eventBatches []*historypb.History,
) {
for _, batch := range eventBatches {
eventBlob, newRunEventBlob := s.generateEventBlobs(workflowID, runID, workflowType, taskqueue, batch)
eventBlob, newRunEventBlob, newRunID := s.generateEventBlobs(workflowID, runID, workflowType, taskqueue, batch)
taskType := enumsspb.REPLICATION_TASK_TYPE_HISTORY_V2_TASK
replicationTask := &replicationspb.ReplicationTask{
@@ -2278,6 +2281,7 @@ func (s *NDCFunctionalTestSuite) applyEventsThroughFetcher(
VersionHistoryItems: versionHistory.GetItems(),
Events: eventBlob,
NewRunEvents: newRunEventBlob,
NewRunId: newRunID,
}},
}