Skip to content

Commit

Permalink
Add sync match hint
Browse files Browse the repository at this point in the history
  • Loading branch information
Sushisource committed Aug 20, 2024
1 parent 4521cd5 commit 3e9e185
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 0 deletions.
12 changes: 12 additions & 0 deletions openapi/openapiv2.json
Original file line number Diff line number Diff line change
Expand Up @@ -8868,6 +8868,10 @@
"retryPolicy": {
"$ref": "#/definitions/v1RetryPolicy",
"description": "This is the retry policy the service uses which may be different from the one provided\n(or not) during activity scheduling. The service can override the provided one if some\nvalues are not specified or exceed configured system limits."
},
"syncMatchWaitDuration": {
"type": "string",
"description": "This field is set if the task was delivered as a result of a sync match, and it is set to the\namount of time we waited to make such a match. If the task was delievered from the blacklog,\nthen the field is unset."
}
}
},
Expand All @@ -8882,6 +8886,10 @@
"request": {
"$ref": "#/definitions/apinexusv1Request",
"description": "Embedded request as translated from the incoming frontend request."
},
"syncMatchWaitDuration": {
"type": "string",
"description": "This field is set if the task was delivered as a result of a sync match, and it is set to the\namount of time we waited to make such a match. If the task was delievered from the blacklog,\nthen the field is unset."
}
}
},
Expand Down Expand Up @@ -8977,6 +8985,10 @@
"$ref": "#/definitions/v1Message"
},
"title": "Protocol messages piggybacking on a WFT as a transport"
},
"syncMatchWaitDuration": {
"type": "string",
"description": "This field is set if the task was delivered as a result of a sync match, and it is set to the\namount of time we waited to make such a match. If the task was delievered from the blacklog,\nthen the field is unset."
}
}
},
Expand Down
7 changes: 7 additions & 0 deletions openapi/openapiv3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6590,6 +6590,13 @@ components:
items:
$ref: '#/components/schemas/Message'
description: Protocol messages piggybacking on a WFT as a transport
syncMatchWaitDuration:
pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$
type: string
description: |-
This field is set if the task was delivered as a result of a sync match, and it is set to the
amount of time we waited to make such a match. If the task was delievered from the blacklog,
then the field is unset.
PollerInfo:
type: object
properties:
Expand Down
12 changes: 12 additions & 0 deletions temporal/api/workflowservice/v1/request_response.proto
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,10 @@ message PollWorkflowTaskQueueResponse {
map<string, temporal.api.query.v1.WorkflowQuery> queries = 14;
// Protocol messages piggybacking on a WFT as a transport
repeated temporal.api.protocol.v1.Message messages = 15;
// This field is set if the task was delivered as a result of a sync match, and it is set to the
// amount of time we waited to make such a match. If the task was delievered from the blacklog,
// then the field is unset.
google.protobuf.Duration sync_match_wait_duration = 16;
}

message RespondWorkflowTaskCompletedRequest {
Expand Down Expand Up @@ -445,6 +449,10 @@ message PollActivityTaskQueueResponse {
// (or not) during activity scheduling. The service can override the provided one if some
// values are not specified or exceed configured system limits.
temporal.api.common.v1.RetryPolicy retry_policy = 17;
// This field is set if the task was delivered as a result of a sync match, and it is set to the
// amount of time we waited to make such a match. If the task was delievered from the blacklog,
// then the field is unset.
google.protobuf.Duration sync_match_wait_duration = 18;
}

message RecordActivityTaskHeartbeatRequest {
Expand Down Expand Up @@ -1586,6 +1594,10 @@ message PollNexusTaskQueueResponse {
bytes task_token = 1;
// Embedded request as translated from the incoming frontend request.
temporal.api.nexus.v1.Request request = 2;
// This field is set if the task was delivered as a result of a sync match, and it is set to the
// amount of time we waited to make such a match. If the task was delievered from the blacklog,
// then the field is unset.
google.protobuf.Duration sync_match_wait_duration = 3;
}

message RespondNexusTaskCompletedRequest {
Expand Down

0 comments on commit 3e9e185

Please sign in to comment.