liudezhi2098 opened a new pull request, #15182:
URL: https://github.com/apache/pulsar/pull/15182
### 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`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]