[Loop] Sometimes, Rooms list appears empty on app. start

RESOLVED FIXED

Status

Firefox OS
Gaia::Loop
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: frsela, Assigned: frsela)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments, 1 obsolete attachment)

After some Loop runs, rooms list appears empty.

We think it's a race condition and this onsucces[1] is not fired.

[1] https://github.com/mozilla-b2g/firefoxos-loop-client/blob/master/app/js/helpers/rooms_db.js#L154
Assignee: nobody → frsela
Blocks: 1097722
Assignee: frsela → crdlc
Created attachment 8533663 [details]
Github pull request
Attachment #8533663 - Flags: review?(frsela)
Status: NEW → ASSIGNED
Assignee: crdlc → frsela
Attachment #8533663 - Flags: review?(frsela) → review-
Created attachment 8534289 [details] [review]
Proposed patch
Attachment #8534289 - Flags: feedback?(crdlc)
Comment on attachment 8534289 [details] [review]
Proposed patch

Don't forget to use this new cursor for all getAlls and for Events
Attachment #8534289 - Flags: feedback?(crdlc) → feedback+
Comment on attachment 8534289 [details] [review]
Proposed patch

Refactored
Attachment #8534289 - Flags: review?(crdlc)
Attachment #8533663 - Attachment is obsolete: true
Comment on attachment 8534289 [details] [review]
Proposed patch

LGTM, thanks a lot. Left two comments but minor
Attachment #8534289 - Flags: review?(crdlc) → review+
Landed: https://github.com/mozilla-b2g/firefoxos-loop-client/commit/dadae2f04366d4701632cccf5bef2ad5835cbb2d
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Created attachment 8534988 [details] [review]
Race condition fix
Attachment #8534988 - Flags: review?(crdlc)
Attachment #8534988 - Flags: review?(crdlc) → review?(borja.bugzilla)
Comment on attachment 8534988 [details] [review]
Race condition fix

r+, thanks
Attachment #8534988 - Flags: review?(borja.bugzilla) → review+
Landed race condition fix: https://github.com/mozilla-b2g/firefoxos-loop-client/commit/98f18c18393f6e220a33d5b1950b70a380bd20a8
Status: REOPENED → RESOLVED
Last Resolved: 3 years ago3 years ago
Resolution: --- → FIXED
Created attachment 8535028 [details] [review]
Github pull request
Attachment #8535028 - Flags: review?(frsela)
Comment on attachment 8535028 [details] [review]
Github pull request

LGTM
Attachment #8535028 - Flags: review?(frsela) → review+
in master:

https://github.com/mozilla-b2g/firefoxos-loop-client/commit/51a05c0cb29a268e48c55c65b2ab8b2c16a53643
You need to log in before you can comment on or make changes to this bug.