Skip to content

Commit 868b2d1

Browse files
authored
Update IsAdvancedVisibilityActivity to include SQL DB (#3957)
1 parent 98a52d1 commit 868b2d1

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

service/worker/deletenamespace/reclaimresources/activities.go

+10-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ package reclaimresources
2626

2727
import (
2828
"context"
29-
"strings"
3029

3130
"go.temporal.io/sdk/activity"
3231

@@ -36,6 +35,9 @@ import (
3635
"go.temporal.io/server/common/metrics"
3736
"go.temporal.io/server/common/namespace"
3837
"go.temporal.io/server/common/persistence"
38+
"go.temporal.io/server/common/persistence/sql/sqlplugin/mysql"
39+
"go.temporal.io/server/common/persistence/sql/sqlplugin/postgresql"
40+
"go.temporal.io/server/common/persistence/sql/sqlplugin/sqlite"
3941
"go.temporal.io/server/common/persistence/visibility/manager"
4042
"go.temporal.io/server/common/persistence/visibility/store/elasticsearch"
4143
"go.temporal.io/server/service/worker/deletenamespace/errors"
@@ -63,8 +65,14 @@ func NewActivities(
6365
logger: logger,
6466
}
6567
}
68+
6669
func (a *Activities) IsAdvancedVisibilityActivity(_ context.Context) (bool, error) {
67-
return strings.Contains(a.visibilityManager.GetName(), elasticsearch.PersistenceName), nil
70+
switch a.visibilityManager.GetName() {
71+
case elasticsearch.PersistenceName, mysql.PluginNameV8, postgresql.PluginNameV12, sqlite.PluginName:
72+
return true, nil
73+
default:
74+
return false, nil
75+
}
6876
}
6977

7078
func (a *Activities) CountExecutionsAdvVisibilityActivity(ctx context.Context, nsID namespace.ID, nsName namespace.Name) (int64, error) {

0 commit comments

Comments
 (0)