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

[storage] Remove distinction between primary and archive storage interfaces #6567

Merged
merged 82 commits into from
Jan 25, 2025
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
befc6bd
Change ES Options To Only Hold One Namespace
mahadzaryab1 Jan 17, 2025
ab1180b
Add Configuration Fields For Suffixes
mahadzaryab1 Jan 17, 2025
e1d6f7d
Adjust ES Factory To Hold One Config
mahadzaryab1 Jan 17, 2025
5172646
Change Meta Factory To Initialize Archive Separately
mahadzaryab1 Jan 18, 2025
820b360
Phase Out Distinction In Cassandra Factory
mahadzaryab1 Jan 18, 2025
6dcd077
Remove Comment
mahadzaryab1 Jan 18, 2025
2dc7d19
Remove Archive Factory From Blackhole
mahadzaryab1 Jan 18, 2025
00c105c
Remove Archive Factory From Memory
mahadzaryab1 Jan 18, 2025
b57e488
Remove Archive Helper From Adapter
mahadzaryab1 Jan 18, 2025
e90efe7
Remove Concept of Archive From GRPC Storage
mahadzaryab1 Jan 18, 2025
1780ea5
Remove Usages of InitArchiveStorage
mahadzaryab1 Jan 18, 2025
1468260
Remove Archive Factory
mahadzaryab1 Jan 18, 2025
43b7604
Fix Cassandra Integration Test
mahadzaryab1 Jan 18, 2025
7c4c43e
Fix ES Integration Test
mahadzaryab1 Jan 18, 2025
0b2280a
Fix GRPC Integration Tests
mahadzaryab1 Jan 18, 2025
5a06df6
Fix Typo
mahadzaryab1 Jan 18, 2025
6936344
Fix Integration Test Cleanup
mahadzaryab1 Jan 18, 2025
9b8571d
Move Init Function To Factory Struct
mahadzaryab1 Jan 18, 2025
8fc4680
Refactor Cassandra Configuration
mahadzaryab1 Jan 18, 2025
71273b5
Refactor ES Configuration
mahadzaryab1 Jan 18, 2025
03a0768
Simplify Construction of Factory
mahadzaryab1 Jan 18, 2025
2195e1d
Remove Unused Archive Fields
mahadzaryab1 Jan 18, 2025
42c5751
Fix GRPC Handler And Client Tests
mahadzaryab1 Jan 19, 2025
0e4f7f7
Fix ES Unit Tests
mahadzaryab1 Jan 19, 2025
a14a649
Fix Cassandra Tests
mahadzaryab1 Jan 19, 2025
bac94c8
Fix Blackhole Test
mahadzaryab1 Jan 19, 2025
f049b5a
Fix Meta Factory Tests
mahadzaryab1 Jan 19, 2025
efb4353
Fix GRPC Factory Tests
mahadzaryab1 Jan 19, 2025
3a271cb
Remove Archive Mocks
mahadzaryab1 Jan 19, 2025
2120635
Run Formatter
mahadzaryab1 Jan 19, 2025
9336407
Merge branch 'main' into v1-es-archive
mahadzaryab1 Jan 19, 2025
23cca33
Add Unit Test For InitArchiveStorage
mahadzaryab1 Jan 19, 2025
82e568c
Fix Query App Flags Test
mahadzaryab1 Jan 19, 2025
382b3af
Fix Server Tests With Some Commented Out
mahadzaryab1 Jan 19, 2025
677405d
Fix ES Unit Tests
mahadzaryab1 Jan 19, 2025
ae8d2fd
Fix GRPC Handler Tests
mahadzaryab1 Jan 19, 2025
ac4ceab
Fix Cassandra Tests
mahadzaryab1 Jan 19, 2025
7654aa7
Change Default to blackhole
mahadzaryab1 Jan 19, 2025
5f52410
Fix Test
mahadzaryab1 Jan 19, 2025
e8f61f9
Fix Remote Storage App Tests By Introducing Interface
mahadzaryab1 Jan 19, 2025
2fe8982
Use FakeFactory For Storage Errors Test
mahadzaryab1 Jan 20, 2025
c75bcaf
Add Tests For Missing Code Paths
mahadzaryab1 Jan 20, 2025
9656083
Move Logic To Initialization
mahadzaryab1 Jan 20, 2025
f4afdf1
Add Unit Test For Archive Factory
mahadzaryab1 Jan 20, 2025
1ae9be2
Add Test For Cassandra Factory
mahadzaryab1 Jan 20, 2025
11ec9fe
Allow Inheriting of Default Settings
mahadzaryab1 Jan 20, 2025
782e3ea
Add Unit Test To Cassandra Factory
mahadzaryab1 Jan 20, 2025
263315b
Add Unit Test To ES Factory
mahadzaryab1 Jan 20, 2025
3045049
Change Input To Be Func Type
mahadzaryab1 Jan 21, 2025
944d425
Add Documentation For New Configuration Fields
mahadzaryab1 Jan 21, 2025
a3440be
Change Name of Interface
mahadzaryab1 Jan 21, 2025
d1674a4
Fix Unit Tests
mahadzaryab1 Jan 21, 2025
8b90aeb
Remove Unused Types
mahadzaryab1 Jan 21, 2025
510fc66
Fix nit in Test
mahadzaryab1 Jan 21, 2025
6761944
Move Inheritance To InitFromViper
mahadzaryab1 Jan 21, 2025
b7698b8
Change File Watcher To Be Singular
mahadzaryab1 Jan 21, 2025
5634ef6
Merge branch 'main' into v1-es-archive
mahadzaryab1 Jan 21, 2025
47ff4c1
Merge branch 'main' into v1-es-archive
mahadzaryab1 Jan 22, 2025
66436be
Fix Test
mahadzaryab1 Jan 22, 2025
a278cad
Remove Redundant Check
mahadzaryab1 Jan 22, 2025
2ec0c9a
Fix Flaky Unit Test
mahadzaryab1 Jan 22, 2025
0675e7a
Add Test For Inheritable
mahadzaryab1 Jan 22, 2025
be2f3f9
Merge branch 'main' into v1-es-archive
mahadzaryab1 Jan 22, 2025
06468cc
Merge branch 'main' into v1-es-archive
mahadzaryab1 Jan 22, 2025
c4a67a0
Separate Primary And Archive For GRPC Remote Storage
mahadzaryab1 Jan 23, 2025
3afcdb5
Fix Typo
mahadzaryab1 Jan 23, 2025
9c4c573
Add Missing Cleanup Call
mahadzaryab1 Jan 23, 2025
1f809e9
Merge branch 'main' into v1-es-archive
mahadzaryab1 Jan 23, 2025
89ba32d
Add ArchiveCapable Interface To Initialize Correctly
mahadzaryab1 Jan 23, 2025
ba068b1
Add Enabled Flag For GRPC Archive
mahadzaryab1 Jan 24, 2025
aea0e8b
Fix Logic
mahadzaryab1 Jan 24, 2025
e73ec5c
Remove Print
mahadzaryab1 Jan 24, 2025
44d8b78
Add Test For Archive Configurable
mahadzaryab1 Jan 24, 2025
3d0f3d3
Add Unit Tests For IsArchiveCapable Function
mahadzaryab1 Jan 24, 2025
558b1fc
Merge branch 'main' into v1-es-archive
mahadzaryab1 Jan 24, 2025
48ff461
Restore For Merge Conflicts
mahadzaryab1 Jan 25, 2025
2f32ec7
Merge branch 'main' into v1-es-archive
mahadzaryab1 Jan 25, 2025
21ecf5b
Restore Back
mahadzaryab1 Jan 25, 2025
9a42d6b
Move to idl
mahadzaryab1 Jan 25, 2025
d2ef5b3
Address Feedback
mahadzaryab1 Jan 25, 2025
859e4ce
Move Interfaces To Other Package
mahadzaryab1 Jan 25, 2025
ba5fdd4
Add Mocks
mahadzaryab1 Jan 25, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 30 additions & 7 deletions cmd/query/app/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ import (
"github.com/jaegertracing/jaeger/pkg/config"
"github.com/jaegertracing/jaeger/pkg/config/tlscfg"
"github.com/jaegertracing/jaeger/pkg/tenancy"
"github.com/jaegertracing/jaeger/plugin/storage"
"github.com/jaegertracing/jaeger/ports"
"github.com/jaegertracing/jaeger/storage"
"github.com/jaegertracing/jaeger/storage/spanstore"
"github.com/jaegertracing/jaeger/storage_v2/v1adapter"
)

