diff --git a/common/persistence/nosql/nosqlConfigStore.go b/common/persistence/nosql/nosqlConfigStore.go index bf0f655f269..3052a8d1235 100644 --- a/common/persistence/nosql/nosqlConfigStore.go +++ b/common/persistence/nosql/nosqlConfigStore.go @@ -56,6 +56,9 @@ func NewNoSQLConfigStore( func (m *nosqlConfigStore) FetchConfig(ctx context.Context, configType persistence.ConfigType) (*persistence.InternalConfigStoreEntry, error) { entry, err := m.db.SelectLatestConfig(ctx, int(configType)) + if m.db.IsNotFoundError(err) { + return nil, nil + } if err != nil { return nil, convertCommonErrors(m.db, "FetchConfig", err) } diff --git a/common/persistence/nosql/nosqlplugin/cassandra/configStore.go b/common/persistence/nosql/nosqlplugin/cassandra/configStore.go index f8ce4851b76..8085df83462 100644 --- a/common/persistence/nosql/nosqlplugin/cassandra/configStore.go +++ b/common/persistence/nosql/nosqlplugin/cassandra/configStore.go @@ -24,8 +24,6 @@ import ( "context" "time" - "github.com/gocql/gocql" - "github.com/uber/cadence/common" "github.com/uber/cadence/common/persistence" "github.com/uber/cadence/common/persistence/nosql/nosqlplugin" @@ -58,9 +56,6 @@ func (db *cdb) SelectLatestConfig(ctx context.Context, rowType int) (*persistenc query := db.session.Query(templateSelectLatestConfig, rowType).WithContext(ctx) err := query.Scan(&rowType, &version, ×tamp, &data, &encoding) - if err == gocql.ErrNotFound { - return nil, nil - } if err != nil { return nil, err }