rajinisivaram commented on a change in pull request #8683:
URL: https://github.com/apache/kafka/pull/8683#discussion_r444945541



##########
File path: core/src/main/scala/kafka/admin/BrokerApiVersionsCommand.scala
##########
@@ -205,6 +205,8 @@ object BrokerApiVersionsCommand {
   private object AdminClient {
     val DefaultConnectionMaxIdleMs = 9 * 60 * 1000
     val DefaultRequestTimeoutMs = 5000
+    val DefaultSocketConnectionSetupMs = 10 * 1000
+    val DefaultSocketConnectionSetupMaxMs = 127 * 1000

Review comment:
       Looks like the constants haven't been removed.

##########
File path: 
clients/src/main/java/org/apache/kafka/clients/CommonClientConfigs.java
##########
@@ -103,6 +103,14 @@
         Utils.join(SecurityProtocol.names(), ", ") + ".";
     public static final String DEFAULT_SECURITY_PROTOCOL = "PLAINTEXT";
 
+    public static final String SOCKET_CONNECTION_SETUP_TIMEOUT_MS_CONFIG = 
"socket.connection.setup.timeout.ms";
+    public static final String SOCKET_CONNECTION_SETUP_TIMEOUT_MS_DOC = "The 
amount of time the client will wait for the socket connection to be 
established. If the connection is not built before the timeout elapses, clients 
will close the socket channel.";
+    public static final Long SOCKET_CONNECTION_SETUP_TIMEOUT_MS_DEFAULT = 10 * 
1000L;
+
+    public static final String SOCKET_CONNECTION_SETUP_TIMEOUT_MAX_MS_CONFIG = 
"socket.connection.setup.timeout.max.ms";
+    public static final String SOCKET_CONNECTION_SETUP_TIMEOUT_MAX_MS_DOC = 
"The maximum amount of time the client will wait for the socket connection to 
be established. The connection setup timeout will increase exponentially for 
each consecutive connection failure up to this maximum. To avoid connection 
storms, a randomization factor of 0.2 will be applied to the timeout resulting 
in a random range between 20% below and 20% above the computed value.";
+    public static final Long SOCKET_CONNECTION_SETUP_TIMEOUT_MAX_MS_DEFAULT = 
127 * 1000L;

Review comment:
       As above, `DEFAULT_SOCKET_CONNECTION_SETUP_TIMEOUT_MAX_MS`

##########
File path: 
clients/src/main/java/org/apache/kafka/clients/CommonClientConfigs.java
##########
@@ -103,6 +103,14 @@
         Utils.join(SecurityProtocol.names(), ", ") + ".";
     public static final String DEFAULT_SECURITY_PROTOCOL = "PLAINTEXT";
 
+    public static final String SOCKET_CONNECTION_SETUP_TIMEOUT_MS_CONFIG = 
"socket.connection.setup.timeout.ms";
+    public static final String SOCKET_CONNECTION_SETUP_TIMEOUT_MS_DOC = "The 
amount of time the client will wait for the socket connection to be 
established. If the connection is not built before the timeout elapses, clients 
will close the socket channel.";
+    public static final Long SOCKET_CONNECTION_SETUP_TIMEOUT_MS_DEFAULT = 10 * 
1000L;

Review comment:
       We should be consistent with the naming above for 
`DEFAULT_SECURITY_PROTOCOL` and name this 
`DEFAULT_SOCKET_CONNECTION_SETUP_TIMEOUT_MS`. We seem to use xxx_DEFAULT in 
some places, but common configs here and in SslConfigs and SaslConfigs use 
DEFAULT_xxx, so let's stick to that.




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

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


Reply via email to