Skip to content

Fix synced database boostrapping#2073

Merged
penberg merged 2 commits intotursodatabase:mainfrom
avinassh:2064-bootstrap-exp
May 20, 2025
Merged

Fix synced database boostrapping#2073
penberg merged 2 commits intotursodatabase:mainfrom
avinassh:2064-bootstrap-exp

Conversation

@avinassh
Copy link
Copy Markdown
Member

fixes #2064

this patch fixes the regression introduced in #2055

bootstrap_db calls the export endpoint and bootstraps the db
quickly. If we call connect before calling bootstrap_db, it will
create a local .db file and sync falls back to incremental
bootstrap which is super slow

@avinassh avinassh requested review from levydsa and penberg May 20, 2025 06:33
@penberg penberg changed the title bugfix: call bootstrap_db before calling connect Fix synced database boostrapping May 20, 2025
@avinassh avinassh force-pushed the 2064-bootstrap-exp branch from 06f65ea to 818c58c Compare May 20, 2025 07:12
avinassh added 2 commits May 20, 2025 12:46
to spawn a bg thread for background sync, we need a connection.
however, we are creating a connection even if no `sync_interval`
was configured.
`bootstrap_db` calls the `export` endpoint and bootstraps the db
quickly. If we call `connect` before calling `bootstrap_db`, it will
create a local `.db` file and sync falls back to incremental
bootstrap which is super slow
@avinassh avinassh force-pushed the 2064-bootstrap-exp branch from 818c58c to 3fc95ba Compare May 20, 2025 07:16
@penberg penberg added this pull request to the merge queue May 20, 2025
Merged via the queue into tursodatabase:main with commit ee8f3b1 May 20, 2025
19 checks passed
@avinassh avinassh deleted the 2064-bootstrap-exp branch May 20, 2025 17:07
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.

Bootstrap not using export endpoint?

2 participants