-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[cassandra] Prevent fallback to old schema for operation names table in case of db issues #6061
[cassandra] Prevent fallback to old schema for operation names table in case of db issues #6061
Conversation
… DB issues - Fixes jaegertracing#432 - Return and handle error from operation names storage contructor and its dependencies span writer and span reader Signed-off-by: Arunvel Sriram <arunvelsriram@gmail.com>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6061 +/- ##
==========================================
- Coverage 96.91% 96.90% -0.01%
==========================================
Files 349 349
Lines 16587 16598 +11
==========================================
+ Hits 16076 16085 +9
- Misses 328 329 +1
- Partials 183 184 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Signed-off-by: Arunvel Sriram <arunvelsriram@gmail.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.
Thanks!
…in case of db issues (jaegertracing#6061) ## Which problem is this PR solving? - Resolves jaegertracing#432 - jaegertracing#432 (comment) ## Description of the changes The current [operation names table check logic](https://github.com/jaegertracing/jaeger/blob/main/plugin/storage/cassandra/spanstore/operation_names.go#L97-L99) creates `OperationNamesStorage` instance pointing to old schema table in case of issues with Cassandra. - Check for the existence of old schema table before fallback - Make `OperationNamesStorage` constructor `NewOperationsStorage` to return `error` if both old and new tables doesn't exist or both of their existence cannot be checked. Since there was no `error` returned from `NewOperationsStorage` earlier had to update the dependencies and handle the `error` accordingly. ## How was this change tested? - Ran all tests - Ran all-in-one and checked if traces are appearing ## Checklist - [x] I have read https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md - [x] I have signed all commits - [x] I have added unit tests for the new functionality - [x] I have run lint and test steps successfully - for `jaeger`: `make lint test` - for `jaeger-ui`: `yarn lint` and `yarn test` --------- Signed-off-by: Arunvel Sriram <arunvelsriram@gmail.com> Signed-off-by: Saumya Shah <saumyabshah90@gmail.com>
…in case of db issues (jaegertracing#6061) ## Which problem is this PR solving? - Resolves jaegertracing#432 - jaegertracing#432 (comment) ## Description of the changes The current [operation names table check logic](https://github.com/jaegertracing/jaeger/blob/main/plugin/storage/cassandra/spanstore/operation_names.go#L97-L99) creates `OperationNamesStorage` instance pointing to old schema table in case of issues with Cassandra. - Check for the existence of old schema table before fallback - Make `OperationNamesStorage` constructor `NewOperationsStorage` to return `error` if both old and new tables doesn't exist or both of their existence cannot be checked. Since there was no `error` returned from `NewOperationsStorage` earlier had to update the dependencies and handle the `error` accordingly. ## How was this change tested? - Ran all tests - Ran all-in-one and checked if traces are appearing ## Checklist - [x] I have read https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md - [x] I have signed all commits - [x] I have added unit tests for the new functionality - [x] I have run lint and test steps successfully - for `jaeger`: `make lint test` - for `jaeger-ui`: `yarn lint` and `yarn test` --------- Signed-off-by: Arunvel Sriram <arunvelsriram@gmail.com> Signed-off-by: Saumya Shah <saumyabshah90@gmail.com>
…in case of db issues (jaegertracing#6061) ## Which problem is this PR solving? - Resolves jaegertracing#432 - jaegertracing#432 (comment) ## Description of the changes The current [operation names table check logic](https://github.com/jaegertracing/jaeger/blob/main/plugin/storage/cassandra/spanstore/operation_names.go#L97-L99) creates `OperationNamesStorage` instance pointing to old schema table in case of issues with Cassandra. - Check for the existence of old schema table before fallback - Make `OperationNamesStorage` constructor `NewOperationsStorage` to return `error` if both old and new tables doesn't exist or both of their existence cannot be checked. Since there was no `error` returned from `NewOperationsStorage` earlier had to update the dependencies and handle the `error` accordingly. ## How was this change tested? - Ran all tests - Ran all-in-one and checked if traces are appearing ## Checklist - [x] I have read https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md - [x] I have signed all commits - [x] I have added unit tests for the new functionality - [x] I have run lint and test steps successfully - for `jaeger`: `make lint test` - for `jaeger-ui`: `yarn lint` and `yarn test` --------- Signed-off-by: Arunvel Sriram <arunvelsriram@gmail.com>
Which problem is this PR solving?
Description of the changes
The current operation names table check logic creates
OperationNamesStorage
instance pointing to old schema table in case of issues with Cassandra.OperationNamesStorage
constructorNewOperationsStorage
to returnerror
if both old and new tables doesn't exist or both of their existence cannot be checked. Since there was noerror
returned fromNewOperationsStorage
earlier had to update the dependencies and handle theerror
accordingly.How was this change tested?
Checklist
jaeger
:make lint test
jaeger-ui
:yarn lint
andyarn test