From 30ec787acebf1ed2e3032eafa71fd52bb728086d Mon Sep 17 00:00:00 2001 From: Sergii Tkachenko Date: Thu, 31 Oct 2024 11:21:15 -0700 Subject: [PATCH] LongAdder note --- xds/src/main/java/io/grpc/xds/internal/rlqs/RlqsBucket.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xds/src/main/java/io/grpc/xds/internal/rlqs/RlqsBucket.java b/xds/src/main/java/io/grpc/xds/internal/rlqs/RlqsBucket.java index 25a93892932..37170477dd0 100644 --- a/xds/src/main/java/io/grpc/xds/internal/rlqs/RlqsBucket.java +++ b/xds/src/main/java/io/grpc/xds/internal/rlqs/RlqsBucket.java @@ -34,6 +34,8 @@ public class RlqsBucket { // TODO(sergiitk): [impl] consider AtomicLongFieldUpdater private final AtomicLong lastSnapshotTimeNanos = new AtomicLong(-1); + + // TODO(sergiitk): [impl] consider java.util.concurrent.atomic.LongAdder for counters private final AtomicLong numRequestsAllowed = new AtomicLong(); private final AtomicLong numRequestsDenied = new AtomicLong();