Skip to content

Commit

Permalink
Add duplicate workflowID/runID/workflowType columns used for Pinot pr…
Browse files Browse the repository at this point in the history
…efix text match (cadence-workflow#6149)
  • Loading branch information
neil-xie authored Jun 27, 2024
1 parent 03d9a2e commit 270f17a
Showing 1 changed file with 7 additions and 1 deletion.
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

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

0 comments on commit 270f17a

Please sign in to comment.