Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix visibility mode for admin when use Pinot visibility #5441

Merged
merged 2 commits into from
Nov 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions common/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,8 @@ const (
AdvancedVisibilityWritingModeOn = "on"
// AdvancedVisibilityWritingModeDual means write to both normal visibility and advanced visibility store
AdvancedVisibilityWritingModeDual = "dual"
// AdvacnedVisibilityWritingModeTriple means write to both normal visibility and advanced visibility store, includes ES and Pinot
AdvacnedVisibilityWritingModeTriple = "triple"
// AdvancedVisibilityWritingModeTriple means write to both normal visibility and advanced visibility store, includes ES and Pinot
AdvancedVisibilityWritingModeTriple = "triple"
)

const (
Expand Down
4 changes: 3 additions & 1 deletion common/persistence/pinotVisibilityTripleManager.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,8 @@ func (v *pinotVisibilityTripleManager) UpsertWorkflowExecution(

func (v *pinotVisibilityTripleManager) chooseVisibilityModeForAdmin() string {
switch {
case v.dbVisibilityManager != nil && v.esVisibilityManager != nil && v.pinotVisibilityManager != nil:
return common.AdvancedVisibilityWritingModeTriple
case v.dbVisibilityManager != nil && v.pinotVisibilityManager != nil:
return common.AdvancedVisibilityWritingModeDual
case v.pinotVisibilityManager != nil:
Expand Down Expand Up @@ -265,7 +267,7 @@ func (v *pinotVisibilityTripleManager) chooseVisibilityManagerForWrite(ctx conte
}
v.logger.Warn("advanced visibility is not available to write")
return dbVisFunc()
case common.AdvacnedVisibilityWritingModeTriple:
case common.AdvancedVisibilityWritingModeTriple:
if v.pinotVisibilityManager != nil && v.esVisibilityManager != nil {
if err := pinotVisFunc(); err != nil {
return err
Expand Down