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

Update storage api to support query operations by spanKind #1942

Merged
merged 15 commits into from
Nov 25, 2019

Conversation

guo0693
Copy link
Contributor

@guo0693 guo0693 commented Nov 22, 2019

Which problem is this PR solving?

Short description of the changes

  • storage API changes to support new query parameter and return type (across all storage engines)

This PR contains the exact same changes as guo0693#1, The only difference is this PR is opened against master branch.

guo0693 and others added 10 commits November 19, 2019 18:44
…n for operation name index

- add migration script
- read from the latest table if available, otherwise fail back to previous table

Signed-off-by: Jun Guo <guo0693@gmail.com>
Signed-off-by: Jun Guo <guo0693@gmail.com>
Signed-off-by: Jun Guo <guo0693@gmail.com>
Signed-off-by: Jun Guo <guo0693@gmail.com>
Signed-off-by: Jun Guo <guo0693@gmail.com>
Signed-off-by: Jun Guo <guo0693@gmail.com>
Signed-off-by: Jun Guo <guo0693@gmail.com>
# Conflicts:
#	plugin/storage/cassandra/spanstore/operation_names.go
#	plugin/storage/cassandra/spanstore/operation_names_test.go
#	plugin/storage/cassandra/spanstore/reader_test.go
#	plugin/storage/cassandra/spanstore/writer_test.go
Signed-off-by: Jun Guo <guo0693@gmail.com>
Copy link
Member

@yurishkuro yurishkuro left a comment

Choose a reason for hiding this comment

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

in many places SpanKind: "" is redundant

cmd/query/app/querysvc/query_service.go Outdated Show resolved Hide resolved
plugin/storage/badger/spanstore/cache.go Outdated Show resolved Hide resolved
plugin/storage/badger/spanstore/reader.go Outdated Show resolved Hide resolved
plugin/storage/cassandra/spanstore/operation_names.go Outdated Show resolved Hide resolved
plugin/storage/cassandra/spanstore/operation_names.go Outdated Show resolved Hide resolved
plugin/storage/grpc/shared/grpc_server.go Outdated Show resolved Hide resolved
plugin/storage/grpc/shared/grpc_server.go Show resolved Hide resolved
plugin/storage/integration/kafka_test.go Outdated Show resolved Hide resolved
storage/spanstore/metrics/decorator.go Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Nov 22, 2019

Codecov Report

Merging #1942 into master will decrease coverage by 0.01%.
The diff coverage is 98.14%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1942      +/-   ##
==========================================
- Coverage   98.44%   98.43%   -0.02%     
==========================================
  Files         198      198              
  Lines        9794     9847      +53     
==========================================
+ Hits         9642     9693      +51     
- Misses        115      116       +1     
- Partials       37       38       +1
Impacted Files Coverage Δ
plugin/storage/memory/memory.go 100% <100%> (ø) ⬆️
plugin/storage/cassandra/spanstore/reader.go 100% <100%> (ø) ⬆️
plugin/storage/badger/spanstore/reader.go 96.75% <100%> (ø) ⬆️
plugin/storage/badger/spanstore/cache.go 100% <100%> (ø) ⬆️
storage/spanstore/metrics/decorator.go 100% <100%> (ø) ⬆️
plugin/storage/cassandra/spanstore/writer.go 100% <100%> (ø) ⬆️
...gin/storage/cassandra/spanstore/operation_names.go 97.59% <100%> (ø) ⬆️
plugin/storage/es/spanstore/reader.go 100% <100%> (ø) ⬆️
plugin/storage/grpc/shared/grpc_client.go 85.96% <100%> (+1.8%) ⬆️
plugin/storage/grpc/shared/grpc_server.go 76.47% <100%> (+2.44%) ⬆️
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 11cf2b9...81ca941. Read the comment docs.

- shorten var names and wrap lines
- make grpc server backward compatible
- write struct instead of list of strings for operation_names

Signed-off-by: Jun Guo <guo0693@gmail.com>
plugin/storage/cassandra/spanstore/operation_names.go Outdated Show resolved Hide resolved
plugin/storage/badger/spanstore/reader.go Outdated Show resolved Hide resolved
plugin/storage/cassandra/spanstore/dbmodel/operation.go Outdated Show resolved Hide resolved
plugin/storage/cassandra/spanstore/operation_names.go Outdated Show resolved Hide resolved
plugin/storage/grpc/shared/grpc_server.go Show resolved Hide resolved
plugin/storage/grpc/shared/grpc_server.go Outdated Show resolved Hide resolved
plugin/storage/integration/kafka_test.go Outdated Show resolved Hide resolved
plugin/storage/memory/memory_test.go Show resolved Hide resolved
- Backward compatibility for grpc client

Signed-off-by: Jun Guo <guo0693@gmail.com>
@yurishkuro
Copy link
Member

But we need to merge the PRs in reverse order into chained branches. E.g. PR3 merge to branch 2 then PR2 merge into branch 1, then PR1 into master.

I've never tried this, but GH allows you to change the base branch of a PR: https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/changing-the-base-branch-of-a-pull-request

@guo0693
Copy link
Contributor Author

guo0693 commented Nov 25, 2019

But we need to merge the PRs in reverse order into chained branches. E.g. PR3 merge to branch 2 then PR2 merge into branch 1, then PR1 into master.

I've never tried this, but GH allows you to change the base branch of a PR: https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/changing-the-base-branch-of-a-pull-request

It doesn't work that well for us:
master
branch1
branch2

assume branch1 has several commits, branch2 is based on branch1. After branch1 merged to master, those commits are squashed, when we update PR from branch2 to compare to master, the commit history is different, we will need to merge master into branch2 and solve merge conflicts first, this will apply to all the dependent branches and require extra reviews.

@guo0693
Copy link
Contributor Author

guo0693 commented Nov 25, 2019

Btw, this is the 3rd PR for the endpoint changes: https://github.com/guo0693/jaeger/pull/2/files, since the 3rd PR is relatively small, we can merge this PR first, I will create a patch from 3rd PR and apply to the merged master then open a new PR for endpoint changes.

So let's focus on getting this PR merged.

cmd/query/app/http_handler_test.go Show resolved Hide resolved
cmd/query/app/querysvc/query_service.go Show resolved Hide resolved
plugin/storage/cassandra/spanstore/reader_test.go Outdated Show resolved Hide resolved
plugin/storage/grpc/shared/grpc_client_test.go Outdated Show resolved Hide resolved
plugin/storage/integration/integration_test.go Outdated Show resolved Hide resolved
plugin/storage/memory/memory.go Outdated Show resolved Hide resolved
Signed-off-by: Jun Guo <guo0693@gmail.com>
Signed-off-by: Jun Guo <guo0693@gmail.com>
@yurishkuro yurishkuro merged commit bf64373 into jaegertracing:master Nov 25, 2019
@pavolloffay pavolloffay added this to the Release 1.16 milestone Dec 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants