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

query dependency from es return empty. Does 'IndexDateLayout' missed when init es.dependencystore ? #3523

Open
galric opened this issue Feb 9, 2022 · 2 comments
Labels

Comments

@galric
Copy link

galric commented Feb 9, 2022

Describe the bug
system architecture and deep dependency graph return empty result while data exists in ES.
does the function 'createDependencyReader' in 'https://github.com/jaegertracing/jaeger/blob/main/plugin/storage/es/factory.go' forget to init IndexDateLayout ?

current:

	reader := esDepStore.NewDependencyStore(esDepStore.DependencyStoreParams{
		Client:              client,
		Logger:              logger,
		IndexPrefix:         cfg.GetIndexPrefix(),
		MaxDocCount:         cfg.GetMaxDocCount(),
		UseReadWriteAliases: cfg.GetUseReadWriteAliases(),
	})

may should be:

	reader := esDepStore.NewDependencyStore(esDepStore.DependencyStoreParams{
		Client:              client,
		Logger:              logger,
		IndexPrefix:         cfg.GetIndexPrefix(),
		MaxDocCount:         cfg.GetMaxDocCount(),
		UseReadWriteAliases: cfg.GetUseReadWriteAliases(),
		IndexDateLayout:     cfg.GetIndexDateLayoutDependencies(),
	})

add this


IndexDateLayout:     cfg.GetIndexDateLayoutDependencies(),

to make sure

func indexWithDate(indexNamePrefix, indexDateLayout string, date time.Time) string {
	return indexNamePrefix + date.UTC().Format(indexDateLayout)
}

from https://github.com/jaegertracing/jaeger/blob/main/plugin/storage/es/dependencystore/storage.go
not alway return a empty string

which effect DependencyStore.GetDependencies can only search 'jaeger-dependencies-' not 'jaeger-dependencies-2022-02-08'

@galric galric added the bug label Feb 9, 2022
@galric
Copy link
Author

galric commented Feb 9, 2022

i test the diff in my local environment, and it seems works

@mindw
Copy link

mindw commented Feb 9, 2022

@galric got hit by this also - with the same conclusion.

ilyamor added a commit to ilyamor/jaeger that referenced this issue Feb 12, 2022
Signed-off-by: ilya morgenshtern <ilya.m@coralogix.com>
albertteoh added a commit that referenced this issue Feb 13, 2022
Signed-off-by: ilya morgenshtern <ilya.m@coralogix.com>

Co-authored-by: Albert <26584478+albertteoh@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants