Skip to content
This repository has been archived by the owner on May 23, 2024. It is now read-only.

Move queueLength to the top of the struct to guarantee 64bit alignment #158

Merged
merged 2 commits into from
Jun 8, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion reporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,13 @@ const (
)

type remoteReporter struct {
// must be first in the struct because `sync/atomic` expects 64-bit alignment.
// Cf. https://github.com/uber/jaeger-client-go/issues/155, https://goo.gl/zW7dgq
queueLength int64

reporterOptions
sender Transport
queue chan *Span
queueLength int64 // signed because metric's gauge is signed
queueDrained sync.WaitGroup
flushSignal chan *sync.WaitGroup
}
Expand Down