pulsar
pulsar copied to clipboard
[Function] support storageClient backoffPlicy configure
Motivation
When create StorageClient, will use backoffPolicy, but the parameter inside is hardcoded, especially when using localrun mode, if the network delay is large, you need to adjust this parameter.
StorageClientSettings settings = StorageClientSettings.newBuilder()
.serviceUri(stateStorageServiceUrl)
.enableServerSideRouting(true)
.clientName("function-" + tableNs)
// configure a maximum 2 minutes jitter backoff for accessing table service
.backoffPolicy(Jitter.of(
Type.EXPONENTIAL,
100,
2000,
60
stateStorageBackoffPolicyStartMs,
stateStorageBackoffPolicyMaxMs,
stateStorageBackoffPolicyLimit
))
.build();
Modifications
provide configurable
StorageClientSettings settings = StorageClientSettings.newBuilder()
.serviceUri(stateStorageServiceUrl)
.enableServerSideRouting(true)
.clientName("function-" + tableNs)
// configure a maximum 2 minutes jitter backoff for accessing table service
.backoffPolicy(Jitter.of(
Type.EXPONENTIAL,
stateStorageBackoffPolicyStartMs,
stateStorageBackoffPolicyMaxMs,
stateStorageBackoffPolicyLimit
))
.build();
Does this pull request potentially affect one of the following parts:
If yes was chosen, please highlight the changes
- Dependencies (does it add or upgrade a dependency): (no)
- The public API: (no)
- The schema: (no )
- The default values of configurations: (no)
- The wire protocol: (no)
- The rest endpoints: (no)
- The admin cli options: ( no)
- Anything that affects deployment: (no)
Documentation
Check the box below or label this PR directly.
Need to update docs?
- [X]
no-need-doc
The pr had no activity for 30 days, mark with Stale label.
The pr had no activity for 30 days, mark with Stale label.