belliottsmith commented on code in PR #257:
URL: https://github.com/apache/cassandra-accord/pull/257#discussion_r2505532590


##########
accord-core/src/main/java/accord/utils/async/AsyncChains.java:
##########
@@ -414,7 +414,7 @@ private AccumulatingReducer(Reduce<V, V> reducer)
             this.reducer = reducer;
         }
 
-        public void add(AsyncChain<V> add)
+        public synchronized void add(AsyncChain<V> add)

Review Comment:
   I didn't end up using it here so I could just revert, but to explain: the 
only thing we worry about here is collecting items to reduce in the list, which 
can safely be done asynchronously if this method is synchronized. We must 
already assume that all of the items we want to collect are already collected 
when we start the chain, and that this is done by a single owner, otherwise the 
whole thing is sort of broken at a more fundamental level.



-- 
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]

Reply via email to