Reorder span iterators (#4754)

* Reorder iterators

* CHANGELOG.md
This commit is contained in:
A. Stoewer
2025-02-27 08:50:42 +10:00
committed by GitHub
parent a4b69ff70a
commit 1b7a088e08
2 changed files with 6 additions and 5 deletions

View File

@ -24,6 +24,7 @@ configurable via the throughput_bytes_slo field, and it will populate op="traces
* [FEATURE] Added most_recent=true query hint to TraceQL to return most recent results. [#4238](https://github.com/grafana/tempo/pull/4238) (@joe-elliott)
* [FEATURE] Add ability to add artificial delay to push requests [#4716](https://github.com/grafana/tempo/pull/4716) (@yvrhdn)
* [ENHANCEMENT] Rewrite traces using rebatching [#4690](https://github.com/grafana/tempo/pull/4690) (@stoewer @joe-elliott)
* [ENHANCEMENT] Reorder span iterators [#4754](https://github.com/grafana/tempo/pull/4754) (@stoewer)
* [ENHANCEMENT] Update minio to version [#4341](https://github.com/grafana/tempo/pull/4568) (@javiermolinar)
* [ENHANCEMENT] Prevent queries in the ingester from blocking flushing traces to disk and memory spikes. [#4483](https://github.com/grafana/tempo/pull/4483) (@joe-elliott)
* [ENHANCEMENT] Update tempo operational dashboard for new block-builder and v2 traces api [#4559](https://github.com/grafana/tempo/pull/4559) (@mdisibio)

View File

@ -2058,6 +2058,10 @@ func createSpanIterator(makeIter makeIterFn, innerIterators []parquetquery.Itera
}
}
for columnPath, predicates := range columnPredicates {
iters = append(iters, makeIter(columnPath, orIfNeeded(predicates), columnSelectAs[columnPath]))
}
attrIter, err := createAttributeIterator(makeIter, genericConditions, DefinitionLevelResourceSpansILSSpanAttrs,
columnPathSpanAttrKey, columnPathSpanAttrString, columnPathSpanAttrInt, columnPathSpanAttrDouble, columnPathSpanAttrBool, allConditions, selectAll)
if err != nil {
@ -2067,10 +2071,6 @@ func createSpanIterator(makeIter makeIterFn, innerIterators []parquetquery.Itera
iters = append(iters, attrIter)
}
for columnPath, predicates := range columnPredicates {
iters = append(iters, makeIter(columnPath, orIfNeeded(predicates), columnSelectAs[columnPath]))
}
var required []parquetquery.Iterator
if len(innerIterators) != 0 {
required = innerIterators
@ -2096,7 +2096,7 @@ func createSpanIterator(makeIter makeIterFn, innerIterators []parquetquery.Itera
// This is an optimization for when all of the span conditions must be met.
// We simply move all iterators into the required list.
if allConditions {
required = append(required, iters...)
required = append(iters, required...)
iters = nil
}