-
Notifications
You must be signed in to change notification settings - Fork 805
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 Pinot as new visibility option #5201
Conversation
* enable json index, change the quries for exact/partial match, update the unit tests * make it pass integration test: found that order by is not supported in json index column * update partial match query. It didn't work in the mono repo * Implemented deletion method for Pinot visibility store (#5404)
#5411) * Add pinot metrics client and update pinot visibility manager to use it
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.
some nit comments from looking at this file later on. Might be worth improving
|
||
// ValidateQuery validates that search attributes in the query and returns modified query. | ||
func (qv *VisibilityQueryValidator) ValidateQuery(whereClause string) (string, error) { | ||
if len(whereClause) != 0 { |
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.
nit: use short return.
if len(whereClause) == 0 {
return whereClause, nil
}
that will make this function easier to read.
} | ||
|
||
func (qv *VisibilityQueryValidator) processSystemKey(expr sqlparser.Expr) (string, error) { | ||
comparisonExpr := expr.(*sqlparser.ComparisonExpr) |
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.
nit: for all methods that expect a single type, it would be easier to use it directly instead of asserting to the interface.
What changed?
Updated server start up to choose visibility manager based on the advanced visibility option
Added new triple visibility manager to provide options to write to both ES and Pinot for future migration
Added pinotVisibilityStore and pinotClient to support storing visibility messages in Pinot
Added util methods to flatten the search attributes into columns
Added util methods to validate pinot response and query
Added new kafka indexer message type for Pinot since Pinot doesn't need indexer to process
Added integration test to set up Pinot test cluster and test Pinot functionality
Why?
ElasticSearch is going to be deprecated with Uber, we will migrate from ElasticSearch to Pinot. This is the first step to make Cadence work with Pinot as the advanced visibility store. In the future, we will add support for more components like migration between ES and Pinot.
How did you test it?
Added unit test for Pinot visibility store and pinot client.
Added unit test for Pinot response comparator
Added integration test for Pinot to test the functionality
Bench test in staging environment to test performance.
Potential risks
Pinot doesn't support deletion yet, the storage may continue growing without segment compaction.
We have the pinot/es response comparator to help detect data issue during migration
Release notes
Documentation Changes