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

[fix] Refactor archive storage initialization and remove error log #6636

Merged
merged 6 commits into from
Jan 31, 2025

Conversation

mahadzaryab1
Copy link
Collaborator

@mahadzaryab1 mahadzaryab1 commented Jan 30, 2025

Which problem is this PR solving?

Description of the changes

  • Remove the error logs for archive storage as it is not an error if archive storage cannot be configured
  • Remove the duplicate logs by only initializing the archive storage once for both query service and query service v2

How was this change tested?

make run-all-in-one
{"level":"info","ts":1738292734.78397,"caller":"app/flags.go:168","msg":"Archive storage not initialized"}

Checklist

Signed-off-by: Mahad Zaryab <mahadzaryab1@gmail.com>
Signed-off-by: Mahad Zaryab <mahadzaryab1@gmail.com>
Copy link

codecov bot commented Jan 30, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.96%. Comparing base (619a9f7) to head (4938d5e).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6636      +/-   ##
==========================================
+ Coverage   95.93%   95.96%   +0.02%     
==========================================
  Files         365      365              
  Lines       20609    20602       -7     
==========================================
- Hits        19771    19770       -1     
+ Misses        638      634       -4     
+ Partials      200      198       -2     
Flag Coverage Δ
badger_v1 9.92% <0.00%> (+<0.01%) ⬆️
badger_v2 1.84% <0.00%> (+<0.01%) ⬆️
cassandra-4.x-v1-manual 14.93% <0.00%> (+<0.01%) ⬆️
cassandra-4.x-v2-auto 1.83% <0.00%> (+<0.01%) ⬆️
cassandra-4.x-v2-manual 1.83% <0.00%> (+<0.01%) ⬆️
cassandra-5.x-v1-manual 14.93% <0.00%> (+<0.01%) ⬆️
cassandra-5.x-v2-auto 1.83% <0.00%> (+<0.01%) ⬆️
cassandra-5.x-v2-manual 1.83% <0.00%> (+<0.01%) ⬆️
elasticsearch-6.x-v1 19.30% <0.00%> (+<0.01%) ⬆️
elasticsearch-7.x-v1 19.38% <0.00%> (+<0.01%) ⬆️
elasticsearch-8.x-v1 19.55% <0.00%> (+<0.01%) ⬆️
elasticsearch-8.x-v2 1.84% <0.00%> (+<0.01%) ⬆️
grpc_v1 10.90% <0.00%> (+<0.01%) ⬆️
grpc_v2 7.89% <0.00%> (+<0.01%) ⬆️
kafka-3.x-v1 10.21% <0.00%> (+<0.01%) ⬆️
kafka-3.x-v2 1.84% <0.00%> (+<0.01%) ⬆️
memory_v2 1.84% <0.00%> (+<0.01%) ⬆️
opensearch-1.x-v1 19.43% <0.00%> (+<0.01%) ⬆️
opensearch-2.x-v1 19.43% <0.00%> (+<0.01%) ⬆️
opensearch-2.x-v2 1.84% <0.00%> (+<0.01%) ⬆️
tailsampling-processor 0.48% <0.00%> (+<0.01%) ⬆️
unittests 94.84% <100.00%> (+0.02%) ⬆️

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.

Signed-off-by: Mahad Zaryab <mahadzaryab1@gmail.com>
Signed-off-by: Mahad Zaryab <mahadzaryab1@gmail.com>
}

func (f *Factory) createArchiveSpanWriter() (spanstore.Writer, error) {
factory, ok := f.archiveFactories[f.SpanWriterTypes[0]]
func (f *Factory) InitArchiveStorage() (*ArchiveStorage, error) {
Copy link
Member

Choose a reason for hiding this comment

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

Why not just return 3 values?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@yurishkuro I think its generally a pattern that is avoided in Go. I'm happy to change it if you like that better.

mahadzaryab1 and others added 2 commits January 30, 2025 22:49
Signed-off-by: Mahad Zaryab <mahadzaryab1@gmail.com>
@mahadzaryab1 mahadzaryab1 merged commit 378cbc9 into jaegertracing:main Jan 31, 2025
55 checks passed
@mahadzaryab1 mahadzaryab1 deleted the fix-archive-logs branch January 31, 2025 14:15
Manik2708 pushed a commit to Manik2708/jaeger that referenced this pull request Feb 11, 2025
…aegertracing#6636)

## Which problem is this PR solving?
- Fixes jaegertracing#6634 

## Description of the changes
- Remove the error logs for archive storage as it is not an error if
archive storage cannot be configured
- Remove the duplicate logs by only initializing the archive storage
once for both query service and query service v2

## How was this change tested?
```
make run-all-in-one
{"level":"info","ts":1738292734.78397,"caller":"app/flags.go:168","msg":"Archive storage not initialized"}
```

## 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`: `npm run lint` and `npm run test`

---------

Signed-off-by: Mahad Zaryab <mahadzaryab1@gmail.com>
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.

Confusing archive errors / warnings
2 participants