Skip to content

Commit c1977af

Browse files
Merge pull request #2041 from IABTechLab/vse-UID2-6096-fix-concurrentmodificationexception
Move client version counter map to verticle property
2 parents 47f1c42 + 1af1b6f commit c1977af

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/main/java/com/uid2/operator/vertx/UIDOperatorVerticle.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ public class UIDOperatorVerticle extends AbstractVerticle {
114114
private final Map<String, Counter> _tokenGenerateTCFUsage = new HashMap<>();
115115
private final Map<String, Tuple.Tuple2<Counter, Counter>> _identityMapUnmappedIdentifiers = new HashMap<>();
116116
private final Map<String, Counter> _identityMapRequestWithUnmapped = new HashMap<>();
117+
private final Map<Tuple.Tuple2<String, String>, Counter> _clientVersions = new HashMap<>();
117118

118119
private final Map<String, DistributionSummary> optOutStatusCounters = new HashMap<>();
119120
private final IdentityScope identityScope;
@@ -799,12 +800,11 @@ private void handleHealthCheck(RoutingContext rc) {
799800
}
800801
}
801802

802-
private static final Map<Tuple.Tuple2<String, String>, Counter> CLIENT_VERSION_COUNTERS = new HashMap<>();
803803
private void recordOperatorServedSdkUsage(RoutingContext rc, Integer siteId, String apiContact, String clientVersion) {
804804
if (siteId != null && apiContact != null && clientVersion != null) {
805805
final String path = RoutingContextUtil.getPath(rc);
806806

807-
CLIENT_VERSION_COUNTERS.computeIfAbsent(
807+
_clientVersions.computeIfAbsent(
808808
new Tuple.Tuple2<>(Integer.toString(siteId), clientVersion),
809809
tuple -> Counter
810810
.builder("uid2_client_sdk_versions_total")

0 commit comments

Comments
 (0)