szetszwo commented on code in PR #1107:
URL: https://github.com/apache/ratis/pull/1107#discussion_r1625667060


##########
ratis-docs/src/site/markdown/configurations.md:
##########
@@ -675,4 +675,73 @@ For examples,
   2. However, setConf to a 3-member group by removing 2 of members and adding 
2 new members is a majority-add.
 
 - Note also that adding 1 new member to an 1-member group is always allowed,
-  although it is a majority-add.
\ No newline at end of file
+  although it is a majority-add.
+
+
+## Client Configurations
+
+Client configurations are located at `RaftClientConfigKeys`.
+
+### RPC - Configurations related to Client RPC timeout.
+
+| **Property**    | `raft.client.rpc.request.timeout` |
+|:----------------|:----------------------------------|
+| **Description** | timeout for AppendEntries RPC     |

Review Comment:
   How about `client side timeout for sending a request`?



##########
ratis-docs/src/site/markdown/configurations.md:
##########
@@ -675,4 +675,73 @@ For examples,
   2. However, setConf to a 3-member group by removing 2 of members and adding 
2 new members is a majority-add.
 
 - Note also that adding 1 new member to an 1-member group is always allowed,
-  although it is a majority-add.
\ No newline at end of file
+  although it is a majority-add.
+
+
+## Client Configurations
+
+Client configurations are located at `RaftClientConfigKeys`.
+
+### RPC - Configurations related to Client RPC timeout.
+
+| **Property**    | `raft.client.rpc.request.timeout` |
+|:----------------|:----------------------------------|
+| **Description** | timeout for AppendEntries RPC     |
+| **Type**        | TimeDuration                      |
+| **Default**     | 3000ms                            |
+
+| **Property**    | `raft.client.rpc.watch.request.timeout`      |
+|:----------------|:---------------------------------------------|
+| **Description** | timeout for watch request on the client side |

Review Comment:
   How about `client side timeout for sending a watch request`?



##########
ratis-docs/src/site/markdown/configurations.md:
##########
@@ -675,4 +675,73 @@ For examples,
   2. However, setConf to a 3-member group by removing 2 of members and adding 
2 new members is a majority-add.
 
 - Note also that adding 1 new member to an 1-member group is always allowed,
-  although it is a majority-add.
\ No newline at end of file
+  although it is a majority-add.
+
+
+## Client Configurations
+
+Client configurations are located at `RaftClientConfigKeys`.
+
+### RPC - Configurations related to Client RPC timeout.
+
+| **Property**    | `raft.client.rpc.request.timeout` |
+|:----------------|:----------------------------------|
+| **Description** | timeout for AppendEntries RPC     |
+| **Type**        | TimeDuration                      |
+| **Default**     | 3000ms                            |
+
+| **Property**    | `raft.client.rpc.watch.request.timeout`      |
+|:----------------|:---------------------------------------------|
+| **Description** | timeout for watch request on the client side |
+| **Type**        | TimeDuration                                 |
+| **Default**     | 10000ms                                      |

Review Comment:
   Let's change it to `10s`.
   ```java
   +++ 
b/ratis-client/src/main/java/org/apache/ratis/client/RaftClientConfigKeys.java
   @@ -53,7 +53,7 @@ public interface RaftClientConfigKeys {
    
        String WATCH_REQUEST_TIMEOUT_KEY = PREFIX + ".watch.request.timeout";
        TimeDuration WATCH_REQUEST_TIMEOUT_DEFAULT =
   -        TimeDuration.valueOf(10000, TimeUnit.MILLISECONDS);
   +        TimeDuration.valueOf(10, TimeUnit.SECONDS);
        static TimeDuration watchRequestTimeout(RaftProperties properties) {
          return 
getTimeDuration(properties.getTimeDuration(WATCH_REQUEST_TIMEOUT_DEFAULT.getUnit()),
              WATCH_REQUEST_TIMEOUT_KEY, WATCH_REQUEST_TIMEOUT_DEFAULT, 
getDefaultLog());
   ```



##########
ratis-docs/src/site/markdown/configurations.md:
##########
@@ -675,4 +675,73 @@ For examples,
   2. However, setConf to a 3-member group by removing 2 of members and adding 
2 new members is a majority-add.
 
 - Note also that adding 1 new member to an 1-member group is always allowed,
-  although it is a majority-add.
\ No newline at end of file
+  although it is a majority-add.
+
+
+## Client Configurations
+
+Client configurations are located at `RaftClientConfigKeys`.
+
+### RPC - Configurations related to Client RPC timeout.
+
+| **Property**    | `raft.client.rpc.request.timeout` |
+|:----------------|:----------------------------------|
+| **Description** | timeout for AppendEntries RPC     |
+| **Type**        | TimeDuration                      |
+| **Default**     | 3000ms                            |

Review Comment:
   Let's change it to `3s`.
   ```java
   +++ 
b/ratis-client/src/main/java/org/apache/ratis/client/RaftClientConfigKeys.java
   @@ -42,7 +42,7 @@ public interface RaftClientConfigKeys {
        String PREFIX = RaftClientConfigKeys.PREFIX + ".rpc";
    
        String REQUEST_TIMEOUT_KEY = PREFIX + ".request.timeout";
   -    TimeDuration REQUEST_TIMEOUT_DEFAULT = TimeDuration.valueOf(3000, 
TimeUnit.MILLISECONDS);
   +    TimeDuration REQUEST_TIMEOUT_DEFAULT = TimeDuration.valueOf(3, 
TimeUnit.SECONDS);
        static TimeDuration requestTimeout(RaftProperties properties) {
          return 
getTimeDuration(properties.getTimeDuration(REQUEST_TIMEOUT_DEFAULT.getUnit()),
              REQUEST_TIMEOUT_KEY, REQUEST_TIMEOUT_DEFAULT, getDefaultLog());
   ```



