-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Conversation
Signed-off-by: Mahad Zaryab <mahadzaryab1@gmail.com>
Signed-off-by: Mahad Zaryab <mahadzaryab1@gmail.com>
Signed-off-by: Mahad Zaryab <mahadzaryab1@gmail.com>
Signed-off-by: Mahad Zaryab <mahadzaryab1@gmail.com>
Signed-off-by: Mahad Zaryab <mahadzaryab1@gmail.com>
Signed-off-by: Mahad Zaryab <mahadzaryab1@gmail.com>
Signed-off-by: Mahad Zaryab <mahadzaryab1@gmail.com>
Signed-off-by: Mahad Zaryab <mahadzaryab1@gmail.com>
Signed-off-by: Mahad Zaryab <mahadzaryab1@gmail.com>
Signed-off-by: Mahad Zaryab <mahadzaryab1@gmail.com>
Signed-off-by: Mahad Zaryab <mahadzaryab1@gmail.com>
Signed-off-by: Mahad Zaryab <mahadzaryab1@gmail.com>
Signed-off-by: Mahad Zaryab <mahadzaryab1@gmail.com>
Signed-off-by: Mahad Zaryab <mahadzaryab1@gmail.com>
Signed-off-by: Mahad Zaryab <mahadzaryab1@gmail.com>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6567 +/- ##
==========================================
- Coverage 96.10% 96.05% -0.05%
==========================================
Files 366 364 -2
Lines 20949 20747 -202
==========================================
- Hits 20133 19929 -204
- Misses 620 622 +2
Partials 196 196
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Signed-off-by: Mahad Zaryab <mahadzaryab1@gmail.com>
Signed-off-by: Mahad Zaryab <mahadzaryab1@gmail.com>
Signed-off-by: Mahad Zaryab <mahadzaryab1@gmail.com>
Signed-off-by: Mahad Zaryab <mahadzaryab1@gmail.com>
Signed-off-by: Mahad Zaryab <mahadzaryab1@gmail.com>
Signed-off-by: Mahad Zaryab <mahadzaryab1@gmail.com>
Signed-off-by: Mahad Zaryab <mahadzaryab1@gmail.com>
Signed-off-by: Mahad Zaryab <mahadzaryab1@gmail.com>
Signed-off-by: Mahad Zaryab <mahadzaryab1@gmail.com>
Signed-off-by: Mahad Zaryab <mahadzaryab1@gmail.com>
plugin/storage/factory.go
Outdated
for t := range uniqueTypes { | ||
ff, err := f.getFactoryOfType(t) | ||
if err != nil { | ||
return nil, err | ||
} | ||
f.factories[t] = ff | ||
|
||
af, err := f.getArchiveFactoryOfType(t) | ||
if err == nil { |
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.
should error be logged if not nil?
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.
or if it's not an error then I would return bool
plugin/configurable.go
Outdated
|
||
// Inheritable is an interface that can be implement by some storage implementations | ||
// to provide a way to inherit configuration settings from another factory. | ||
type Inheritable interface { |
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.
nit: I would move these to plugin/storage, they are not directly related to "configurable", which is factory/storage-agnostic
Signed-off-by: Mahad Zaryab <mahadzaryab1@gmail.com>
Signed-off-by: Mahad Zaryab <mahadzaryab1@gmail.com>
Which problem is this PR solving?
Description of the changes
storage.ArchiveFactory
by refactoring all the storage implementations to remove the distinction between a primary and archive interface. Note that the concept of archive storage remains the same within Jaeger, we just now use the same interface to handle both primary and archive storages.--grpc-storage-archive.server
. Archive storage will also need to be enabled via--grpc-storage-archive.enabled=true
Add Alias from Old Index to New Index
).jaeger_storage.backends
(an example of this can be viewed at https://github.com/jaegertracing/jaeger/blob/main/cmd/jaeger/config-remote-storage.yaml)How was this change tested?
gRPC Storage
On main (establish ground truth)
Start the remote storage binary (uses memory storage by default which implements the ArchiveFactory interface)
Start the all in one binary configured with grpc storage (jaeger-v1)
Traces can be archived from the UI
For jaeger-v2, change the extension section of
cmd/jaeger/internal/all-in-one.yaml
to be the followingand then start the binary as follows:
For current PR
Stop both binaries and checkout this PR
Start two remote storage binaries (in two separate terminals)
Start the all-in-one binary with explicit archive configurations
Traces can be once again archived from the UI
For jaeger-v2, the configuration was changed to the following:
Try running all-in-one without archive-storage enabled
We cannot archive traces
CLI Flags
ElasticSearch CLI Flags
The diff can be viewed here. There is no difference.
Cassandra CLI Flags
The diff can be viewed here. There are a few here differences here in which
cassandra-archive.*
gains some new configuration options that were previously only existed for the primary storage.cassandra-archive.*
also gains some defaults that will be the same as the the primary storage.Checklist
jaeger
:make lint test
jaeger-ui
:npm run lint
andnpm run test