-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Discover dependencies table version automatically #1364
Discover dependencies table version automatically #1364
Conversation
Signed-off-by: Won Jun Jang <wjang@uber.com>
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.
there's one downside to this - during migration when the table is created but data is not copied, if the query-service is restarted it would switch to v2. But I don't know if there's a better way.
// GetDependencyVersion attempts to determine the version of the dependencies table. | ||
// TODO: Remove this once we've migrated to V2 permanently. | ||
func GetDependencyVersion(s cassandra.Session) Version { | ||
if err := s.Query("SELECT ts from dependencies_v2 limit 1;").Exec(); err != nil { |
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.
what kind of error is returned? just curious
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.
InvalidRequest: Error from server: code=2200 [Invalid query] message="unconfigured table dependencies"
Codecov Report
@@ Coverage Diff @@
## master #1364 +/- ##
======================================
Coverage 100% 100%
======================================
Files 163 164 +1
Lines 7374 7376 +2
======================================
+ Hits 7374 7376 +2
Continue to review full report at Codecov.
|
Signed-off-by: Won Jun Jang <wjang@uber.com>
@black-adder I have raised this also because of jaegertracing/spark-dependencies#58. There can be other components which expect schema for v1 dependencies. We have failing CI jobs now in opearator bc dep. job tries to write to old dependnecies table. in spark job we should do the same - automatically detect the table |
) | ||
|
||
// GetDependencyVersion attempts to determine the version of the dependencies table. | ||
// TODO: Remove this once we've migrated to V2 permanently. |
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.
Add a pointer to issue
Signed-off-by: Won Jun Jang <wjang@uber.com>
@black-adder can this be merged? |
Signed-off-by: Won Jun Jang wjang@uber.com
Resolves #1363
EnableDependenciesV2
flag