Multiple IndexedDB connections (via tabs) can result in data inconsistency
Bug #1775719 reported by
Bill Erickson
This bug affects 14 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Evergreen |
Fix Released
|
High
|
Unassigned | ||
3.0 |
Fix Released
|
High
|
Unassigned |
Bug Description
Spinning this off from bug #1768947
Recap:
https:/
Multiple connections across tabs can lead to data inconsistency.
Consider moving lovefield actions into a shared webworker / serviceworker.
---
While we may want to apply other stop-gap measures, moving the DB connection handling into a shared worker is ultimately the safest data integrity solution because it ensures there can only be one connection. I have a fairly extensive proof of concept of moving the lovefield code into a shared worker to resolve this issue. Will post a branch when I have something that plays nicely with the browser client.
Changed in evergreen: | |
milestone: | 3.1.3 → 3.1.4 |
Changed in evergreen: | |
status: | New → Confirmed |
Changed in evergreen: | |
milestone: | 3.1.4 → 3.1.5 |
Changed in evergreen: | |
importance: | Undecided → High |
assignee: | nobody → Kathy Lussier (klussier) |
Changed in evergreen: | |
assignee: | Kathy Lussier (klussier) → nobody |
Changed in evergreen: | |
assignee: | nobody → Kathy Lussier (klussier) |
Changed in evergreen: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Code push'd:
http:// git.evergreen- ils.org/ ?p=working/ Evergreen. git;a=shortlog; h=refs/ heads/user/ berick/ lp1768947- offline- db-webworkers
This moves the DB access logic into a shared worker. The egLovfield API is unchanged, but all DB reads/writes are now shuttled off to the shared worker.
I also moved the full download block list logic into the web worker since it's so heavy. That way it does not lock the browser up when it's building. Consistent with bug #1727557, I am also displaying an (indeterminate) progress dialog as the block list builds.
As a reminder, shared workers run in their own process, so debugging them means finding the right console logs.
In Chrome, navigate to chrome: //inspect/ #workers -- Look for the offline- db-worker. js entry and click "Inspect".
In FF, they're under about:debugging #workers
Eyes and testing appreciated. I think I got all the bugs -- the behavior I know to test is working -- but it's big enough others could be lurking.