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

[jaeger-v2] Add Validation And Comments to Badger Storage Config #5927

Merged
merged 10 commits into from
Sep 5, 2024

Conversation

mahadzaryab1
Copy link
Contributor

@mahadzaryab1 mahadzaryab1 commented Sep 2, 2024

Which problem is this PR solving?

Description of the changes

  • Implemented Validate method for NamespaceConfiguration struct for the badger storage
  • Created migration doc from v1 to v2

How was this change tested?

  • Added unit tests for the new method

Checklist

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

@mahadzaryab1 mahadzaryab1 left a comment

Choose a reason for hiding this comment

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

couple of questions for reviewers

Ephemeral bool `mapstructure:"ephemeral"`
SyncWrites bool `mapstructure:"consistency"`
MaintenanceInterval time.Duration `mapstructure:"maintenance_interval"`
namespace string
Copy link
Contributor Author

Choose a reason for hiding this comment

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

do we want to make this field configurable?

Copy link
Member

Choose a reason for hiding this comment

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

it's not needed, see #5929

Comment on lines 29 to 34
// KeyDirectory is the directory in which the keys are stored. Ephemeral must be
// set to false for this configuration to take effect.
KeyDirectory string `mapstructure:"directory_key"`
// ValueDirectory is the directory in which the values should be stored. Ephemeral must be
// set to false for this configuration to take effect.
ValueDirectory string `mapstructure:"directory_value"`
Copy link
Contributor Author

Choose a reason for hiding this comment

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

do we want to group these?

Copy link
Member

Choose a reason for hiding this comment

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

we could, e.g.

directories:
  keys: ...
  values: ...

plugin/storage/badger/options.go Show resolved Hide resolved
@mahadzaryab1 mahadzaryab1 marked this pull request as ready for review September 2, 2024 22:23
@mahadzaryab1 mahadzaryab1 requested a review from a team as a code owner September 2, 2024 22:23
@dosubot dosubot bot added area/storage storage/badger Issues related to badger storage v2 labels Sep 2, 2024
Copy link

codecov bot commented Sep 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.81%. Comparing base (1da98bb) to head (c5f9ffa).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5927   +/-   ##
=======================================
  Coverage   96.81%   96.81%           
=======================================
  Files         344      344           
  Lines       16530    16537    +7     
=======================================
+ Hits        16003    16010    +7     
  Misses        340      340           
  Partials      187      187           
Flag Coverage Δ
badger_v1 8.08% <53.57%> (+0.04%) ⬆️
badger_v2 1.82% <0.00%> (-0.01%) ⬇️
cassandra-3.x-v1 16.60% <0.00%> (-0.02%) ⬇️
cassandra-3.x-v2 1.75% <0.00%> (-0.01%) ⬇️
cassandra-4.x-v1 16.60% <0.00%> (-0.02%) ⬇️
cassandra-4.x-v2 1.75% <0.00%> (-0.01%) ⬇️
elasticsearch-6.x-v1 18.76% <0.00%> (-0.02%) ⬇️
elasticsearch-7.x-v1 18.83% <0.00%> (-0.02%) ⬇️
elasticsearch-8.x-v1 19.01% <0.00%> (-0.03%) ⬇️
elasticsearch-8.x-v2 1.81% <0.00%> (-0.02%) ⬇️
grpc_v1 9.48% <0.00%> (-0.01%) ⬇️
grpc_v2 7.15% <0.00%> (-0.01%) ⬇️
kafka-v1 9.73% <0.00%> (-0.01%) ⬇️
kafka-v2 1.82% <0.00%> (-0.01%) ⬇️
memory_v2 1.82% <0.00%> (+0.01%) ⬆️
opensearch-1.x-v1 18.87% <0.00%> (-0.03%) ⬇️
opensearch-2.x-v1 18.87% <0.00%> (-0.03%) ⬇️
opensearch-2.x-v2 1.82% <0.00%> (+0.01%) ⬆️
tailsampling-processor 0.46% <0.00%> (-0.01%) ⬇️
unittests 95.29% <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.

@yurishkuro yurishkuro added the changelog:exprimental Change to an experimental part of the code label Sep 3, 2024
Signed-off-by: Mahad Zaryab <mahadzaryab1@gmail.com>
Signed-off-by: Mahad Zaryab <mahadzaryab1@gmail.com>
// SpanStore holds the amount of time that the span store data is stored.
// Once this duration has passed for a given key, span store data will
// no longer be accessible.
SpanStore time.Duration `mapstructure:"span_store"`
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
SpanStore time.Duration `mapstructure:"span_store"`
Spans time.Duration `mapstructure:"spans"`

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

please resolve conflicts

mahadzaryab1 and others added 2 commits September 4, 2024 18:36
Signed-off-by: Mahad Zaryab <43658574+mahadzaryab1@users.noreply.github.com>
Signed-off-by: Mahad Zaryab <mahadzaryab1@gmail.com>
@mahadzaryab1
Copy link
Contributor Author

please resolve conflicts

done!

Signed-off-by: Mahad Zaryab <mahadzaryab1@gmail.com>
@yurishkuro yurishkuro merged commit 3e240fa into jaegertracing:main Sep 5, 2024
49 checks passed
@yurishkuro
Copy link
Member

One more thing we can do is combine Options and NamespaceConfig into a single struct Config.

@mahadzaryab1
Copy link
Contributor Author

@yurishkuro do we just want to get rid of Options and rename NamespaceConfig to Config?

@yurishkuro
Copy link
Member

Yes, the separate Options struct now serves no purpose.

@mahadzaryab1
Copy link
Contributor Author

Yes, the separate Options struct now serves no purpose.

Opened PR at #5937

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/storage changelog:exprimental Change to an experimental part of the code storage/badger Issues related to badger storage v2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[jaeger-v2] Align Badger Storage Config With OTEL
2 participants