Skip to content
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

Merged

Conversation

arunvelsriram
Copy link
Contributor

@arunvelsriram arunvelsriram commented Oct 6, 2024

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.

  • 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

… 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 <[email protected]>
@arunvelsriram arunvelsriram requested a review from a team as a code owner October 6, 2024 18:04
@arunvelsriram arunvelsriram changed the title Update operation names table check logic to prevent fallback to old schema in case of DB issues Update operation names table check logic to prevent fallback to old schema in case of Cassandra issues Oct 6, 2024
Copy link

codecov bot commented Oct 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.90%. Comparing base (f411b3c) to head (33a7696).
Report is 5 commits behind head on main.

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     
Flag Coverage Δ
badger_v1 7.99% <0.00%> (-0.01%) ⬇️
badger_v2 1.82% <0.00%> (-0.01%) ⬇️
cassandra-4.x-v1 15.79% <63.15%> (+0.01%) ⬆️
cassandra-4.x-v2 1.74% <0.00%> (-0.01%) ⬇️
cassandra-5.x-v1 15.79% <63.15%> (+0.01%) ⬆️
cassandra-5.x-v2 1.74% <0.00%> (-0.01%) ⬇️
elasticsearch-6.x-v1 18.69% <0.00%> (-0.02%) ⬇️
elasticsearch-7.x-v1 18.74% <0.00%> (-0.04%) ⬇️
elasticsearch-8.x-v1 18.95% <0.00%> (-0.03%) ⬇️
elasticsearch-8.x-v2 1.80% <0.00%> (-0.02%) ⬇️
grpc_v1 9.37% <0.00%> (-0.02%) ⬇️
grpc_v2 7.12% <0.00%> (-0.01%) ⬇️
kafka-v1 9.69% <0.00%> (-0.02%) ⬇️
kafka-v2 1.82% <0.00%> (-0.01%) ⬇️
memory_v2 1.82% <0.00%> (-0.01%) ⬇️
opensearch-1.x-v1 18.80% <0.00%> (-0.02%) ⬇️
opensearch-2.x-v1 18.80% <0.00%> (-0.03%) ⬇️
opensearch-2.x-v2 1.82% <0.00%> (+<0.01%) ⬆️
tailsampling-processor 0.46% <0.00%> (-0.01%) ⬇️
unittests 95.70% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@yurishkuro yurishkuro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@yurishkuro yurishkuro changed the title Update operation names table check logic to prevent fallback to old schema in case of Cassandra issues [cassandra] Prevent fallback to old schema for operation names table in case of db issues Oct 8, 2024
@yurishkuro yurishkuro merged commit 3551cf7 into jaegertracing:main Oct 8, 2024
49 of 50 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

collector: Failed to insert span: failed to Exec query & agent: timeout to collector
2 participants