Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ public static RaftPeerId getPeerId(String host, int port) {
*/
public static RaftClient createClient(RaftGroup raftGroup) {
RaftProperties properties = new RaftProperties();
// Since ratis-shell support GENERIC_COMMAND_OPTIONS, here we should
// set these options to raft properties to make it work.
System.getProperties().stringPropertyNames().forEach(
key -> properties.setIfUnset(key, System.getProperty(key)));
RaftClientConfigKeys.Rpc.setRequestTimeout(properties,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AngersZhuuuu , thanks for working on this! This is a good change. We should check if the requestTimeout is already set.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should check if the requestTimeout is already set.

How about the current change? Properties in System should have higher priority. It can cover the requestTimeout if we set it passed by -D

TimeDuration.valueOf(15, TimeUnit.SECONDS));
ExponentialBackoffRetry retryPolicy = ExponentialBackoffRetry.newBuilder()
Expand Down