-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[storage] Remove distinction between primary and
archive
storage in…
…terfaces (#6567) ## Which problem is this PR solving? - Towards #6065 ## Description of the changes - This PR completely removes the interface `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. - 🛑 Breaking change for users of GRPC storage 🛑 - The GRPC storage was changed to only dispatch to the primary storage instead of being able to dispatch to a primary and archive storage. - Mitigation for jaeger-v1 users: In order to restore your archive storage, configure a new GRPC server on a different port and specify it via `--grpc-storage-archive.server`. Archive storage will also need to be enabled via `--grpc-storage-archive.enabled=true` - Mitigation for jaeger-v2 users: In order to restore your archive storage, configured a new GRPC server on a different port and specify it via a new storage backend in `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) ``` go run ./cmd/remote-storage ``` Start the all in one binary configured with grpc storage (jaeger-v1) ``` SPAN_STORAGE_TYPE=grpc go run ./cmd/all-in-one --grpc-storage.server=http://localhost:17271 ``` Traces can be archived from the UI <img width="1469" alt="Screenshot 2025-01-23 at 10 17 32 PM" src="https://github.com/user-attachments/assets/76a7341b-0344-479b-ad78-380a32412ee4" /> For jaeger-v2, change the extension section of `cmd/jaeger/internal/all-in-one.yaml` to be the following ```yaml jaeger_query: storage: traces: some_storage traces_archive: some_storage jaeger_storage: backends: some_storage: grpc: endpoint: localhost:17271 tls: insecure: true ``` and then start the binary as follows: ``` go run ./cmd/jaeger/ ``` #### For current PR Stop both binaries and checkout this PR ``` gh pr checkout 6567 ``` Start two remote storage binaries (in two separate terminals) ``` go run ./cmd/remote-storage --admin.http.host-port=:17270 --grpc.host-port=:17271 go run ./cmd/remote-storage --admin.http.host-port=:17272 --grpc.host-port=:17273 ``` Start the all-in-one binary with explicit archive configurations ``` SPAN_STORAGE_TYPE=grpc go run ./cmd/all-in-one --grpc-storage.server=http://localhost:17271 --grpc-storage-archive.enabled=true --grpc-storage-archive.server=http://localhost:17273 ``` Traces can be once again archived from the UI <img width="1469" alt="Screenshot 2025-01-23 at 10 25 29 PM" src="https://github.com/user-attachments/assets/1b4ca69f-e94b-4b08-8854-04d3db2650fc" /> For jaeger-v2, the configuration was changed to the following: ```yaml extensions: jaeger_query: storage: traces: some_storage traces_archive: another_storage jaeger_storage: backends: some_storage: grpc: endpoint: localhost:17271 tls: insecure: true another_storage: grpc: endpoint: localhost:17273 tls: insecure: true ``` Try running all-in-one without archive-storage enabled ``` SPAN_STORAGE_TYPE=grpc go run ./cmd/all-in-one --grpc-storage.server=http://localhost:17271 ``` We cannot archive traces <img width="1469" alt="Screenshot 2025-01-23 at 10 26 53 PM" src="https://github.com/user-attachments/assets/0ae7cdb6-25a5-4a74-be63-fb421d77d611" /> ### CLI Flags #### ElasticSearch CLI Flags ``` git checkout main SPAN_STORAGE_TYPE=elasticsearch go run ./cmd/collector help > es_main git checkout v1-es-archive SPAN_STORAGE_TYPE=elasticsearch go run ./cmd/collector help > es_current ``` The diff can be viewed [here](https://www.diffchecker.com/xXuFqnOc/). There is no difference. #### Cassandra CLI Flags ``` git checkout main SPAN_STORAGE_TYPE=cassandra go run ./cmd/collector help > cassandra_main git checkout v1-es-archive SPAN_STORAGE_TYPE=cassandra go run ./cmd/collector help > cassandra_current ``` The diff can be viewed [here](https://www.diffchecker.com/x74PKvhA/). 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 - [x] I have read https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md - [x] I have signed all commits - [x] I have added unit tests for the new functionality - [x] I have run lint and test steps successfully - for `jaeger`: `make lint test` - for `jaeger-ui`: `npm run lint` and `npm run test` --------- Signed-off-by: Mahad Zaryab <[email protected]> Signed-off-by: Mahad Zaryab <[email protected]>
- Loading branch information
1 parent
aece007
commit d7ab0f8
Showing
49 changed files
with
1,126 additions
and
1,674 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.