Skip to content

Commit f26c6bb

Browse files
authored
[exporterhelper] Do not ignore the num_consumers setting when batching is enabled (#12921)
Remove hardcoding the number of queue workers to one if batching is enabled. The bug described in #12244 isn't relevant anymore.
1 parent ac7c0f2 commit f26c6bb

File tree

2 files changed

+23
-2
lines changed

2 files changed

+23
-2
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Use this changelog template to create an entry for release notes.
2+
3+
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
4+
change_type: bug_fix
5+
6+
# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver)
7+
component: exporterhelper
8+
9+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
10+
note: Do not ignore the `num_consumers` setting when batching is enabled.
11+
12+
# One or more tracking issues or pull requests related to the change
13+
issues: [12244]
14+
15+
# Optional: The change log or logs in which this entry should be included.
16+
# e.g. '[user]' or '[user, api]'
17+
# Include 'user' if the change is relevant to end users.
18+
# Include 'api' if there is a change to a library API.
19+
# Default: '[user]'
20+
change_logs: [user]

exporter/exporterhelper/internal/queuebatch/queue_batch.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,6 @@ func newQueueBatch(
6363

6464
var b Batcher[request.Request]
6565
if cfg.Batch != nil {
66-
// TODO: https://github.com/open-telemetry/opentelemetry-collector/issues/12244
67-
cfg.NumConsumers = 1
6866
if oldBatcher {
6967
// If user configures the old batcher we only can support "items" sizer.
7068
b = newDefaultBatcher(*cfg.Batch, batcherSettings[request.Request]{
@@ -81,6 +79,9 @@ func newQueueBatch(
8179
maxWorkers: cfg.NumConsumers,
8280
})
8381
}
82+
// Keep the number of queue consumers to 1 if batching is enabled until we support sharding as described in
83+
// https://github.com/open-telemetry/opentelemetry-collector/issues/12473
84+
cfg.NumConsumers = 1
8485
} else {
8586
b = newDisabledBatcher[request.Request](next)
8687
}

0 commit comments

Comments
 (0)