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 dependency on archive flag in ES reader #6490

Merged
merged 33 commits into from
Jan 14, 2025
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
9d1d999
Use ReadWriteAliases Instead of Archive Flag
mahadzaryab1 Jan 8, 2025
4f5cad5
Remove Archive Flag From Writer
mahadzaryab1 Jan 8, 2025
af2e9ec
Introduce New Arguments To Remove IsArchive Flag
mahadzaryab1 Jan 8, 2025
904d3fb
Introduce New Arguments To Remove IsArchive Flag In Writer
mahadzaryab1 Jan 8, 2025
6bc1ebf
Fix Tests
mahadzaryab1 Jan 8, 2025
0ae679d
Update Callsites
mahadzaryab1 Jan 8, 2025
c0ea9a2
Propagate Arguments To Archive Constructor
mahadzaryab1 Jan 8, 2025
5659221
Handle Archive And Use Aliases Both Set
mahadzaryab1 Jan 8, 2025
52f63fd
Fix Branching In Reader And Change Variable Name
mahadzaryab1 Jan 9, 2025
c573a66
Fix Branching In Writer And Change Variable Name
mahadzaryab1 Jan 9, 2025
4976f7b
Fix Variable Naming
mahadzaryab1 Jan 9, 2025
77d47c0
Move Check To Constructor
mahadzaryab1 Jan 9, 2025
6b97e7f
Move Check To Constructor
mahadzaryab1 Jan 9, 2025
bdae29b
Update Test For New Codepath
mahadzaryab1 Jan 10, 2025
2bf4a61
Remove Indirection In getSourceFn
mahadzaryab1 Jan 10, 2025
6cf08e8
Fix Linting
mahadzaryab1 Jan 10, 2025
77ca3c3
Merge branch 'main' into es-archive-dependency
mahadzaryab1 Jan 11, 2025
686cc8d
Fix Lint
mahadzaryab1 Jan 11, 2025
b6db77a
Merge branch 'main' into es-archive-dependency
mahadzaryab1 Jan 12, 2025
20f5f5d
Merge branch 'main' into es-archive-dependency
mahadzaryab1 Jan 12, 2025
b785631
Address Feedback From PR Review
mahadzaryab1 Jan 12, 2025
82d049d
Bring Test Back
mahadzaryab1 Jan 12, 2025
cde60af
Address Feedback
mahadzaryab1 Jan 12, 2025
2a5d877
Rename Variable
mahadzaryab1 Jan 12, 2025
bbd6c1f
Remove Config From Factory Test
mahadzaryab1 Jan 12, 2025
7ddb76b
Add Table Test
mahadzaryab1 Jan 12, 2025
c527bb0
Remove Redundant Test
mahadzaryab1 Jan 12, 2025
f4bebe9
Handle Both read_aliases Cases
mahadzaryab1 Jan 12, 2025
baa463b
Fix Variable Names
mahadzaryab1 Jan 13, 2025
3b1e0fb
Change Test Expecation
mahadzaryab1 Jan 13, 2025
865b6e3
Merge branch 'main' into es-archive-dependency
mahadzaryab1 Jan 13, 2025
f9bdd02
Merge branch 'main' into es-archive-dependency
mahadzaryab1 Jan 13, 2025
6688faa
Merge branch 'main' into es-archive-dependency
mahadzaryab1 Jan 14, 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
30 changes: 20 additions & 10 deletions plugin/storage/es/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@

// CreateSpanReader implements storage.Factory
func (f *Factory) CreateSpanReader() (spanstore.Reader, error) {
sr, err := createSpanReader(f.getPrimaryClient, f.primaryConfig, false, f.logger, f.tracer)
sr, err := createSpanReader(f.getPrimaryClient, f.primaryConfig, f.logger, f.tracer, "", f.primaryConfig.UseReadWriteAliases)
if err != nil {
return nil, err
}
Expand All @@ -205,7 +205,7 @@

// CreateSpanWriter implements storage.Factory
func (f *Factory) CreateSpanWriter() (spanstore.Writer, error) {
return createSpanWriter(f.getPrimaryClient, f.primaryConfig, false, f.primaryMetricsFactory, f.logger)
return createSpanWriter(f.getPrimaryClient, f.primaryConfig, f.primaryMetricsFactory, f.logger, "", f.primaryConfig.UseReadWriteAliases)
}

// CreateDependencyReader implements storage.Factory
Expand All @@ -218,7 +218,11 @@
if !f.archiveConfig.Enabled {
return nil, nil
}
sr, err := createSpanReader(f.getArchiveClient, f.archiveConfig, true, f.logger, f.tracer)
yurishkuro marked this conversation as resolved.
Show resolved Hide resolved
suffix := "archive"
if f.archiveConfig.UseReadWriteAliases {
suffix += "-read"
}

Check warning on line 224 in plugin/storage/es/factory.go

View check run for this annotation

Codecov / codecov/patch

plugin/storage/es/factory.go#L223-L224

Added lines #L223 - L224 were not covered by tests
sr, err := createSpanReader(f.getArchiveClient, f.archiveConfig, f.logger, f.tracer, suffix, true)
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 Not ideal to have to do this but this is roughly what we need to maintain backwards compatibility.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm not sure if we want to expose a configuration option to override the default read and write alias but that could be one way to streamline this.

Copy link
Member

Choose a reason for hiding this comment

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

  • who adds read/write suffix to the index name?
  • how does that work for non-archive, does it not use -read suffix?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

who adds read/write suffix to the index name?

Its added by the reader and the writer but we need to handle the special case where the archive storage also has use_aliases set to true

how does that work for non-archive, does it not use -read suffix?

Yeah it does - its done by the reader and the writer. I made some changes to make it an else-if change. The current behavior is that if a suffix is passed in, we use that. If a suffix isn't passed in but use_aliases is set, then we use the default read/write aliases.

Copy link
Member

Choose a reason for hiding this comment

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

that's why I don't follow - if reader/writer automatically add -read/-write suffix, why do you need to add it manually above?

Copy link
Collaborator Author

@mahadzaryab1 mahadzaryab1 Jan 9, 2025

Choose a reason for hiding this comment

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

I add it above just to address the case where use_aliases wasn't initially set for the archive storage. Since we hardcode it to true for the archive storage now, we'll always set the index to be archive-read and archive-write in the reader/writer. But that would break backwards compatibility because previously it would just be archive for both the read and write alias for the archive storage.

if err != nil {
return nil, err
}
Expand All @@ -230,15 +234,20 @@
if !f.archiveConfig.Enabled {
return nil, nil
}
return createSpanWriter(f.getArchiveClient, f.archiveConfig, true, f.archiveMetricsFactory, f.logger)
suffix := "archive"
if f.archiveConfig.UseReadWriteAliases {
suffix += "-write"
}

Check warning on line 240 in plugin/storage/es/factory.go

View check run for this annotation

Codecov / codecov/patch

plugin/storage/es/factory.go#L239-L240

Added lines #L239 - L240 were not covered by tests
return createSpanWriter(f.getArchiveClient, f.archiveConfig, f.archiveMetricsFactory, f.logger, suffix, true)
}

func createSpanReader(
clientFn func() es.Client,
cfg *config.Configuration,
archive bool,
logger *zap.Logger,
tp trace.TracerProvider,
indexSuffix string,
useReadWriteAliases bool,
) (spanstore.Reader, error) {
if cfg.UseILM && !cfg.UseReadWriteAliases {
return nil, errors.New("--es.use-ilm must always be used in conjunction with --es.use-aliases to ensure ES writers and readers refer to the single index mapping")
Expand All @@ -251,8 +260,8 @@
SpanIndex: cfg.Indices.Spans,
ServiceIndex: cfg.Indices.Services,
TagDotReplacement: cfg.Tags.DotReplacement,
UseReadWriteAliases: cfg.UseReadWriteAliases,
Archive: archive,
UseReadWriteAliases: useReadWriteAliases,
IndexSuffix: indexSuffix,
RemoteReadClusters: cfg.RemoteReadClusters,
Logger: logger,
Tracer: tp.Tracer("esSpanStore.SpanReader"),
Expand All @@ -262,9 +271,10 @@
func createSpanWriter(
clientFn func() es.Client,
cfg *config.Configuration,
archive bool,
mFactory metrics.Factory,
logger *zap.Logger,
indexSuffix string,
useReadWriteAliases bool,
) (spanstore.Writer, error) {
var tags []string
var err error
Expand All @@ -279,13 +289,13 @@
writer := esSpanStore.NewSpanWriter(esSpanStore.SpanWriterParams{
Client: clientFn,
IndexPrefix: cfg.Indices.IndexPrefix,
IndexSuffix: indexSuffix,
SpanIndex: cfg.Indices.Spans,
ServiceIndex: cfg.Indices.Services,
AllTagsAsFields: cfg.Tags.AllAsFields,
TagKeysAsFields: tags,
TagDotReplacement: cfg.Tags.DotReplacement,
Archive: archive,
UseReadWriteAliases: cfg.UseReadWriteAliases,
UseReadWriteAliases: useReadWriteAliases,
Logger: logger,
MetricsFactory: mFactory,
ServiceCacheTTL: cfg.ServiceCacheTTL,
Expand Down
5 changes: 0 additions & 5 deletions plugin/storage/es/spanstore/index_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,3 @@ func indexWithDate(indexPrefix, indexDateLayout string, date time.Time) string {
spanDate := date.UTC().Format(indexDateLayout)
return indexPrefix + spanDate
}

// returns archive index name
func archiveIndex(indexPrefix, archiveSuffix string) string {
return indexPrefix + archiveSuffix
}
36 changes: 13 additions & 23 deletions plugin/storage/es/spanstore/reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,10 @@ import (
)

const (
spanIndexBaseName = "jaeger-span-"
serviceIndexBaseName = "jaeger-service-"
archiveIndexSuffix = "archive"
archiveReadIndexSuffix = archiveIndexSuffix + "-read"
archiveWriteIndexSuffix = archiveIndexSuffix + "-write"
traceIDAggregation = "traceIDs"
indexPrefixSeparator = "-"
spanIndexBaseName = "jaeger-span-"
serviceIndexBaseName = "jaeger-service-"
traceIDAggregation = "traceIDs"
indexPrefixSeparator = "-"

traceIDField = "traceID"
durationField = "duration"
Expand Down Expand Up @@ -106,10 +103,10 @@ type SpanReaderParams struct {
MaxSpanAge time.Duration
MaxDocCount int
IndexPrefix cfg.IndexPrefix
IndexSuffix string
SpanIndex cfg.IndexOptions
ServiceIndex cfg.IndexOptions
TagDotReplacement string
Archive bool
UseReadWriteAliases bool
RemoteReadClusters []string
Logger *zap.Logger
Expand All @@ -136,9 +133,9 @@ func NewSpanReader(p SpanReaderParams) *SpanReader {
spanConverter: dbmodel.NewToDomain(p.TagDotReplacement),
timeRangeIndices: getLoggingTimeRangeIndexFn(
mahadzaryab1 marked this conversation as resolved.
Show resolved Hide resolved
p.Logger,
getTimeRangeIndexFn(p.Archive, p.UseReadWriteAliases, p.RemoteReadClusters),
getTimeRangeIndexFn(p.IndexSuffix, p.UseReadWriteAliases, p.RemoteReadClusters),
),
sourceFn: getSourceFn(p.Archive, p.MaxDocCount),
sourceFn: getSourceFn(p.UseReadWriteAliases, p.MaxDocCount),
maxDocCount: p.MaxDocCount,
useReadWriteAliases: p.UseReadWriteAliases,
logger: p.Logger,
Expand All @@ -161,19 +158,12 @@ func getLoggingTimeRangeIndexFn(logger *zap.Logger, fn timeRangeIndexFn) timeRan
}
}

func getTimeRangeIndexFn(archive, useReadWriteAliases bool, remoteReadClusters []string) timeRangeIndexFn {
if archive {
var archiveSuffix string
if useReadWriteAliases {
archiveSuffix = archiveReadIndexSuffix
} else {
archiveSuffix = archiveIndexSuffix
}
func getTimeRangeIndexFn(indexSuffix string, useReadWriteAliases bool, remoteReadClusters []string) timeRangeIndexFn {
if indexSuffix != "" {
return addRemoteReadClusters(func(indexPrefix, _ /* indexDateLayout */ string, _ /* startTime */ time.Time, _ /* endTime */ time.Time, _ /* reduceDuration */ time.Duration) []string {
return []string{archiveIndex(indexPrefix, archiveSuffix)}
return []string{indexPrefix + indexSuffix}
}, remoteReadClusters)
}
if useReadWriteAliases {
} else if useReadWriteAliases {
return addRemoteReadClusters(func(indexPrefix string, _ /* indexDateLayout */ string, _ /* startTime */ time.Time, _ /* endTime */ time.Time, _ /* reduceDuration */ time.Duration) []string {
return []string{indexPrefix + "read"}
}, remoteReadClusters)
Expand Down Expand Up @@ -201,12 +191,12 @@ func addRemoteReadClusters(fn timeRangeIndexFn, remoteReadClusters []string) tim
}
}

func getSourceFn(archive bool, maxDocCount int) sourceFn {
func getSourceFn(useReadWriteAliases bool, maxDocCount int) sourceFn {
return func(query elastic.Query, nextTime uint64) *elastic.SearchSource {
s := elastic.NewSearchSource().
Query(query).
Size(maxDocCount)
if !archive {
if !useReadWriteAliases {
mahadzaryab1 marked this conversation as resolved.
Show resolved Hide resolved
s.Sort("startTime", true).
SearchAfter(nextTime)
}
Expand Down
47 changes: 22 additions & 25 deletions plugin/storage/es/spanstore/reader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ func withArchiveSpanReader(t *testing.T, readAlias bool, fn func(r *spanReaderTe
Tracer: tracer.Tracer("test"),
MaxSpanAge: 0,
TagDotReplacement: "@",
Archive: true,
IndexSuffix: "archive",
UseReadWriteAliases: readAlias,
}),
}
Expand Down Expand Up @@ -199,7 +199,6 @@ func TestSpanReaderIndices(t *testing.T) {
}{
{
params: SpanReaderParams{
Archive: false,
SpanIndex: spanIndexOpts,
ServiceIndex: serviceIndexOpts,
},
Expand All @@ -213,7 +212,6 @@ func TestSpanReaderIndices(t *testing.T) {
},
{
params: SpanReaderParams{
Archive: false,
SpanIndex: spanIndexOpts,
ServiceIndex: serviceIndexOpts,
IndexPrefix: "foo:",
Expand All @@ -228,27 +226,26 @@ func TestSpanReaderIndices(t *testing.T) {
},
{
params: SpanReaderParams{
Archive: true,
IndexSuffix: "archive",
},
indices: []string{spanIndexBaseName + archiveIndexSuffix, serviceIndexBaseName + archiveIndexSuffix},
indices: []string{spanIndexBaseName + "archive", serviceIndexBaseName + "archive"},
},
{
params: SpanReaderParams{
SpanIndex: spanIndexOpts, ServiceIndex: serviceIndexOpts, IndexPrefix: "foo:", Archive: true,
SpanIndex: spanIndexOpts, ServiceIndex: serviceIndexOpts, IndexPrefix: "foo:", IndexSuffix: "archive",
},
indices: []string{"foo:" + config.IndexPrefixSeparator + spanIndexBaseName + archiveIndexSuffix, "foo:" + config.IndexPrefixSeparator + serviceIndexBaseName + archiveIndexSuffix},
indices: []string{"foo:" + config.IndexPrefixSeparator + spanIndexBaseName + "archive", "foo:" + config.IndexPrefixSeparator + serviceIndexBaseName + "archive"},
},
{
params: SpanReaderParams{
SpanIndex: spanIndexOpts, ServiceIndex: serviceIndexOpts, IndexPrefix: "foo:", Archive: true, UseReadWriteAliases: true,
SpanIndex: spanIndexOpts, ServiceIndex: serviceIndexOpts, IndexPrefix: "foo:", IndexSuffix: "archive", UseReadWriteAliases: true,
},
indices: []string{"foo:" + config.IndexPrefixSeparator + spanIndexBaseName + archiveReadIndexSuffix, "foo:" + config.IndexPrefixSeparator + serviceIndexBaseName + archiveReadIndexSuffix},
indices: []string{"foo:" + config.IndexPrefixSeparator + spanIndexBaseName + "archive-read", "foo:" + config.IndexPrefixSeparator + serviceIndexBaseName + "archive-read"},
},
{
params: SpanReaderParams{
SpanIndex: spanIndexOpts,
ServiceIndex: serviceIndexOpts,
Archive: false,
RemoteReadClusters: []string{"cluster_one", "cluster_two"},
},
indices: []string{
Expand All @@ -262,20 +259,20 @@ func TestSpanReaderIndices(t *testing.T) {
},
{
params: SpanReaderParams{
Archive: true, RemoteReadClusters: []string{"cluster_one", "cluster_two"},
IndexSuffix: "archive", RemoteReadClusters: []string{"cluster_one", "cluster_two"},
},
indices: []string{
spanIndexBaseName + archiveIndexSuffix,
"cluster_one:" + spanIndexBaseName + archiveIndexSuffix,
"cluster_two:" + spanIndexBaseName + archiveIndexSuffix,
serviceIndexBaseName + archiveIndexSuffix,
"cluster_one:" + serviceIndexBaseName + archiveIndexSuffix,
"cluster_two:" + serviceIndexBaseName + archiveIndexSuffix,
spanIndexBaseName + "archive",
"cluster_one:" + spanIndexBaseName + "archive",
"cluster_two:" + spanIndexBaseName + "archive",
serviceIndexBaseName + "archive",
"cluster_one:" + serviceIndexBaseName + "archive",
"cluster_two:" + serviceIndexBaseName + "archive",
},
},
{
params: SpanReaderParams{
Archive: false, UseReadWriteAliases: true, RemoteReadClusters: []string{"cluster_one", "cluster_two"},
UseReadWriteAliases: true, RemoteReadClusters: []string{"cluster_one", "cluster_two"},
},
indices: []string{
spanIndexBaseName + "read",
Expand All @@ -288,15 +285,15 @@ func TestSpanReaderIndices(t *testing.T) {
},
{
params: SpanReaderParams{
Archive: true, UseReadWriteAliases: true, RemoteReadClusters: []string{"cluster_one", "cluster_two"},
IndexSuffix: "archive", UseReadWriteAliases: true, RemoteReadClusters: []string{"cluster_one", "cluster_two"},
},
indices: []string{
spanIndexBaseName + archiveReadIndexSuffix,
"cluster_one:" + spanIndexBaseName + archiveReadIndexSuffix,
"cluster_two:" + spanIndexBaseName + archiveReadIndexSuffix,
serviceIndexBaseName + archiveReadIndexSuffix,
"cluster_one:" + serviceIndexBaseName + archiveReadIndexSuffix,
"cluster_two:" + serviceIndexBaseName + archiveReadIndexSuffix,
spanIndexBaseName + "archive-read",
"cluster_one:" + spanIndexBaseName + "archive-read",
"cluster_two:" + spanIndexBaseName + "archive-read",
serviceIndexBaseName + "archive-read",
"cluster_one:" + serviceIndexBaseName + "archive-read",
"cluster_two:" + serviceIndexBaseName + "archive-read",
},
},
}
Expand Down
13 changes: 4 additions & 9 deletions plugin/storage/es/spanstore/writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ type SpanWriterParams struct {
SpanIndex cfg.IndexOptions
ServiceIndex cfg.IndexOptions
IndexPrefix cfg.IndexPrefix
IndexSuffix string
AllTagsAsFields bool
TagKeysAsFields []string
TagDotReplacement string
Archive bool
UseReadWriteAliases bool
ServiceCacheTTL time.Duration
}
Expand Down Expand Up @@ -101,16 +101,11 @@ type spanAndServiceIndexFn func(spanTime time.Time) (string, string)
func getSpanAndServiceIndexFn(p SpanWriterParams) spanAndServiceIndexFn {
spanIndexPrefix := p.IndexPrefix.Apply(spanIndexBaseName)
serviceIndexPrefix := p.IndexPrefix.Apply(serviceIndexBaseName)
if p.Archive {
if p.IndexSuffix != "" {
return func(_ time.Time) (string, string) {
if p.UseReadWriteAliases {
return archiveIndex(spanIndexPrefix, archiveWriteIndexSuffix), ""
yurishkuro marked this conversation as resolved.
Show resolved Hide resolved
}
return archiveIndex(spanIndexPrefix, archiveIndexSuffix), ""
mahadzaryab1 marked this conversation as resolved.
Show resolved Hide resolved
return spanIndexPrefix + p.IndexSuffix, ""
}
}

if p.UseReadWriteAliases {
mahadzaryab1 marked this conversation as resolved.
Show resolved Hide resolved
} else if p.UseReadWriteAliases {
return func(_ /* spanTime */ time.Time) (string, string) {
return spanIndexPrefix + "write", serviceIndexPrefix + "write"
}
Expand Down
16 changes: 8 additions & 8 deletions plugin/storage/es/spanstore/writer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func TestSpanWriterIndices(t *testing.T) {
{
params: SpanWriterParams{
Client: clientFn, Logger: logger, MetricsFactory: metricsFactory,
SpanIndex: spanIndexOpts, ServiceIndex: serviceIndexOpts, Archive: false,
SpanIndex: spanIndexOpts, ServiceIndex: serviceIndexOpts,
},
indices: []string{spanIndexBaseName + spanDataLayoutFormat, serviceIndexBaseName + serviceDataLayoutFormat},
},
Expand All @@ -88,7 +88,7 @@ func TestSpanWriterIndices(t *testing.T) {
{
params: SpanWriterParams{
Client: clientFn, Logger: logger, MetricsFactory: metricsFactory,
SpanIndex: spanIndexOpts, ServiceIndex: serviceIndexOpts, IndexPrefix: "foo:", Archive: false,
SpanIndex: spanIndexOpts, ServiceIndex: serviceIndexOpts, IndexPrefix: "foo:",
},
indices: []string{"foo:" + config.IndexPrefixSeparator + spanIndexBaseName + spanDataLayoutFormat, "foo:" + config.IndexPrefixSeparator + serviceIndexBaseName + serviceDataLayoutFormat},
},
Expand All @@ -102,23 +102,23 @@ func TestSpanWriterIndices(t *testing.T) {
{
params: SpanWriterParams{
Client: clientFn, Logger: logger, MetricsFactory: metricsFactory,
SpanIndex: spanIndexOpts, ServiceIndex: serviceIndexOpts, Archive: true,
SpanIndex: spanIndexOpts, ServiceIndex: serviceIndexOpts, IndexSuffix: "archive",
},
indices: []string{spanIndexBaseName + archiveIndexSuffix, ""},
indices: []string{spanIndexBaseName + "archive", ""},
},
{
params: SpanWriterParams{
Client: clientFn, Logger: logger, MetricsFactory: metricsFactory,
SpanIndex: spanIndexOpts, ServiceIndex: serviceIndexOpts, IndexPrefix: "foo:", Archive: true,
SpanIndex: spanIndexOpts, ServiceIndex: serviceIndexOpts, IndexPrefix: "foo:", IndexSuffix: "archive",
},
indices: []string{"foo:" + config.IndexPrefixSeparator + spanIndexBaseName + archiveIndexSuffix, ""},
indices: []string{"foo:" + config.IndexPrefixSeparator + spanIndexBaseName + "archive", ""},
},
{
params: SpanWriterParams{
Client: clientFn, Logger: logger, MetricsFactory: metricsFactory,
SpanIndex: spanIndexOpts, ServiceIndex: serviceIndexOpts, IndexPrefix: "foo:", Archive: true, UseReadWriteAliases: true,
SpanIndex: spanIndexOpts, ServiceIndex: serviceIndexOpts, IndexPrefix: "foo:", IndexSuffix: "archive", UseReadWriteAliases: true,
},
indices: []string{"foo:" + config.IndexPrefixSeparator + spanIndexBaseName + archiveWriteIndexSuffix, ""},
indices: []string{"foo:" + config.IndexPrefixSeparator + spanIndexBaseName + "archive-write", ""},
},
yurishkuro marked this conversation as resolved.
Show resolved Hide resolved
}
for _, testCase := range testCases {
Expand Down
Loading