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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

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

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).

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 <[email protected]>
Signed-off-by: Mahad Zaryab <[email protected]>
}

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.

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