Skip to content

Commit

Permalink
RATIS-1908. Keep configurations doc updated (apache#938)
Browse files Browse the repository at this point in the history
  • Loading branch information
SzyWilliam authored Oct 20, 2023
1 parent 87adca4 commit eab143a
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 2 deletions.
31 changes: 31 additions & 0 deletions ratis-docs/src/site/markdown/configurations.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,16 @@ treat the peer as caught-up. Increase this number when write throughput is high.
| **Type** | double, ranging from (0.0,1.0) |
| **Default** | 0.9 |

### Read After Write - Configurations related to read-after-write-consistency


| **Property** | `raft.server.read.read-after-write-consistent.write-index-cache.expiry-time` |
|:----------------|:-------------------------------------------------------------------------------|
| **Description** | expiration time for server's memorized last written index of a specific client |
| **Type** | TimeDuration |
| **Default** | 60s |



### Write - Configurations related to write requests.

Expand Down Expand Up @@ -454,6 +464,19 @@ The follower's statemachine is responsible for fetching and installing snapshot
| **Type** | TimeDuration |
| **Default** | 10ms |


| **Property** | `raft.server.log.appender.retry.policy` |
|:----------------|:----------------------------------------|
| **Description** | retry policy under error conditions |
| **Type** | string |
| **Default** | 1ms,10, 1s,20, 5s,1000 |

"1ms,10, 1s,20, 5s,1000" means
The min wait time as 1ms (0 is not allowed) for first 10,
(5 iteration with 2 times grpc client retry),
next wait 1sec for next 20 retry (10 iteration with 2 times grpc client)
further wait for 5sec for max times ((5sec*980)/2 times ~= 40min)

--------------------------------------------------------------------------------

### Snapshot - Configurations related to snapshot.
Expand All @@ -464,6 +487,14 @@ The follower's statemachine is responsible for fetching and installing snapshot
| **Type** | boolean |
| **Default** | false, by default let the state machine to decide when to do checkpoint |


| **Property** | `raft.server.snapshot.trigger-when-stop.enabled` |
|:----------------|:---------------------------------------------------|
| **Description** | whether to trigger snapshot when raft server stops |
| **Type** | boolean |
| **Default** | true |


| **Property** | `raft.server.snapshot.creation.gap` |
|:----------------|:-----------------------------------------------------|
| **Description** | the log index gap between to two snapshot creations. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,9 +215,9 @@ static void setLeaderLeaseTimeoutRatio(RaftProperties properties, double ratio)
}

interface ReadAfterWriteConsistent {
String PREFIX = RaftServerConfigKeys.PREFIX + ".read-after-write-consistent";
String PREFIX = Read.PREFIX + ".read-after-write-consistent";

String WRITE_INDEX_CACHE_EXPIRY_TIME_KEY = PREFIX + "write-index-cache.expiry-time";
String WRITE_INDEX_CACHE_EXPIRY_TIME_KEY = PREFIX + ".write-index-cache.expiry-time";
/** Must be larger than {@link Read#TIMEOUT_DEFAULT}. */
TimeDuration WRITE_INDEX_CACHE_EXPIRY_TIME_DEFAULT = TimeDuration.valueOf(60, TimeUnit.SECONDS);

Expand Down

0 comments on commit eab143a

Please sign in to comment.