Skip to content
This repository has been archived by the owner on Jul 23, 2022. It is now read-only.

Migrate from idb-keyval to native IndexedDB #81

Merged
merged 1 commit into from
May 21, 2021

Conversation

taymonbeal
Copy link
Member

Up until now, we basically had only one table and it had conceptually only one column, so we didn't have to worry about atomicity guarantees; everything was automatically atomic. As we prepare to store more kinds of data, we need transactional consistency, to avoid a situation where, e.g., one tab does a read-update-write and in doing so overwrites a write made concurrently from another tab with stale data. So idb-keyval is not for us anymore.

This change prepares for that migration.

Currently, there's no support for database versioning; if the code is deployed as-is and then later the version is upgraded, stuff will break. I'm hoping to fix this later; see #80.

@taymonbeal taymonbeal enabled auto-merge (squash) May 21, 2021 16:19
Up until now, we basically had only one table and it had conceptually only one column, so we didn't have to worry about atomicity guarantees; everything was automatically atomic. As we prepare to store more kinds of data, we need transactional consistency, to avoid a situation where, e.g., one tab does a read-update-write and in doing so overwrites a write made concurrently from another tab with stale data. So idb-keyval is not for us anymore.

This change prepares for that migration.

Currently, there's no support for database versioning; if the code is deployed as-is and then later the version is upgraded, stuff will break. I'm hoping to fix this later; see google#80.
@taymonbeal taymonbeal merged commit 2fca9a4 into google:main May 21, 2021
@taymonbeal taymonbeal deleted the indexeddb branch June 2, 2021 18:39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants