What's happening
rt.saveDestinationResponse is a plain bool written by the backend-config subscriber goroutine and read by worker goroutines on every delivery decision. There's no lock or atomic operation on either side - it's a data race.
Where
router/handle.go, line 76:
saveDestinationResponse bool // plain bool
router/handle_lifecycle.go, line 491 - written in the subscriber goroutine:
rt.saveDestinationResponse = value // no lock
router/worker.go, line 863 - read in every worker:
if !w.rt.saveDestinationResponse { // no lock
The field right next to it, supportsDeliveredWithWarnings, was already fixed with a comment at handle.go lines 86-88:
"Written by the backend-config subscriber and read by workers, hence atomic."
saveDestinationResponse has the exact same access pattern and was missed.
Impact
On ARM or with -race on amd64, a worker can read a stale value and silently suppress or incorrectly store destination response bodies, even after an admin changes the setting. go test -race ./router/... will catch this.
Fix
Same pattern as the adjacent field:
// handle.go
saveDestinationResponse atomic.Bool
// handle_lifecycle.go
rt.saveDestinationResponse.Store(value)
// worker.go
if !w.rt.saveDestinationResponse.Load() {
Environment
rudder-server main branch (2026-08-13), Go.
What's happening
rt.saveDestinationResponseis a plainboolwritten by the backend-config subscriber goroutine and read by worker goroutines on every delivery decision. There's no lock or atomic operation on either side - it's a data race.Where
router/handle.go, line 76:router/handle_lifecycle.go, line 491 - written in the subscriber goroutine:router/worker.go, line 863 - read in every worker:The field right next to it,
supportsDeliveredWithWarnings, was already fixed with a comment athandle.golines 86-88:saveDestinationResponsehas the exact same access pattern and was missed.Impact
On ARM or with
-raceon amd64, a worker can read a stale value and silently suppress or incorrectly store destination response bodies, even after an admin changes the setting.go test -race ./router/...will catch this.Fix
Same pattern as the adjacent field:
Environment
rudder-server
mainbranch (2026-08-13), Go.