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

Add duplicate columns with different index to improve Pinot partial match performance #6149

Merged
merged 1 commit into from
Jun 27, 2024
Merged
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
8 changes: 7 additions & 1 deletion common/persistence/pinot/pinot_visibility_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ const (
IsDeleted = "IsDeleted" // used for Pinot deletion/rolling upsert only, not visible to user
EventTimeMs = "EventTimeMs" // used for Pinot deletion/rolling upsert only, not visible to user
Memo = "Memo"
WfIDTextSearch = "WorkflowIDTextSearch" // used for text search which can improve the partial match performance on WorkflowID/RunID/WorkflowType text search columns
WfTypeTextSearch = "WorkflowTypeTextSearch" // used for text search which can improve the partial match performance on WorkflowID/RunID/WorkflowType text search columns
RunIDTextSearch = "RunIDTextSearch" // used for text search which can improve the partial match performance on WorkflowID/RunID/WorkflowType text search columns

// used to be micro second
oneMicroSecondInNano = int64(time.Microsecond / time.Nanosecond)
Expand Down Expand Up @@ -615,7 +618,10 @@ func createVisibilityMessage(
m[UpdateTime] = updateTimeUnixMilli
m[ShardID] = shardID
m[IsDeleted] = isDeleted
m[EventTimeMs] = updateTimeUnixMilli // same as update time when record is upserted, could not use updateTime directly since this will be modified by Pinot
m[EventTimeMs] = updateTimeUnixMilli // same as update time when record is upserted, could not use updateTime directly since this will be modified by Pinot
m[WfIDTextSearch] = wid // used for text search which can improve the partial match performance
m[RunIDTextSearch] = rid // used for text search which can improve the partial match performance
m[WfTypeTextSearch] = workflowTypeName // used for text search which can improve the partial match performance
neil-xie marked this conversation as resolved.
Show resolved Hide resolved

SearchAttributes := make(map[string]interface{})
var err error
Expand Down
Loading