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

indexddb-local-backend - return the current sync to database promise … #3222

Merged
merged 1 commit into from
Apr 4, 2023

Conversation

texuf
Copy link
Contributor

@texuf texuf commented Mar 20, 2023

…if a sync is in flight

I’m trying to shutdown my matrix clients while using an indexdb, but awaiting the save() function has no effect because a previous sync was in flight. I ended up deleting the matrix client while the save was in flight and I saw a crash.

signed-off-by Austin Ellis austin@hntlabs.com

Type: defect


Here's what your changelog entry will look like:

🐛 Bug Fixes

  • indexddb-local-backend - return the current sync to database promise … (#3222). Contributed by @texuf.

Copy link
Contributor

@weeman1337 weeman1337 left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution @texuf . Looks good to me. There is one tiny code style issue. Can you fix it?

src/store/indexeddb-local-backend.ts Outdated Show resolved Hide resolved
…if a sync is in flight

I’m trying to shutdown my matrix clients while using an indexdb, but awaiting the save() function has no effect because a previous sync was in flight. I ended up deleting the matrix client while the save was in flight and I saw a crash.

signed-off-by Austin Ellis <austin@hntlabs.com>

fix linter
@texuf
Copy link
Contributor Author

texuf commented Apr 3, 2023

Thank you for your contribution @texuf . Looks good to me. There is one tiny code style issue. Can you fix it?

I updated the code last week, can you take another look?

@t3chguy t3chguy requested a review from weeman1337 April 4, 2023 07:44
@weeman1337
Copy link
Contributor

Thank you for your contribution @texuf . Looks good to me. There is one tiny code style issue. Can you fix it?

I updated the code last week, can you take another look?

Sorry this issue slipped through @texuf . For further PRs the trick is to re-request review after something has been done. Will review it now.

Copy link
Contributor

@weeman1337 weeman1337 left a comment

Choose a reason for hiding this comment

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

Did a quick test on the branch locally. Looks good. Thank you @texuf

@weeman1337 weeman1337 added this pull request to the merge queue Apr 4, 2023
Merged via the queue into matrix-org:develop with commit 65a3c67 Apr 4, 2023
@texuf texuf deleted the austin.ellis/sync-to-database branch April 17, 2023 19:31
su-ex added a commit to SchildiChat/matrix-js-sdk that referenced this pull request Apr 21, 2023
* Allow via_servers property in findPredecessor (update to MSC3946) ([\matrix-org#3240](matrix-org#3240)). Contributed by @andybalaam.
* Fire `closed` event when IndexedDB closes unexpectedly ([\matrix-org#3218](matrix-org#3218)).
* Implement MSC3952: intentional mentions ([\matrix-org#3092](matrix-org#3092)). Fixes element-hq/element-web#24376.
* Send one time key count and unused fallback keys for rust-crypto ([\matrix-org#3215](matrix-org#3215)). Fixes element-hq/element-web#24795. Contributed by @florianduros.
* Improve `processBeaconEvents` hotpath ([\matrix-org#3200](matrix-org#3200)).
* Implement MSC3966: a push rule condition to check if an array contains a value ([\matrix-org#3180](matrix-org#3180)).
* indexddb-local-backend - return the current sync to database promise … ([\matrix-org#3222](matrix-org#3222)). Contributed by @texuf.
* Revert "Add the call object to Call events" ([\matrix-org#3236](matrix-org#3236)).
* Handle group call redaction ([\matrix-org#3231](matrix-org#3231)). Fixes vector-im/voip-internal#128.
* Stop doing O(n^2) work to find event's home (`eventShouldLiveIn`) ([\matrix-org#3227](matrix-org#3227)). Contributed by @jryans.
* Fix bug where video would not unmute if it started muted ([\matrix-org#3213](matrix-org#3213)). Fixes element-hq/element-call#925.
* Fixes to event encryption in the Rust Crypto implementation ([\matrix-org#3202](matrix-org#3202)).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-Defect Z-Community-PR Issue is solved by a community member's PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants