belliottsmith commented on code in PR #3432:
URL: https://github.com/apache/cassandra/pull/3432#discussion_r1693953008
##########
src/java/org/apache/cassandra/service/accord/async/AsyncLoader.java:
##########
@@ -83,7 +83,11 @@ private static <K, V, S extends AccordSafeState<K, V>> void
referenceAndAssemble
List<AsyncChain<?>> listenChains)
{
S safeRef = cache.acquire(key);
- context.put(key, safeRef);
+ if (context.putIfAbsent(key, safeRef) != null)
Review Comment:
right, this is to prevent us corrupting the count if we have somehow asked
for the same key twice. I should probably add a NoSpamLogger at warn as well,
as this is obviously a (minor, now) bug.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]