Skip to content

Commit

Permalink
Add Worker Deployment Search Attributes (#7199)
Browse files Browse the repository at this point in the history
## What changed?
Add TemporalWorkerDeploymentVersion, TemporalWorkerDeployment, and
TemporalWorkflowVersioningBehavior Search Attributes

## Why?
To be able to list workflows based on their behavior, deployment, and
most recently used deployment version.

## How did you test it?
<!-- How have you verified this change? Tested locally? Added a unit
test? Checked in staging env? -->

## Potential risks
<!-- Assuming the worst case, what can be broken when deploying this
change to production? -->

## 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/`? -->

## Is hotfix candidate?
<!-- Is this PR a hotfix candidate or does it require a notification to
be sent to the broader community? (Yes/No) -->

---------

Co-authored-by: Shivam Saraf <[email protected]>
Co-authored-by: Rodrigo Zhou <[email protected]>
  • Loading branch information
3 people authored Feb 6, 2025
1 parent 2ade39c commit 8b0d8f0
Show file tree
Hide file tree
Showing 13 changed files with 256 additions and 17 deletions.
43 changes: 32 additions & 11 deletions common/searchattribute/defs.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,26 @@ const (
// * "Reason:ManualWorkflowPause"
TemporalPauseInfo = "TemporalPauseInfo"

// Used for Worker Versioning
// BuildIds is a KeywordList that holds information about current and past build ids
// used by the workflow. Used for Worker Versioning
BuildIds = "BuildIds"

// TemporalWorkerDeploymentVersion stores the current Worker Deployment Version
// associated with the execution. It is updated at workflow task completion when
// the SDK says what Version completed the workflow task. It can have a value for
// unversioned workflows, if they are processed by an unversioned deployment.
TemporalWorkerDeploymentVersion = "TemporalWorkerDeploymentVersion"

// TemporalWorkerDeployment stores the current Worker Deployment associated with
// the execution. It is updated at workflow task completion when the SDK says what
// Worker Deployment completed the workflow task. It can have a value for
// unversioned workflows, if they are processed by an unversioned deployment.
TemporalWorkerDeployment = "TemporalWorkerDeployment"

// TemporalWorkflowVersioningBehavior stores the current Versioning Behavior of the
// execution. It is updated at workflow task completion when the server gets the
// behavior (`auto_upgrade` or `pinned`) from the SDK. Empty for unversioned workflows.
TemporalWorkflowVersioningBehavior = "TemporalWorkflowVersioningBehavior"
)

var (
Expand All @@ -123,16 +141,19 @@ var (

// predefined are internal search attributes which are passed and stored in SearchAttributes object together with custom search attributes.
predefined = map[string]enumspb.IndexedValueType{
TemporalChangeVersion: enumspb.INDEXED_VALUE_TYPE_KEYWORD_LIST,
BinaryChecksums: enumspb.INDEXED_VALUE_TYPE_KEYWORD_LIST,
BuildIds: enumspb.INDEXED_VALUE_TYPE_KEYWORD_LIST,
BatcherNamespace: enumspb.INDEXED_VALUE_TYPE_KEYWORD,
BatcherUser: enumspb.INDEXED_VALUE_TYPE_KEYWORD,
TemporalScheduledStartTime: enumspb.INDEXED_VALUE_TYPE_DATETIME,
TemporalScheduledById: enumspb.INDEXED_VALUE_TYPE_KEYWORD,
TemporalSchedulePaused: enumspb.INDEXED_VALUE_TYPE_BOOL,
TemporalNamespaceDivision: enumspb.INDEXED_VALUE_TYPE_KEYWORD,
TemporalPauseInfo: enumspb.INDEXED_VALUE_TYPE_KEYWORD_LIST,
TemporalChangeVersion: enumspb.INDEXED_VALUE_TYPE_KEYWORD_LIST,
BinaryChecksums: enumspb.INDEXED_VALUE_TYPE_KEYWORD_LIST,
BuildIds: enumspb.INDEXED_VALUE_TYPE_KEYWORD_LIST,
BatcherNamespace: enumspb.INDEXED_VALUE_TYPE_KEYWORD,
BatcherUser: enumspb.INDEXED_VALUE_TYPE_KEYWORD,
TemporalScheduledStartTime: enumspb.INDEXED_VALUE_TYPE_DATETIME,
TemporalScheduledById: enumspb.INDEXED_VALUE_TYPE_KEYWORD,
TemporalSchedulePaused: enumspb.INDEXED_VALUE_TYPE_BOOL,
TemporalNamespaceDivision: enumspb.INDEXED_VALUE_TYPE_KEYWORD,
TemporalPauseInfo: enumspb.INDEXED_VALUE_TYPE_KEYWORD_LIST,
TemporalWorkerDeploymentVersion: enumspb.INDEXED_VALUE_TYPE_KEYWORD,
TemporalWorkflowVersioningBehavior: enumspb.INDEXED_VALUE_TYPE_KEYWORD,
TemporalWorkerDeployment: enumspb.INDEXED_VALUE_TYPE_KEYWORD,
}

// reserved are internal field names that can't be used as search attribute names.
Expand Down
2 changes: 1 addition & 1 deletion schema/elasticsearch/visibility/index_template_v7.json
111 changes: 111 additions & 0 deletions schema/elasticsearch/visibility/versioned/v9/index_template_v7.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
{
"order": 0,
"index_patterns": ["temporal_visibility_v1*"],
"settings": {
"index": {
"number_of_shards": "1",
"number_of_replicas": "0",
"auto_expand_replicas": "0-2",
"search.idle.after": "365d",
"sort.field": ["CloseTime", "StartTime", "RunId"],
"sort.order": ["desc", "desc", "desc"],
"sort.missing": ["_first", "_first", "_first"]
}
},
"mappings": {
"dynamic": "false",
"properties": {
"NamespaceId": {
"type": "keyword"
},
"TemporalNamespaceDivision": {
"type": "keyword"
},
"WorkflowId": {
"type": "keyword"
},
"RunId": {
"type": "keyword"
},
"WorkflowType": {
"type": "keyword"
},
"StartTime": {
"type": "date_nanos"
},
"ExecutionTime": {
"type": "date_nanos"
},
"CloseTime": {
"type": "date_nanos"
},
"ExecutionDuration": {
"type": "long"
},
"ExecutionStatus": {
"type": "keyword"
},
"TaskQueue": {
"type": "keyword"
},
"TemporalChangeVersion": {
"type": "keyword"
},
"BatcherNamespace": {
"type": "keyword"
},
"BatcherUser": {
"type": "keyword"
},
"BinaryChecksums": {
"type": "keyword"
},
"HistoryLength": {
"type": "long"
},
"StateTransitionCount": {
"type": "long"
},
"TemporalScheduledStartTime": {
"type": "date_nanos"
},
"TemporalScheduledById": {
"type": "keyword"
},
"TemporalSchedulePaused": {
"type": "boolean"
},
"HistorySizeBytes": {
"type": "long"
},
"BuildIds": {
"type": "keyword"
},
"ParentWorkflowId": {
"type": "keyword"
},
"ParentRunId": {
"type": "keyword"
},
"RootWorkflowId": {
"type": "keyword"
},
"RootRunId": {
"type": "keyword"
},
"TemporalPauseInfo": {
"type": "keyword"
},
"TemporalWorkerDeploymentVersion": {
"type": "keyword"
},
"TemporalWorkflowVersioningBehavior": {
"type": "keyword"
},
"TemporalWorkerDeployment": {
"type": "keyword"
}
}
},
"aliases": {}
}
60 changes: 60 additions & 0 deletions schema/elasticsearch/visibility/versioned/v9/upgrade.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
#!/usr/bin/env bash

set -eu -o pipefail

# Prerequisites:
# - jq
# - curl

# Input parameters.
: "${ES_SCHEME:=http}"
: "${ES_SERVER:=127.0.0.1}"
: "${ES_PORT:=9200}"
: "${ES_USER:=}"
: "${ES_PWD:=}"
: "${ES_VERSION:=v7}"
: "${ES_VIS_INDEX_V1:=temporal_visibility_v1_dev}"
: "${AUTO_CONFIRM:=}"
: "${SLICES_COUNT:=auto}"

es_endpoint="${ES_SCHEME}://${ES_SERVER}:${ES_PORT}"

echo "=== Step 0. Sanity check if Elasticsearch index is accessible ==="

if ! curl --silent --fail --user "${ES_USER}":"${ES_PWD}" "${es_endpoint}/${ES_VIS_INDEX_V1}/_stats/docs" --write-out "\n"; then
echo "Elasticsearch index ${ES_VIS_INDEX_V1} is not accessible at ${es_endpoint}."
exit 1
fi

echo "=== Step 1. Add new builtin search attributes ==="

new_mapping='
{
"properties": {
"TemporalWorkerDeploymentVersion": {
"type": "keyword"
},
"TemporalWorkflowVersioningBehavior": {
"type": "keyword"
},
"TemporalWorkerDeployment": {
"type": "keyword"
}
}
}
'

if [ -z "${AUTO_CONFIRM}" ]; then
read -p "Add new builtin search attributes to the index ${ES_VIS_INDEX_V1}? (N/y)" -n 1 -r
echo
else
REPLY="y"
fi
if [ "${REPLY}" = "y" ]; then
curl --silent --fail --user "${ES_USER}":"${ES_PWD}" -X PUT "${es_endpoint}/${ES_VIS_INDEX_V1}/_mapping" -H "Content-Type: application/json" --data-binary "$new_mapping" | jq
# Wait for mapping changes to go through.
until curl --silent --user "${ES_USER}":"${ES_PWD}" "${es_endpoint}/_cluster/health/${ES_VIS_INDEX_V1}" | jq --exit-status '.status=="green" | .'; do
echo "Waiting for Elasticsearch index ${ES_VIS_INDEX_V1} become green."
sleep 1
done
fi
2 changes: 1 addition & 1 deletion schema/mysql/v8/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ package v8
const Version = "1.15"

// VisibilityVersion is the MySQL visibility database release version
const VisibilityVersion = "1.7"
const VisibilityVersion = "1.8"
6 changes: 6 additions & 0 deletions schema/mysql/v8/visibility/schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ CREATE TABLE executions_visibility (
TemporalNamespaceDivision VARCHAR(255) GENERATED ALWAYS AS (search_attributes->>"$.TemporalNamespaceDivision"),
BuildIds JSON GENERATED ALWAYS AS (search_attributes->"$.BuildIds"),
TemporalPauseInfo JSON GENERATED ALWAYS AS (search_attributes->"$.TemporalPauseInfo"),
TemporalWorkerDeploymentVersion VARCHAR(255) GENERATED ALWAYS AS (search_attributes->>"$.TemporalWorkerDeploymentVersion"),
TemporalWorkflowVersioningBehavior VARCHAR(255) GENERATED ALWAYS AS (search_attributes->>"$.TemporalWorkflowVersioningBehavior"),
TemporalWorkerDeployment VARCHAR(255) GENERATED ALWAYS AS (search_attributes->>"$.TemporalWorkerDeployment"),

PRIMARY KEY (namespace_id, run_id)
);
Expand All @@ -69,6 +72,9 @@ CREATE INDEX by_temporal_change_version ON executions_visibility (namespac
CREATE INDEX by_binary_checksums ON executions_visibility (namespace_id, (CAST(BinaryChecksums AS CHAR(255) ARRAY)), (COALESCE(close_time, CAST('9999-12-31 23:59:59' AS DATETIME))) DESC, start_time DESC, run_id);
CREATE INDEX by_build_ids ON executions_visibility (namespace_id, (CAST(BuildIds AS CHAR(255) ARRAY)), (COALESCE(close_time, CAST('9999-12-31 23:59:59' AS DATETIME))) DESC, start_time DESC, run_id);
CREATE INDEX by_temporal_pause_info ON executions_visibility (namespace_id, (CAST(TemporalPauseInfo AS CHAR(255) ARRAY)), (COALESCE(close_time, CAST('9999-12-31 23:59:59' AS DATETIME))) DESC, start_time DESC, run_id);
CREATE INDEX by_temporal_worker_deployment_version ON executions_visibility (namespace_id, TemporalWorkerDeploymentVersion, (COALESCE(close_time, CAST('9999-12-31 23:59:59' AS DATETIME))) DESC, start_time DESC, run_id);
CREATE INDEX by_temporal_workflow_versioning_behavior ON executions_visibility (namespace_id, TemporalWorkflowVersioningBehavior, (COALESCE(close_time, CAST('9999-12-31 23:59:59' AS DATETIME))) DESC, start_time DESC, run_id);
CREATE INDEX by_temporal_worker_deployment ON executions_visibility (namespace_id, TemporalWorkerDeployment, (COALESCE(close_time, CAST('9999-12-31 23:59:59' AS DATETIME))) DESC, start_time DESC, run_id);
CREATE INDEX by_batcher_user ON executions_visibility (namespace_id, BatcherUser, (COALESCE(close_time, CAST('9999-12-31 23:59:59' AS DATETIME))) DESC, start_time DESC, run_id);
CREATE INDEX by_temporal_scheduled_start_time ON executions_visibility (namespace_id, TemporalScheduledStartTime, (COALESCE(close_time, CAST('9999-12-31 23:59:59' AS DATETIME))) DESC, start_time DESC, run_id);
CREATE INDEX by_temporal_scheduled_by_id ON executions_visibility (namespace_id, TemporalScheduledById, (COALESCE(close_time, CAST('9999-12-31 23:59:59' AS DATETIME))) DESC, start_time DESC, run_id);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
ALTER TABLE executions_visibility ADD COLUMN TemporalWorkerDeploymentVersion VARCHAR(255) GENERATED ALWAYS AS (search_attributes->>"$.TemporalWorkerDeploymentVersion");
ALTER TABLE executions_visibility ADD COLUMN TemporalWorkflowVersioningBehavior VARCHAR(255) GENERATED ALWAYS AS (search_attributes->>"$.TemporalWorkflowVersioningBehavior");
ALTER TABLE executions_visibility ADD COLUMN TemporalWorkerDeployment VARCHAR(255) GENERATED ALWAYS AS (search_attributes->>"$.TemporalWorkerDeployment");

CREATE INDEX by_temporal_worker_deployment_version ON executions_visibility (namespace_id, TemporalWorkerDeploymentVersion, (COALESCE(close_time, CAST('9999-12-31 23:59:59' AS DATETIME))) DESC, start_time DESC, run_id);
CREATE INDEX by_temporal_workflow_versioning_behavior ON executions_visibility (namespace_id, TemporalWorkflowVersioningBehavior, (COALESCE(close_time, CAST('9999-12-31 23:59:59' AS DATETIME))) DESC, start_time DESC, run_id);
CREATE INDEX by_temporal_worker_deployment ON executions_visibility (namespace_id, TemporalWorkerDeployment, (COALESCE(close_time, CAST('9999-12-31 23:59:59' AS DATETIME))) DESC, start_time DESC, run_id);
8 changes: 8 additions & 0 deletions schema/mysql/v8/visibility/versioned/v1.8/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"CurrVersion": "1.8",
"MinCompatibleVersion": "0.1",
"Description": "add TemporalWorkerDeploymentVersion, TemporalWorkerDeployment, and TemporalWorkflowVersioningBehavior columns",
"SchemaUpdateCqlFiles": [
"add_deployment_search_attributes.sql"
]
}
2 changes: 1 addition & 1 deletion schema/postgresql/v12/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ const Version = "1.15"

// VisibilityVersion is the Postgres visibility database release version
// Temporal supports both MySQL and Postgres officially, so upgrade should be performed for both MySQL and Postgres
const VisibilityVersion = "1.7"
const VisibilityVersion = "1.8"
8 changes: 7 additions & 1 deletion schema/postgresql/v12/visibility/schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ CREATE TABLE executions_visibility (
TemporalSchedulePaused BOOLEAN GENERATED ALWAYS AS ((search_attributes->'TemporalSchedulePaused')::boolean) STORED,
TemporalNamespaceDivision VARCHAR(255) GENERATED ALWAYS AS (search_attributes->>'TemporalNamespaceDivision') STORED,
BuildIds JSONB GENERATED ALWAYS AS (search_attributes->'BuildIds') STORED,
TemporalPauseInfo JSONB GENERATED ALWAYS AS (search_attributes->'TemporalPauseInfo') STORED,
TemporalPauseInfo JSONB GENERATED ALWAYS AS (search_attributes->'TemporalPauseInfo') STORED,
TemporalWorkerDeploymentVersion VARCHAR(255) GENERATED ALWAYS AS (search_attributes->>'TemporalWorkerDeploymentVersion') STORED,
TemporalWorkflowVersioningBehavior VARCHAR(255) GENERATED ALWAYS AS (search_attributes->>'TemporalWorkflowVersioningBehavior') STORED,
TemporalWorkerDeployment VARCHAR(255) GENERATED ALWAYS AS (search_attributes->>'TemporalWorkerDeployment') STORED,

-- Pre-allocated custom search attributes
Bool01 BOOLEAN GENERATED ALWAYS AS ((search_attributes->'Bool01')::boolean) STORED,
Expand Down Expand Up @@ -98,6 +101,9 @@ CREATE INDEX by_temporal_change_version ON executions_visibility USING GIN
CREATE INDEX by_binary_checksums ON executions_visibility USING GIN (namespace_id, BinaryChecksums jsonb_path_ops);
CREATE INDEX by_build_ids ON executions_visibility USING GIN (namespace_id, BuildIds jsonb_path_ops);
CREATE INDEX by_temporal_pause_info ON executions_visibility USING GIN (namespace_id, TemporalPauseInfo jsonb_path_ops);
CREATE INDEX by_temporal_worker_deployment_version ON executions_visibility (namespace_id, TemporalWorkerDeploymentVersion, (COALESCE(close_time, '9999-12-31 23:59:59')) DESC, start_time DESC, run_id);
CREATE INDEX by_temporal_workflow_versioning_behavior ON executions_visibility (namespace_id, TemporalWorkflowVersioningBehavior, (COALESCE(close_time, '9999-12-31 23:59:59')) DESC, start_time DESC, run_id);
CREATE INDEX by_temporal_worker_deployment ON executions_visibility (namespace_id, TemporalWorkerDeployment, (COALESCE(close_time, '9999-12-31 23:59:59')) DESC, start_time DESC, run_id);
CREATE INDEX by_batcher_user ON executions_visibility (namespace_id, BatcherUser, (COALESCE(close_time, '9999-12-31 23:59:59')) DESC, start_time DESC, run_id);
CREATE INDEX by_temporal_scheduled_start_time ON executions_visibility (namespace_id, TemporalScheduledStartTime, (COALESCE(close_time, '9999-12-31 23:59:59')) DESC, start_time DESC, run_id);
CREATE INDEX by_temporal_scheduled_by_id ON executions_visibility (namespace_id, TemporalScheduledById, (COALESCE(close_time, '9999-12-31 23:59:59')) DESC, start_time DESC, run_id);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
ALTER TABLE executions_visibility ADD COLUMN TemporalWorkerDeploymentVersion VARCHAR(255) GENERATED ALWAYS AS (search_attributes->>'TemporalWorkerDeploymentVersion') STORED;
ALTER TABLE executions_visibility ADD COLUMN TemporalWorkflowVersioningBehavior VARCHAR(255) GENERATED ALWAYS AS (search_attributes->>'TemporalWorkflowVersioningBehavior') STORED;
ALTER TABLE executions_visibility ADD COLUMN TemporalWorkerDeployment VARCHAR(255) GENERATED ALWAYS AS (search_attributes->>'TemporalWorkerDeployment') STORED;

CREATE INDEX by_temporal_worker_deployment_version ON executions_visibility (namespace_id, TemporalWorkerDeploymentVersion, (COALESCE(close_time, '9999-12-31 23:59:59')) DESC, start_time DESC, run_id);
CREATE INDEX by_temporal_workflow_versioning_behavior ON executions_visibility (namespace_id, TemporalWorkflowVersioningBehavior, (COALESCE(close_time, '9999-12-31 23:59:59')) DESC, start_time DESC, run_id);
CREATE INDEX by_temporal_worker_deployment ON executions_visibility (namespace_id, TemporalWorkerDeployment, (COALESCE(close_time, '9999-12-31 23:59:59')) DESC, start_time DESC, run_id);
8 changes: 8 additions & 0 deletions schema/postgresql/v12/visibility/versioned/v1.8/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"CurrVersion": "1.8",
"MinCompatibleVersion": "0.1",
"Description": "add TemporalWorkerDeploymentVersion, TemporalWorkerDeployment, and TemporalWorkflowVersioningBehavior columns",
"SchemaUpdateCqlFiles": [
"add_deployment_search_attributes.sql"
]
}
9 changes: 7 additions & 2 deletions schema/sqlite/v3/visibility/schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ CREATE TABLE executions_visibility (
TemporalSchedulePaused BOOLEAN GENERATED ALWAYS AS (JSON_EXTRACT(search_attributes, "$.TemporalSchedulePaused")),
TemporalNamespaceDivision VARCHAR(255) GENERATED ALWAYS AS (JSON_EXTRACT(search_attributes, "$.TemporalNamespaceDivision")),
BuildIds TEXT GENERATED ALWAYS AS (JSON_EXTRACT(search_attributes, "$.BuildIds")) STORED,
TemporalPauseInfo TEXT GENERATED ALWAYS AS (JSON_EXTRACT(search_attributes, "$.TemporalPauseInfo")) STORED,
TemporalPauseInfo TEXT GENERATED ALWAYS AS (JSON_EXTRACT(search_attributes, "$.TemporalPauseInfo")) STORED,
TemporalWorkerDeploymentVersion VARCHAR(255) GENERATED ALWAYS AS (JSON_EXTRACT(search_attributes, "$.TemporalWorkerDeploymentVersion")),
TemporalWorkflowVersioningBehavior VARCHAR(255) GENERATED ALWAYS AS (JSON_EXTRACT(search_attributes, "$.TemporalWorkflowVersioningBehavior")),
TemporalWorkerDeployment VARCHAR(255) GENERATED ALWAYS AS (JSON_EXTRACT(search_attributes, "$.TemporalWorkerDeployment")),

-- Pre-allocated custom search attributes
Bool01 BOOLEAN GENERATED ALWAYS AS (JSON_EXTRACT(search_attributes, "$.Bool01")),
Expand Down Expand Up @@ -86,7 +89,9 @@ CREATE INDEX by_temporal_scheduled_by_id ON executions_visibility (namespac
CREATE INDEX by_temporal_schedule_paused ON executions_visibility (namespace_id, TemporalSchedulePaused, (COALESCE(close_time, '9999-12-31 23:59:59+00:00')) DESC, start_time DESC, run_id);
CREATE INDEX by_temporal_namespace_division ON executions_visibility (namespace_id, TemporalNamespaceDivision, (COALESCE(close_time, '9999-12-31 23:59:59+00:00')) DESC, start_time DESC, run_id);
CREATE INDEX by_temporal_pause_info ON executions_visibility (namespace_id, TemporalPauseInfo, (COALESCE(close_time, '9999-12-31 23:59:59+00:00')) DESC, start_time DESC, run_id);

CREATE INDEX by_temporal_worker_deployment_version ON executions_visibility (namespace_id, TemporalWorkerDeploymentVersion, (COALESCE(close_time, '9999-12-31 23:59:59+00:00')) DESC, start_time DESC, run_id);
CREATE INDEX by_temporal_workflow_versioning_behavior ON executions_visibility (namespace_id, TemporalWorkflowVersioningBehavior, (COALESCE(close_time, '9999-12-31 23:59:59+00:00')) DESC, start_time DESC, run_id);
CREATE INDEX by_temporal_worker_deployment ON executions_visibility (namespace_id, TemporalWorkerDeployment, (COALESCE(close_time, '9999-12-31 23:59:59+00:00')) DESC, start_time DESC, run_id);

-- Indexes for the pre-allocated custom search attributes
CREATE INDEX by_bool_01 ON executions_visibility (namespace_id, Bool01, (COALESCE(close_time, '9999-12-31 23:59:59+00:00')) DESC, start_time DESC, run_id);
Expand Down

0 comments on commit 8b0d8f0

Please sign in to comment.