Expand Down Expand Up @@ -139,9 +140,13 @@ func (qOpts *QueryOptions) InitFromViper(v *viper.Viper, logger *zap.Logger) (*Q
}

// BuildQueryServiceOptions creates a QueryServiceOptions struct with appropriate adjusters and archive config
func (qOpts *QueryOptions) BuildQueryServiceOptions(storageFactory storage.BaseFactory, logger *zap.Logger) *querysvc.QueryServiceOptions {
func (qOpts *QueryOptions) BuildQueryServiceOptions(storageFactory *storage.Factory, logger *zap.Logger) *querysvc.QueryServiceOptions {
opts := &querysvc.QueryServiceOptions{}
if !opts.InitArchiveStorage(storageFactory, logger) {
ar, aw := initArchiveStorage(storageFactory, logger)
if ar != nil && aw != nil {
opts.ArchiveSpanReader = ar
opts.ArchiveSpanWriter = aw
} else {
logger.Info("Archive storage not initialized")
}

Expand All @@ -150,13 +155,13 @@ func (qOpts *QueryOptions) BuildQueryServiceOptions(storageFactory storage.BaseF
return opts
}

func (qOpts *QueryOptions) BuildQueryServiceOptionsV2(storageFactory storage.BaseFactory, logger *zap.Logger) *v2querysvc.QueryServiceOptions {
func (qOpts *QueryOptions) BuildQueryServiceOptionsV2(storageFactory *storage.Factory, logger *zap.Logger) *v2querysvc.QueryServiceOptions {
opts := &v2querysvc.QueryServiceOptions{}

ar, aw := v1adapter.InitializeArchiveStorage(storageFactory, logger)
ar, aw := initArchiveStorage(storageFactory, logger)
if ar != nil && aw != nil {
opts.ArchiveTraceReader = ar
opts.ArchiveTraceWriter = aw
opts.ArchiveTraceReader = v1adapter.NewTraceReader(ar)
opts.ArchiveTraceWriter = v1adapter.NewTraceWriter(aw)
} else {
yurishkuro marked this conversation as resolved.
Show resolved Hide resolved
logger.Info("Archive storage not initialized")
}
Expand All @@ -166,6 +171,24 @@ func (qOpts *QueryOptions) BuildQueryServiceOptionsV2(storageFactory storage.Bas
return opts
}

func initArchiveStorage(
storageFactory *storage.Factory,
logger *zap.Logger,
) (spanstore.Reader, spanstore.Writer) {
reader, err := storageFactory.CreateArchiveSpanReader()
if err != nil {
logger.Error("Cannot init archive storage reader", zap.Error(err))
return nil, nil
}
writer, err := storageFactory.CreateArchiveSpanWriter()
if err != nil {
logger.Error("Cannot init archive storage writer", zap.Error(err))
return nil, nil
}

return reader, writer
}

// stringSliceAsHeader parses a slice of strings and returns a http.Header.
// Each string in the slice is expected to be in the format "key: value"
func stringSliceAsHeader(slice []string) (http.Header, error) {
Expand Down
33 changes: 0 additions & 33 deletions cmd/query/app/querysvc/query_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,8 @@ import (
"errors"
"time"

"go.uber.org/zap"

"github.com/jaegertracing/jaeger/model"
mahadzaryab1 marked this conversation as resolved.
Show resolved Hide resolved
"github.com/jaegertracing/jaeger/model/adjuster"
"github.com/jaegertracing/jaeger/storage"
"github.com/jaegertracing/jaeger/storage/spanstore"
"github.com/jaegertracing/jaeger/storage_v2/depstore"
"github.com/jaegertracing/jaeger/storage_v2/tracestore"
Expand Down Expand Up @@ -164,36 +161,6 @@ func (qs QueryService) GetCapabilities() StorageCapabilities {
}
}

// InitArchiveStorage tries to initialize archive storage reader/writer if storage factory supports them.
func (opts *QueryServiceOptions) InitArchiveStorage(storageFactory storage.BaseFactory, logger *zap.Logger) bool {
archiveFactory, ok := storageFactory.(storage.ArchiveFactory)
if !ok {
logger.Info("Archive storage not supported by the factory")
return false
}
reader, err := archiveFactory.CreateArchiveSpanReader()
if errors.Is(err, storage.ErrArchiveStorageNotConfigured) || errors.Is(err, storage.ErrArchiveStorageNotSupported) {
logger.Info("Archive storage not created", zap.String("reason", err.Error()))
return false
}
if err != nil {
logger.Error("Cannot init archive storage reader", zap.Error(err))
return false
}
writer, err := archiveFactory.CreateArchiveSpanWriter()
if errors.Is(err, storage.ErrArchiveStorageNotConfigured) || errors.Is(err, storage.ErrArchiveStorageNotSupported) {
logger.Info("Archive storage not created", zap.String("reason", err.Error()))
return false
}
if err != nil {
logger.Error("Cannot init archive storage writer", zap.Error(err))
return false
}
opts.ArchiveSpanReader = reader
opts.ArchiveSpanWriter = writer
return true
}

// hasArchiveStorage returns true if archive storage reader/writer are initialized.
func (opts *QueryServiceOptions) hasArchiveStorage() bool {
return opts.ArchiveSpanReader != nil && opts.ArchiveSpanWriter != nil
Expand Down
50 changes: 1 addition & 49 deletions cmd/query/app/querysvc/query_service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -451,65 +451,17 @@ func TestGetCapabilitiesWithSupportsArchive(t *testing.T) {

type fakeStorageFactory1 struct{}

type fakeStorageFactory2 struct {
fakeStorageFactory1
r spanstore.Reader
w spanstore.Writer
rErr error
wErr error
}

func (*fakeStorageFactory1) Initialize(metrics.Factory, *zap.Logger) error {
return nil
}
func (*fakeStorageFactory1) CreateSpanReader() (spanstore.Reader, error) { return nil, nil }
func (*fakeStorageFactory1) CreateSpanWriter() (spanstore.Writer, error) { return nil, nil }
func (*fakeStorageFactory1) CreateDependencyReader() (dependencystore.Reader, error) { return nil, nil }

func (f *fakeStorageFactory2) CreateArchiveSpanReader() (spanstore.Reader, error) { return f.r, f.rErr }
func (f *fakeStorageFactory2) CreateArchiveSpanWriter() (spanstore.Writer, error) { return f.w, f.wErr }

var (
_ storage.Factory = new(fakeStorageFactory1)
_ storage.ArchiveFactory = new(fakeStorageFactory2)
_ storage.Factory = new(fakeStorageFactory1)
)

func TestInitArchiveStorageErrors(t *testing.T) {
opts := &QueryServiceOptions{}
logger := zap.NewNop()

assert.False(t, opts.InitArchiveStorage(new(fakeStorageFactory1), logger))
assert.False(t, opts.InitArchiveStorage(
&fakeStorageFactory2{rErr: storage.ErrArchiveStorageNotConfigured},
logger,
))
assert.False(t, opts.InitArchiveStorage(
&fakeStorageFactory2{rErr: errors.New("error")},
logger,
))
assert.False(t, opts.InitArchiveStorage(
&fakeStorageFactory2{wErr: storage.ErrArchiveStorageNotConfigured},
logger,
))
assert.False(t, opts.InitArchiveStorage(
&fakeStorageFactory2{wErr: errors.New("error")},
logger,
))
}

func TestInitArchiveStorage(t *testing.T) {
opts := &QueryServiceOptions{}
logger := zap.NewNop()
reader := &spanstoremocks.Reader{}
writer := &spanstoremocks.Writer{}
assert.True(t, opts.InitArchiveStorage(
&fakeStorageFactory2{r: reader, w: writer},
logger,
))
assert.Equal(t, reader, opts.ArchiveSpanReader)
assert.Equal(t, writer, opts.ArchiveSpanWriter)
}

func TestMain(m *testing.M) {
testutils.VerifyGoLeaks(m)
}
Expand Down
34 changes: 24 additions & 10 deletions cmd/remote-storage/app/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,11 @@
"google.golang.org/grpc/health"
"google.golang.org/grpc/reflection"

"github.com/jaegertracing/jaeger/cmd/query/app/querysvc"
"github.com/jaegertracing/jaeger/pkg/bearertoken"
"github.com/jaegertracing/jaeger/pkg/telemetry"
"github.com/jaegertracing/jaeger/pkg/tenancy"
"github.com/jaegertracing/jaeger/plugin/storage"
"github.com/jaegertracing/jaeger/plugin/storage/grpc/shared"
"github.com/jaegertracing/jaeger/storage"
"github.com/jaegertracing/jaeger/storage/dependencystore"
"github.com/jaegertracing/jaeger/storage/spanstore"
)
Expand All @@ -37,7 +36,7 @@
}

// NewServer creates and initializes Server.
func NewServer(options *Options, storageFactory storage.BaseFactory, tm *tenancy.Manager, telset telemetry.Settings) (*Server, error) {
func NewServer(options *Options, storageFactory *storage.Factory, tm *tenancy.Manager, telset telemetry.Settings) (*Server, error) {
handler, err := createGRPCHandler(storageFactory, telset.Logger)
if err != nil {
return nil, err
Expand All @@ -55,7 +54,7 @@
}, nil
}

func createGRPCHandler(f storage.BaseFactory, logger *zap.Logger) (*shared.GRPCHandler, error) {
func createGRPCHandler(f *storage.Factory, logger *zap.Logger) (*shared.GRPCHandler, error) {
reader, err := f.CreateSpanReader()
if err != nil {
return nil, err
Expand All @@ -76,12 +75,9 @@
StreamingSpanWriter: func() spanstore.Writer { return nil },
}

// borrow code from Query service for archive storage
qOpts := &querysvc.QueryServiceOptions{}
// when archive storage not initialized (returns false), the reader/writer will be nil
_ = qOpts.InitArchiveStorage(f, logger)
impl.ArchiveSpanReader = func() spanstore.Reader { return qOpts.ArchiveSpanReader }
impl.ArchiveSpanWriter = func() spanstore.Writer { return qOpts.ArchiveSpanWriter }
ar, aw := initArchiveStorage(f, logger)
impl.ArchiveSpanReader = func() spanstore.Reader { return ar }
impl.ArchiveSpanWriter = func() spanstore.Writer { return aw }

handler := shared.NewGRPCHandler(impl)
Copy link
Member

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.

Copy link
Collaborator Author

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.

Copy link
Member

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.

Copy link
Collaborator Author

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.

Copy link
Member

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 receiving remote-storage can be configured with e.g. Cassandra having both primary and archive, and WriteSpan 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 call grpc:ArchiveSpan method, which will be dispatched by remote-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:

  1. Keep the bifurcation in grpc factory. This will allow v1 to maintain compatibility, but in jaeger-v2 it will be a genuine breaking change. The only workaround would be to run two different ports / servers, both accepting the same grpc:WriteSpan call and dispatching to different storages.
  2. Make the same breaking change across v1/v2, with the same workaround as above.

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.

Copy link
Collaborator Author

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?

Copy link
Member

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.

return handler, nil
Expand Down Expand Up @@ -143,3 +139,21 @@
s.telset.ReportStatus(componentstatus.NewEvent(componentstatus.StatusStopped))
return nil
}

func initArchiveStorage(
mahadzaryab1 marked this conversation as resolved.
Show resolved Hide resolved
storageFactory *storage.Factory,
logger *zap.Logger,
) (spanstore.Reader, spanstore.Writer) {
reader, err := storageFactory.CreateArchiveSpanReader()
if err != nil {
logger.Error("Cannot init archive storage reader", zap.Error(err))
return nil, nil
}
writer, err := storageFactory.CreateArchiveSpanWriter()
if err != nil {
logger.Error("Cannot init archive storage writer", zap.Error(err))
return nil, nil
}

Check warning on line 156 in cmd/remote-storage/app/server.go

View check run for this annotation

Codecov / codecov/patch

cmd/remote-storage/app/server.go#L152-L156

Added lines #L152 - L156 were not covered by tests

return reader, writer

Check warning on line 158 in cmd/remote-storage/app/server.go

View check run for this annotation

Codecov / codecov/patch

cmd/remote-storage/app/server.go#L158

Added line #L158 was not covered by tests
}
4 changes: 3 additions & 1 deletion pkg/es/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,9 @@ type Configuration struct {
// UseReadWriteAliases, if set to true, will use read and write aliases for indices.
// Use this option with Elasticsearch rollover API. It requires an external component
// to create aliases before startup and then performing its management.
UseReadWriteAliases bool `mapstructure:"use_aliases"`
UseReadWriteAliases bool `mapstructure:"use_aliases"`
ReadAliasSuffix string `mapstructure:"-"`
mahadzaryab1 marked this conversation as resolved.
Show resolved Hide resolved
WriteAliasSuffix string `mapstructure:"-"`
// CreateIndexTemplates, if set to true, creates index templates at application startup.
// This configuration should be set to false when templates are installed manually.
CreateIndexTemplates bool `mapstructure:"create_mappings"`
Expand Down
12 changes: 4 additions & 8 deletions plugin/storage/badger/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,10 @@ const (
)

var ( // interface comformance checks
_ storage.Factory = (*Factory)(nil)
_ io.Closer = (*Factory)(nil)
_ plugin.Configurable = (*Factory)(nil)
_ storage.Purger = (*Factory)(nil)

// TODO badger could implement archive storage
// _ storage.ArchiveFactory = (*Factory)(nil)

_ storage.Factory = (*Factory)(nil)
_ io.Closer = (*Factory)(nil)
_ plugin.Configurable = (*Factory)(nil)
_ storage.Purger = (*Factory)(nil)
_ storage.SamplingStoreFactory = (*Factory)(nil)
)

Expand Down
13 changes: 1 addition & 12 deletions plugin/storage/blackhole/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ import (
)

var ( // interface comformance checks
_ storage.Factory = (*Factory)(nil)
_ storage.ArchiveFactory = (*Factory)(nil)
_ storage.Factory = (*Factory)(nil)
)

// Factory implements storage.Factory and creates blackhole storage components.
Expand Down Expand Up @@ -48,16 +47,6 @@ func (f *Factory) CreateSpanWriter() (spanstore.Writer, error) {
return f.store, nil
}

// CreateArchiveSpanReader implements storage.ArchiveFactory
func (f *Factory) CreateArchiveSpanReader() (spanstore.Reader, error) {
return f.store, nil
}

// CreateArchiveSpanWriter implements storage.ArchiveFactory
func (f *Factory) CreateArchiveSpanWriter() (spanstore.Writer, error) {
return f.store, nil
}

// CreateDependencyReader implements storage.Factory
func (f *Factory) CreateDependencyReader() (dependencystore.Reader, error) {
return f.store, nil
Expand Down
Loading
Loading