anton-vinogradov commented on code in PR #13454:
URL: https://github.com/apache/ignite/pull/13454#discussion_r3750610829


##########
modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerImpl.java:
##########
@@ -146,17 +146,14 @@ public class DataStreamerImpl<K, V> implements 
IgniteDataStreamer<K, V>, Delayed
      */
     private final Map<Long, ThreadBuffer> threadBufMap = new 
ConcurrentHashMap<>();
 
-    /** Isolated receiver. */
-    private static final StreamReceiver ISOLATED_UPDATER = new 
IsolatedUpdater();
+    /** Isolated receiver. Ships with the node, so it is never sent with a 
request. */

Review Comment:
   Done: `/** Default, isolated receiver. */`
   



##########
modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerImpl.java:
##########
@@ -655,7 +660,7 @@ public IgniteFuture<?> addDataInternal(Collection<? extends 
DataStreamerEntry> e
 
         lock(false);
 
-        if (rcvr instanceof IsolatedUpdater && 
inconsistencyWarned.compareAndSet(false, true))
+        if (rcvrMsg == null && inconsistencyWarned.compareAndSet(false, true))

Review Comment:
   Instead of a note I gave the check a name, so it says it itself:
   
   ```java
   /** @return {@code True} if the default, isolated receiver is in use. */
   private boolean isolated() {
       return rcvrMsg == null;
   }
   ```
   
   The warning site now reads `if (isolated() && 
inconsistencyWarned.compareAndSet(false, true))`, and `allowOverwrite()` became 
`!isolated()` — which is what it has always meant.
   
   Two other places keep comparing a local copy to `null` rather than calling 
this: they read the volatile field once, so that the request and its stripe 
cannot disagree if the receiver is replaced mid-stream. Say the word if you 
would still rather have the comment.
   



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

Reply via email to