Skip to content

Start order of extensions is not guaranteed? #8732

Closed
@yurishkuro

Description

@yurishkuro

Describe the bug
Maybe I am misreading the situation, but this code iterates over map when starting extensions, so it cannot guarantee in which order they are started:

for extID, ext := range bes.extMap {

Even though the documentation implies that the order is define by the declaration order:

service:
# extensions lists the extensions added to the service. They are started
# in the order presented below and stopped in the reverse order.
extensions: [health_check, pprof, zpages]

I observed some spontaneous failures in my experiments with JaegerV2 which declares extensions with an order expectation: extensions: [jaeger_storage, jaeger_query] but the logs show differently:

2023-10-24T01:17:01.143Z	info	extensions/extensions.go:33	Starting extensions...
2023-10-24T01:17:01.143Z	info	extensions/extensions.go:36	Extension is starting...	{"kind": "extension", "name": "jaeger_query"}

Steps to reproduce
It's random behavior, hard to reproduce reliably.

What did you expect to see?
Extensions should be starting in the order defined in the config.

What did you see instead?
Seeing different order.

What version did you use?
Version: v0.87.0

What config did you use?
https://github.com/jaegertracing/jaeger/blob/28520b31471b36d9e949de4ffaa016c2640a3be7/cmd/jaeger-v2/internal/all-in-one.yaml#L1

Environment
OS: MacOS, Linux
Compiler(if manually compiled): go 1.20.x

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions