fix(orchestrion): allow the experimental span pool together with orchestrion GLS#4928
Conversation
|
BenchmarksBenchmark execution time: 2026-06-23 14:23:22 Comparing candidate commit fe8cf33 in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 297 metrics, 2 unstable metrics, 1 flaky benchmarks without significant changes.
|
c24407c to
2e35de7
Compare
…estrion GLS Final PR in the GLS span-pool stack. With the reclaim signal decoupled from the recyclable span (cell-based, captured at push time) and Peek skipping finished entries, the two reasons #4891 gated span pool and orchestrion GLS as mutually exclusive no longer hold: a recycled span can neither leak a stale GLS entry nor resurface as the active span. Remove the gate (the shouldDisableSpanPool helper, its newConfig call, and its unit test) so WithSpanPool(true) / DD_TRACER_EXPERIMENTAL_SPAN_POOL_ENABLED is honored under orchestrion. Add TestGLSNoHeapLeakWithSpanPool as the coexistence regression gate. It enables the pool via WithSpanPool(true) and runs glsleak.MeasureLeakLiveInject: the realistic franz-go shape that injects each span while live and finishes it after the worker pushes it, respecting the span pool's "do not touch a span after Finish" contract. Run under -race in CI it guards both the leak and the span-pool-vs-GLS data races. The existing finish-then-inject TestGLSNoHeapLeak stays as the no-pool gate (its finish-before-inject order is a deliberate use-after-Finish that the pool legitimately recycles, so it is not run pooled). Refs: DataDog/orchestrion#782 Environment: Datadog workspace Co-authored-by: Kemal Akkoyun <kakkoyun@users.noreply.github.com>
b8baea9 to
fe8cf33
Compare
What
Final PR in the GLS span-pool stack. Removes the mutual-exclusion gate from #4891 so the experimental span pool (
WithSpanPool(true)/DD_TRACER_EXPERIMENTAL_SPAN_POOL_ENABLED) is honored under orchestrion, and adds the coexistence regression test.Why
With the reclaim signal decoupled from the recyclable span (PR 1) and
Peekskipping finished entries (PR 2), the two reasons #4891 gated the features no longer hold: a recycled span can neither leak a stale GLS entry nor resurface as the active span. The gate (shouldDisableSpanPool, itsnewConfigcall, and its unit test) can go.How
shouldDisableSpanPoolhelper + test.TestGLSNoHeapLeakWithSpanPool: enables the pool viaWithSpanPool(true)and runsglsleak.MeasureLeakLiveInject— the realistic franz-go shape that injects each span while live and finishes it after the worker pushes it, respecting the span pool's "do not touch a span after Finish" contract. Run under-racein CI it guards both the leak and the span-pool-vs-GLS data races.TestGLSNoHeapLeak/TestSpanGLS*CrossGoroutinestay as no-pool gates (their finish-before-inject order is a deliberate use-after-Finish that the pool legitimately recycles), now documented as such.Validation
Built woven with orchestrion v1.10.0:
gls,gls-leak,os,gingates pass (non-race).gls-leak -race:TestGLSNoHeapLeak(no-pool) andTestGLSNoHeapLeakWithSpanPool(live-inject +WithSpanPool(true)) pass — flat retained-heap, no race.gls -race(no-pool) passes; under forced pooling only the finish-then-inject (use-after-Finish) tests fail, as expected — every otherglstest (double-finish, concurrency, alldyngocross-goroutine) passes pooled.Stack (merge in order)
Peekskips finished entriesRefs: #4891 · DataDog/orchestrion#782