rpuch commented on code in PR #4779:
URL: https://github.com/apache/ignite-3/pull/4779#discussion_r1856004029


##########
modules/raft/src/main/java/org/apache/ignite/internal/raft/RetryContext.java:
##########
@@ -69,11 +72,19 @@ class RetryContext {
      * Creates a context.
      *
      * @param targetPeer Target peer to send the request to.
+     * @param originDescription Supplier describing the origin request from 
which this one depends, or returning {@code null}
+     *     if this request is independent.
      * @param requestFactory Factory for creating requests to the target peer.
      * @param stopTime Timestamp that denotes the point in time up to which 
retry attempts will be made.
      */
-    RetryContext(Peer targetPeer, Function<Peer, ? extends NetworkMessage> 
requestFactory, long stopTime) {
+    RetryContext(
+            Peer targetPeer,
+            Supplier<String> originDescription,

Review Comment:
   This is to avoid calculation of the description for the 'no timeout 
happened' case as the description is only needed for 'timeout happened' case. 
It seems best to avoid this calculation on the hot path as it might be 
noticeable.



-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to