-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Preserve order of targets in QueryTarget, IngestTarget (#897)
A user in the configuration of a query/ingest processor can define targets: ```yaml my_index: target: [ elastic-conn, clickhouse-conn ] ``` We subsequently take those values and populate `QueryTarget` and `IngestTarget` arrays based on it, however the code did not preserve the order of the targets. The order is important for A/B testing case and `rules.go` had to incorrectly allow an unsupported scenario for everything to work correctly. Fix the issue by preserving the same order in `QueryTarget`, `IngestTarget` as in the original `target` user configuration. `rules.go` workaround can be now removed.
- Loading branch information
1 parent
c8d579e
commit 1d982f4
Showing
2 changed files
with
36 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters