Skip to content

[Alpha Fix] Disconnect and clear bug #66

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

Merged
merged 10 commits into from
Mar 5, 2024

Conversation

stevensJourney
Copy link
Contributor

@stevensJourney stevensJourney commented Mar 5, 2024

Description

This fixes multiple issues regarding disconnecting and clearing the database.

This also updates the alpha-release branch with changes from master

Native

For native platforms this fixes an issue where after calling disconnect the PowerSync client would fail to re-establish a valid streaming connection.

This is fixed by updating sqlite_async to 0.7.0-alpha.2

Web

For web this fixes an issue where if calling disconnect(or disconnectAndClear) multiple times, the abort controller was not cleared, which would attempt to abort twice - which throws an exception.

If disconnect was called first, say from an authentication provider listener such as in here then disconnectAndClear was called thereafter, the disconnectAndClear function would throw an exception before actually clearing the database.

This PR properly aborts the web streaming sync connection and awaits for the abort process to complete.

rkistner and others added 7 commits February 20, 2024 17:19
* feat(attachments): add error handlers

* fix: lint issue

* chore: version bump

* chore: pr reverts

* Update packages/powersync_attachments_helper/lib/src/attachments_queue_table.dart

Co-authored-by: stevensJourney <[email protected]>

* Update demos/supabase-todolist/lib/attachments/queue.dart

Co-authored-by: stevensJourney <[email protected]>

* chore: improve demo

* fix: image issue

---------

Co-authored-by: DominicGBauer <[email protected]>
Co-authored-by: stevensJourney <[email protected]>
@stevensJourney stevensJourney changed the base branch from master to alpha-release March 5, 2024 13:15
@stevensJourney stevensJourney marked this pull request as ready for review March 5, 2024 13:19
@stevensJourney stevensJourney requested a review from rkistner March 5, 2024 13:19
@stevensJourney stevensJourney requested a review from rkistner March 5, 2024 14:09
@stevensJourney stevensJourney force-pushed the alpha-fix-disconnect-and-clear branch from 1580f71 to c7e646b Compare March 5, 2024 14:43
@stevensJourney stevensJourney mentioned this pull request Mar 5, 2024
@stevensJourney stevensJourney merged commit c894b34 into alpha-release Mar 5, 2024
@stevensJourney stevensJourney deleted the alpha-fix-disconnect-and-clear branch March 5, 2024 14:59
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.

3 participants