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 init #6072

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

Conversation

hellspawn679
Copy link
Contributor

Which problem is this PR solving?

Description of the changes

How was this change tested?

Checklist

mehul and others added 5 commits October 7, 2024 22:52
Signed-off-by: mehul <mehulsharam4786@gmail.com>
fix
Signed-off-by: mehul <mehulsharam4786@gmail.com>
Signed-off-by: mehul <mehulsharam4786@gmail.com>
Signed-off-by: mehul <mehulsharam4786@gmail.com>
@hellspawn679 hellspawn679 requested a review from a team as a code owner October 7, 2024 20:46
@dosubot dosubot bot added the area/storage label Oct 7, 2024
Copy link

codecov bot commented Oct 7, 2024

Codecov Report

Attention: Patch coverage is 71.75573% with 37 lines in your changes missing coverage. Please review.

Project coverage is 96.71%. Comparing base (6984eaf) to head (7c05fdc).

Files with missing lines Patch % Lines
plugin/storage/cassandra/schema/create.go 71.53% 27 Missing and 10 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6072      +/-   ##
==========================================
- Coverage   96.90%   96.71%   -0.20%     
==========================================
  Files         349      350       +1     
  Lines       16588    16719     +131     
==========================================
+ Hits        16075    16169      +94     
- Misses        329      356      +27     
- Partials      184      194      +10     
Flag Coverage Δ
badger_v1 7.87% <0.00%> (-0.13%) ⬇️
badger_v2 1.79% <0.00%> (-0.03%) ⬇️
cassandra-4.x-v1 15.80% <17.55%> (+0.02%) ⬆️
cassandra-4.x-v2 1.72% <0.00%> (-0.03%) ⬇️
cassandra-5.x-v1 15.80% <17.55%> (+0.02%) ⬆️
cassandra-5.x-v2 1.72% <0.00%> (-0.03%) ⬇️
elasticsearch-6.x-v1 18.41% <0.00%> (-0.30%) ⬇️
elasticsearch-7.x-v1 18.49% <0.00%> (-0.30%) ⬇️
elasticsearch-8.x-v1 18.68% <0.00%> (-0.29%) ⬇️
elasticsearch-8.x-v2 1.79% <0.00%> (-0.03%) ⬇️
grpc_v1 9.23% <0.00%> (-0.15%) ⬇️
grpc_v2 7.02% <0.00%> (-0.12%) ⬇️
kafka-v1 9.55% <0.00%> (-0.16%) ⬇️
kafka-v2 1.79% <0.00%> (-0.03%) ⬇️
memory_v2 1.79% <0.00%> (-0.03%) ⬇️
opensearch-1.x-v1 18.52% <0.00%> (-0.31%) ⬇️
opensearch-2.x-v1 18.52% <0.00%> (-0.30%) ⬇️
opensearch-2.x-v2 1.78% <0.00%> (-0.05%) ⬇️
tailsampling-processor 0.45% <0.00%> (-0.01%) ⬇️
unittests 95.45% <64.12%> (-0.25%) ⬇️

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.

}
var datacentre, replications string
// var ReplicationFactor int
if mode == "prod" {
Copy link
Member

Choose a reason for hiding this comment

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

I don't think we need this distinction anymore. Users can provide precise values for parameters, we don't have to have Jaeger guess those parameters based on the MODE

Comment on lines +199 to +200
builder := &MappingBuilder{}
schema, _, err := builder.GetSpanServiceMappings()
Copy link
Member

Choose a reason for hiding this comment

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

where does the term "mapping" come from? If you're copying it from Elasticsearch, there "mapping" is actually a term understood by ES. No such thing in Cassandra.

case "4":
template = "./v004.cql.tmpl"
default:
template = "./v004.cql.tmpl"
Copy link
Member

Choose a reason for hiding this comment

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

I am not sure how you are planning to use those files. They use variable placeholders like ${keyspace}, which works in shell substitution, but will not work as a Go template. We should be using Go template the this functionality. Your could do a search/replace, something like ${keyspace} ==> {{ .Keyspace }}. But it would be easier just to copy and change the syntax. You might need to use conditional clauses, like {{- if .UseILM}} from ES templates.

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.

2 participants