Note
This parameter is introduced in OceanBase Database V1.4.
Description
max_stale_time_for_weak_consistency specifies how stale the data can be when performing weak consistency reads.
Privilege requirements
Query the parameter
The
systenant and all user tenants can query this parameter by using theSHOW PARAMETERSstatement or theGV$OB_PARAMETERSview.Modify the parameter
Both the
systenant and user tenants can modify this parameter.
Attributes
| Attribute | Description |
|---|---|
| Parameter type | Time |
| Default value | 5s |
| Value range | [5s, +∞) |
| Modifiable | Yes. You can use the ALTER SYSTEM SET statement to modify the parameter. |
| Effective upon OBServer restart | No. This parameter takes effect immediately after it is set. |
Examples
Set the maximum lag time for data read in weak consistency mode to no more than 5 seconds behind the leader replica.
obclient> ALTER SYSTEM SET max_stale_time_for_weak_consistency= '5s';