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

[v2][storage] Add ClickHouse storage factory interface #6686

Closed
wants to merge 1 commit into from

Conversation

zzzk1
Copy link
Contributor

@zzzk1 zzzk1 commented Feb 6, 2025

Which problem is this PR solving?

Part of:#5058

In the implementation of integrating ClickHouse as the backend storage based on v2, we first need to create the corresponding factory to encapsulate all interactions with ClickHouse via the clickhouse-go client. For both the exporter and query components, the client should be hidden within the factory, allowing them to interact only with the writer/reader without concerning themselves with how the client is used.

Additionally, based on the changes discussed in jaegertracing/jaeger#6637, we need to create a new v2/factory instead of continuing to use v1/factory.

Description of the changes

  • Add v2/factory interface and clickhouse factory

How was this change tested?

  • unit tests

Checklist

@zzzk1 zzzk1 requested a review from a team as a code owner February 6, 2025 16:23
@zzzk1 zzzk1 requested a review from mahadzaryab1 February 6, 2025 16:23
Signed-off-by: zzzk1 <madzhou1@gmail.com>
Copy link

codecov bot commented Feb 6, 2025

Codecov Report

Attention: Patch coverage is 73.91304% with 18 lines in your changes missing coverage. Please review.

Project coverage is 95.89%. Comparing base (846a3db) to head (1425a3e).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
internal/storage/v2/factory/config.go 50.00% 6 Missing and 1 partial ⚠️
internal/storage/v2/factory/factory.go 86.27% 7 Missing ⚠️
internal/storage/v2/clickhouse/factory.go 0.00% 4 Missing ⚠️

❌ Your patch status has failed because the patch coverage (73.91%) is below the target coverage (95.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6686      +/-   ##
==========================================
- Coverage   95.96%   95.89%   -0.08%     
==========================================
  Files         363      366       +3     
  Lines       20601    20670      +69     
==========================================
+ Hits        19770    19821      +51     
- Misses        634      651      +17     
- Partials      197      198       +1     
Flag Coverage Δ
badger_v1 9.82% <ø> (ø)
badger_v2 1.82% <ø> (ø)
cassandra-4.x-v1-manual 14.79% <ø> (ø)
cassandra-4.x-v2-auto 1.81% <ø> (ø)
cassandra-4.x-v2-manual 1.81% <ø> (ø)
cassandra-5.x-v1-manual 14.79% <ø> (ø)
cassandra-5.x-v2-auto 1.81% <ø> (ø)
cassandra-5.x-v2-manual 1.81% <ø> (ø)
elasticsearch-6.x-v1 19.12% <ø> (ø)
elasticsearch-7.x-v1 19.20% <ø> (ø)
elasticsearch-8.x-v1 19.37% <ø> (ø)
elasticsearch-8.x-v2 1.82% <ø> (ø)
grpc_v1 10.80% <ø> (ø)
grpc_v2 7.81% <ø> (ø)
kafka-3.x-v1 10.12% <ø> (ø)
kafka-3.x-v2 1.82% <ø> (ø)
memory_v2 1.82% <ø> (ø)
opensearch-1.x-v1 19.25% <ø> (ø)
opensearch-2.x-v1 19.25% <ø> (ø)
opensearch-2.x-v2 1.82% <ø> (ø)
tailsampling-processor 0.48% <ø> (ø)
unittests 94.77% <73.91%> (-0.07%) ⬇️

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.

@zzzk1
Copy link
Contributor Author

zzzk1 commented Feb 6, 2025

@zzzk1 Thanks for your PR. However, we already have a storage interface for v2 (which you can see at main/internal/storage/v2/api). The meta-factory that this PR creates only exists for v1 storage and is not needed for jaeger-v2. For the clickhouse implementation itself, we're currently still working on unblocking the read path for storages that natively implement the v2 api. Once that is done, the plan is to migrate one of the storages from #6458 to natively implement the v2 interface before adding the ClickHouse implantation. I'll add a note on the main issue as well. Let me know if you have any questions!

@mahadzaryab1 thanks for the reminder! I will take other things to help!

@zzzk1 zzzk1 closed this Feb 6, 2025
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.

1 participant