Note
This parameter is available starting with V4.6.0.
Description
OAuth2 tokens have an expiration time, so a scheduled task periodically refreshes tokens. The rest_oauth2_credential_refresh_interval parameter specifies the execution interval of this scheduled task.
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
The
systenant and user tenants can modify this parameter.
Attributes
Attribute |
Description |
|---|---|
| Type | Time |
| Default value | 10m |
| Value range | [1s, 1d] |
| Modifiable | Yes. You can use the ALTER SYSTEM SET statement to modify the parameter. |
| Effective upon OBServer node restart | Yes. The setting takes effect after a restart. |
Considerations
This parameter sets the periodic refresh interval for OAuth2 credential caching. Set it appropriately based on the token expiration time to reduce cache invalidation. Decrease the value when tokens expire quickly, and increase it otherwise. We recommend setting it to one-third to one-sixth of the OAuth2 token validity period. Supported units include microseconds (us), milliseconds (ms), seconds (s), minutes (m), hours (h), and days (d). The default unit is seconds.
Examples
Set the periodic refresh interval for OAuth2 credential caching to 30 minutes.
obclient> ALTER SYSTEM SET rest_oauth2_credential_refresh_interval = "30m";
