otterc commented on code in PR #38959:
URL: https://github.com/apache/spark/pull/38959#discussion_r1069777688


##########
common/network-common/src/main/java/org/apache/spark/network/sasl/SaslTimeoutException.java:
##########
@@ -0,0 +1,15 @@
+package org.apache.spark.network.sasl;
+
+public class SaslTimeoutException extends RuntimeException {

Review Comment:
   Nit: Add javadoc



##########
common/network-shuffle/src/main/java/org/apache/spark/network/shuffle/RetryingBlockTransferor.java:
##########
@@ -84,6 +87,12 @@ void createAndStart(String[] blockIds, BlockTransferListener 
listener)
   // while inside a synchronized block.
   /** Number of times we've attempted to retry so far. */
   private int retryCount = 0;
+  /**
+   * Map to track blockId to exception that the block is being retried for.
+   * This is mainly used in the case of SASL retries, because we need to set
+   * `retryCount` back to 0 in those cases.
+   */
+  private Map<String, Throwable> blockIdToException;

Review Comment:
   I don't think this mapping is needed. You can reset  the `retryCount` to 0 
after there aren't any more SASl timeouts to address @mridulm's comment. You 
may just need another flag that marks whether the last timeout was a 
SaslTimeout or not.



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