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

Handle async index db initialization errors, fixes tutadb 1805 #7068

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bedhub
Copy link
Contributor

@bedhub bedhub commented Jun 4, 2024

Errors while initializing the DBFacade are now handled inside DBFacade and re thrown as DBError to prevent uncaught errors.

Errors from the event queue are also not reported as uncaught error by EntityClient anymore as they are thrown anyway.

@bedhub bedhub requested a review from charlag June 4, 2024 15:37
Errors while initializing the DBFacade are now handled inside DBFacade and re thrown as DBError to prevent uncaught errors.

Errors from the event queue are also not reported as uncaught error by EntityClient anymore as they are thrown anyway.
@bedhub bedhub force-pushed the 1805-tutadb-handle-db-initialization-errors branch from b4202bd to b39833d Compare June 5, 2024 08:04
@@ -86,11 +86,11 @@ export class DbFacade {
}
}

DBOpenRequest.onupgradeneeded = (event: IDBVersionChangeEvent) => {
DBOpenRequest.onupgradeneeded = async (event: IDBVersionChangeEvent) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

This callback is not async and I think we'll have problems if we try to assume it's async.

I wonder if we can block it here Atomics.wait() somehow, probably not without another worker?

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.

None yet

2 participants