Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Function] support storageClient backoffPlicy configure #15182

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

liudezhi2098
Copy link
Contributor

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?

  • no-need-doc

@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Apr 15, 2022
@liudezhi2098 liudezhi2098 changed the title [funciotn] support storageClient backoffPlicy configure [Funciotn] support storageClient backoffPlicy configure Apr 15, 2022
@Technoboy- Technoboy- changed the title [Funciotn] support storageClient backoffPlicy configure [Function] support storageClient backoffPlicy configure Apr 19, 2022
@github-actions
Copy link

The pr had no activity for 30 days, mark with Stale label.

@github-actions
Copy link

The pr had no activity for 30 days, mark with Stale label.

@Technoboy- Technoboy- added this to the 3.2.0 milestone Jul 31, 2023
@Technoboy- Technoboy- modified the milestones: 3.2.0, 3.3.0 Dec 22, 2023
@coderzc coderzc modified the milestones: 3.3.0, 3.4.0 May 8, 2024
@lhotari lhotari modified the milestones: 4.0.0, 4.1.0 Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc-not-needed Your PR changes do not impact docs lifecycle/stale Stale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants