From 6883e322a71ce93f1d550d193953184059f3a7d1 Mon Sep 17 00:00:00 2001 From: akats7 Date: Tue, 5 Dec 2023 23:08:34 -0500 Subject: [PATCH] updated comment --- connector/failoverconnector/traces.go | 2 ++ go.mod | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/connector/failoverconnector/traces.go b/connector/failoverconnector/traces.go index 5d8c6d571e24..acc45f3df163 100644 --- a/connector/failoverconnector/traces.go +++ b/connector/failoverconnector/traces.go @@ -39,6 +39,8 @@ func (f *tracesFailover) ConsumeTraces(ctx context.Context, td ptrace.Traces) er } err := tc.ConsumeTraces(ctx, td) if err == nil { + // trylock to make sure for concurrent calls multiple invocations don't try to update the failover + // state simultaneously and don't wait to acquire lock in pipeline selector f.stableTryLock.Lock(f.failover.reportStable, idx) return nil } diff --git a/go.mod b/go.mod index 2d65635cf542..9f430e56aeff 100644 --- a/go.mod +++ b/go.mod @@ -1155,7 +1155,6 @@ replace ( github.com/open-telemetry/opentelemetry-collector-contrib/connector/countconnector => ./connector/countconnector github.com/open-telemetry/opentelemetry-collector-contrib/connector/datadogconnector => ./connector/datadogconnector github.com/open-telemetry/opentelemetry-collector-contrib/connector/exceptionsconnector => ./connector/exceptionsconnector - github.com/open-telemetry/opentelemetry-collector-contrib/connector/failoverconnector => ./connector/failoverconnector github.com/open-telemetry/opentelemetry-collector-contrib/connector/routingconnector => ./connector/routingconnector github.com/open-telemetry/opentelemetry-collector-contrib/connector/servicegraphconnector => ./connector/servicegraphconnector github.com/open-telemetry/opentelemetry-collector-contrib/connector/spanmetricsconnector => ./connector/spanmetricsconnector