Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
[storage] Remove distinction between primary and
archive
storage interfaces #6567[storage] Remove distinction between primary and
archive
storage interfaces #6567Changes from 16 commits
befc6bd
ab1180b
e1d6f7d
5172646
820b360
6dcd077
2dc7d19
00c105c
b57e488
e90efe7
1780ea5
1468260
43b7604
7c4c43e
0b2280a
5a06df6
6936344
9b8571d
8fc4680
71273b5
03a0768
2195e1d
42c5751
0e4f7f7
a14a649
bac94c8
f049b5a
efb4353
3a271cb
2120635
9336407
23cca33
82e568c
382b3af
677405d
ae8d2fd
ac4ceab
7654aa7
5f52410
e8f61f9
2fe8982
c75bcaf
9656083
f4afdf1
1ae9be2
11ec9fe
782e3ea
263315b
3045049
944d425
a3440be
d1674a4
8b90aeb
510fc66
6761944
b7698b8
5634ef6
47ff4c1
66436be
a278cad
2ec0c9a
0675e7a
be2f3f9
06468cc
c4a67a0
3afcdb5
9c4c573
1f809e9
89ba32d
ba068b1
aea0e8b
e73ec5c
44d8b78
3d0f3d3
558b1fc
48ff461
2f32ec7
21ecf5b
9a42d6b
d2ef5b3
859e4ce
ba5fdd4
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The existing Remote Storage API v1 has dedicated methods for WriteSpan and ArchiveSpan, exposed on the same gRPC service / port. Do we actually want that? Because the grpc storage client no longer knows about primary/archive, so it has only one SpanWriter that always calls
WriteSpan
gRPC method.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yurishkuro Yeah at the moment they should be using the same writer and doing the same thing. Do we want to remove it? It would be a breaking change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mean removing Archive methods from gRPC API? Yes, it would be a breaking change. This PR is already a breaking change in that respect because the caller will never call those Archive methods. One way to make it work is to make gRPC v1 storage to be aware of "archive" mode and call different Write/Read methods on the gRPC client.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yurishkuro Can you explain a bit more about how this is breaking change currently? I was trying to still have the gRPC API serve the archive methods - just using the same reader as primary. Let me know if I overlooked something in the process.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Today the grpc-storage implements ArchiveFactory. So on the main write path the primary writer is used that calls
grpc:WriteSpan
method from Remote Storage API. The receivingremote-storage
can be configured with e.g. Cassandra having both primary and archive, andWriteSpan
will be dispatched to the primary session. Similarly, if query service tries to archive span, it will ask for ArchiveWriter from the factory, and that writer will callgrpc:ArchiveSpan
method, which will be dispatched byremote-storage
to Cassandra's archive session. So we have a clear separation of namespaces, and grpc factory does not need dual configuration (like Cassandra did) because its config is just a grcp host:port and the distinction between primary/archive logic happens via corresponding gRPC methods.With this PR grps factory will not know of archive path at all and will keep calling the same
grpc:WriteSpan
method, thus writing to the same Cassandra namespace (breaking change and just incorrect).So here it's not only the factory implementation that's in the way but also the Remote Storage API which is actually aware of archive capability via dedicated methods. While we can tweak the factory, we cannot deviate from the Remote Storage API contract.
We have two options:
I am inclined to go with (2), because if we go with (1) we avoid breaking change for jaeger-v1, but it will still happen later when we introduce v2 storage API where there won't be a distinction for archive.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yurishkuro Sounds good. Do we want to make that change in this PR or in a separate one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think option 2 actually does not require changes, only a migration plan similar to the previous PR.
Check warning on line 156 in cmd/remote-storage/app/server.go
Codecov / codecov/patch
cmd/remote-storage/app/server.go#L152-L156
Check warning on line 158 in cmd/remote-storage/app/server.go
Codecov / codecov/patch
cmd/remote-storage/app/server.go#L158