##########
ratis-docs/src/site/markdown/configurations.md:
##########
@@ -675,4 +675,73 @@ For examples,
   2. However, setConf to a 3-member group by removing 2 of members and adding 
2 new members is a majority-add.
 
 - Note also that adding 1 new member to an 1-member group is always allowed,
-  although it is a majority-add.
\ No newline at end of file
+  although it is a majority-add.
+
+
+## Client Configurations
+
+Client configurations are located at `RaftClientConfigKeys`.
+
+### RPC - Configurations related to Client RPC timeout.
+
+| **Property**    | `raft.client.rpc.request.timeout` |
+|:----------------|:----------------------------------|
+| **Description** | timeout for AppendEntries RPC     |
+| **Type**        | TimeDuration                      |
+| **Default**     | 3000ms                            |
+
+| **Property**    | `raft.client.rpc.watch.request.timeout`      |
+|:----------------|:---------------------------------------------|
+| **Description** | timeout for watch request on the client side |
+| **Type**        | TimeDuration                                 |
+| **Default**     | 10000ms                                      |
+
+### Async - Configurations related to async requests.
+
+| **Property**    | `raft.client.async.outstanding-requests.max` |
+|:----------------|:---------------------------------------------|
+| **Description** | maximum number of outstanding async requests |
+| **Type**        | int                                          |
+| **Default**     | 100                                          |
+
+#### Experimental - Configurations related to experimental features.
+
+| **Property**    | `raft.client.async.experimental.send-dummy-request`    |
+|:----------------|:-------------------------------------------------------|
+| **Description** | send a dummy watch request to establish the connection |
+| **Type**        | boolean                                                |
+| **Default**     | true                                                   |

Review Comment:
   Let's don't add the experimental features.



##########
ratis-docs/src/site/markdown/configurations.md:
##########
@@ -675,4 +675,73 @@ For examples,
   2. However, setConf to a 3-member group by removing 2 of members and adding 
2 new members is a majority-add.
 
 - Note also that adding 1 new member to an 1-member group is always allowed,
-  although it is a majority-add.
\ No newline at end of file
+  although it is a majority-add.
+
+
+## Client Configurations
+
+Client configurations are located at `RaftClientConfigKeys`.
+
+### RPC - Configurations related to Client RPC timeout.
+
+| **Property**    | `raft.client.rpc.request.timeout` |
+|:----------------|:----------------------------------|
+| **Description** | timeout for AppendEntries RPC     |
+| **Type**        | TimeDuration                      |
+| **Default**     | 3000ms                            |
+
+| **Property**    | `raft.client.rpc.watch.request.timeout`      |
+|:----------------|:---------------------------------------------|
+| **Description** | timeout for watch request on the client side |
+| **Type**        | TimeDuration                                 |
+| **Default**     | 10000ms                                      |
+
+### Async - Configurations related to async requests.
+
+| **Property**    | `raft.client.async.outstanding-requests.max` |
+|:----------------|:---------------------------------------------|
+| **Description** | maximum number of outstanding async requests |
+| **Type**        | int                                          |
+| **Default**     | 100                                          |
+
+#### Experimental - Configurations related to experimental features.
+
+| **Property**    | `raft.client.async.experimental.send-dummy-request`    |
+|:----------------|:-------------------------------------------------------|
+| **Description** | send a dummy watch request to establish the connection |
+| **Type**        | boolean                                                |
+| **Default**     | true                                                   |
+
+### DataStream - Configurations related to DataStream Api.
+
+| **Property**    | `raft.client.data-stream.outstanding-requests.max` |
+|:----------------|:---------------------------------------------------|
+| **Description** | maximum number of outstanding data stream requests |
+| **Type**        | int                                                |
+| **Default**     | 100                                                |
+
+| **Property**    | `raft.client.data-stream.flush.request.count.min`          
      |
+|:----------------|:-----------------------------------------------------------------|
+| **Description** | minimum number of requests before data stream flush would 
happen |
+| **Type**        | int                                                        
      |
+| **Default**     | 0                                                          
      |
+
+| **Property**    | `raft.client.data-stream.flush.request.bytes.min`          
   |
+|:----------------|:--------------------------------------------------------------|
+| **Description** | minimum number of bytes before data stream flush would 
happen |
+| **Type**        | SizeInBytes                                                
   |
+| **Default**     | 1MB                                                        
   |
+
+| **Property**    | `raft.client.data-stream.request.timeout` |
+|:----------------|:------------------------------------------|
+| **Description** | timeout for data stream request           |
+| **Type**        | TimeDuration                              |
+| **Default**     | 10000ms                                   |

Review Comment:
   Could you change it to 10s?
   ```java
   +++ 
b/ratis-client/src/main/java/org/apache/ratis/client/RaftClientConfigKeys.java
   @@ -125,7 +125,7 @@ public interface RaftClientConfigKeys {
        }
    
        String REQUEST_TIMEOUT_KEY = PREFIX + ".request.timeout";
   -    TimeDuration REQUEST_TIMEOUT_DEFAULT = TimeDuration.valueOf(10000, 
TimeUnit.MILLISECONDS);
   +    TimeDuration REQUEST_TIMEOUT_DEFAULT = TimeDuration.valueOf(10, 
TimeUnit.SECONDS);
        static TimeDuration requestTimeout(RaftProperties properties) {
          return 
getTimeDuration(properties.getTimeDuration(REQUEST_TIMEOUT_DEFAULT.getUnit()),
              REQUEST_TIMEOUT_KEY, REQUEST_TIMEOUT_DEFAULT, getDefaultLog());
   ```



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