Tsz-wo Sze created RATIS-1923:
---------------------------------
Summary: Netty: atomic operations require side-effect-free
functions
Key: RATIS-1923
URL: https://issues.apache.org/jira/browse/RATIS-1923
Project: Ratis
Issue Type: Bug
Components: Netty
Reporter: Tsz-wo Sze
Assignee: Tsz-wo Sze
- The update methods in AtomicReference run in a loop and may call the update
function multiple time. The old values created by the update function may be
discarded without cleaning up. In NettyClientStreamRpc.Connection the connect
method is not side-effect-free. Although it passes a [MemoizedSupplier to
getAndUpdate|https://github.com/apache/ratis/blob/47e5b6aa148cfe777fb3b7742154fe6b417ea42a/ratis-netty/src/main/java/org/apache/ratis/netty/client/NettyClientStreamRpc.java#L187-L188],
it still is possible that a value is supplied but then discarded in the
AtomicReference loop.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)