-
Notifications
You must be signed in to change notification settings - Fork 911
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
Use search attribute type map in visibility archival #4304
Conversation
|
||
ExpectArchiveHistory bool | ||
ExpectArchiveVisibility bool | ||
ExpectedMetrics []expectedMetric |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed these and the log recorder messages because they're too much of a pain to maintain
service/history/archival/archiver.go
Outdated
if err != nil { | ||
return err | ||
} | ||
|
||
// It is safe to pass nil to typeMap here because search attributes type must be embedded by caller. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comment should change since we're not passing nil anymore
"go.uber.org/fx" | ||
"go.uber.org/multierr" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
put these imports up higher in the third party section
@@ -212,8 +219,13 @@ func (a *archiver) archiveVisibility(ctx context.Context, request *Request, logg | |||
return err | |||
} | |||
|
|||
saTypeMap, err := a.searchAttributeProvider.GetSearchAttributes(a.visibilityManager.GetIndexName(), false) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe: comment about why we're calling this here? not sure if it's necessary
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, address @dnr comments.
07bc8b2
to
153d613
Compare
* Use search attribute type map in visibility archival * pr comments
* Use search attribute type map in visibility archival * pr comments
What changed?
We now populate search attributes with type information before archiving them.
Why?
This information is not always embedded in the fields themselves, e.g., for schedules. This fixes #4270 .
How did you test it?
I reproduced the linked issue without this change, and then verified that it worked after this change. I repro'd by doing this:
invalid search attribute type: Unspecified
error is thrown before this change.Potential risks
Unclear.
Is hotfix candidate?
The community should be notified that this bug existed, and that they should upgrade to fix it.