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

feat: add throttle and delay to connect #478

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

DominicGBauer
Copy link
Collaborator

Description

Add retryDelayMs and crudUploadThrottleMs to connect so that the values can be dynamically changed on reconnecting.

Testing

I ran the todolist demo and confirmed that the values used are from the connect method.

Copy link

changeset-bot bot commented Jan 22, 2025

🦋 Changeset detected

Latest commit: 769b46f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 6 packages
Name Type
@powersync/react-native Minor
@powersync/common Minor
@powersync/op-sqlite Patch
@powersync/tanstack-react-query Patch
@powersync/web Patch
@powersync/diagnostics-app Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@DominicGBauer DominicGBauer self-assigned this Jan 23, 2025
@DominicGBauer
Copy link
Collaborator Author

@stevensJourney this is ready for review

@DominicGBauer DominicGBauer force-pushed the feat/add-throttle-and-delay-to-connect branch from 12b6560 to 769b46f Compare January 27, 2025 12:37
connector: PowerSyncBackendConnector,
// This is used to pass in options on connection instead of only during database creation
options?: {
retryDelayMs: number;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could use AdditionalConnectionOptions

* Delay for retrying sync streaming operations
* from the PowerSync backend after an error occurs.
*/
retryDelay?: number;
Copy link
Collaborator

@stevensJourney stevensJourney Jan 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's very unfortunate, but I think renaming this to retryDelayMs is a breaking change. We might be able to work around it, but we should keep the old field for consistency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants