fix: processing events, stale sigits #227
Labels
No Label
Kind/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: sigit/sigit.io#227
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "hotfix-processing-events-10-12"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Issue made it look like notification broadcast failed. During testing I did notice a slower speed generally when resolving notification uploads and publishing but nothing that would indicate a complete failure to update the sigit states for the user.
Further debugging led me to the changes made in
23a04faad8
that consolidated multipleuseEffect
and changes inf09d9b2378
inprocessReceivedEvent
function.These small change resulted in
userAppData
being updated after we already processed some events and combined fromprocessReceivedEvent
function resulted in inconsistent app state (mostly due to having no control over execution order and updates).We will need additional care when making updates for #194 to make sure the async system is robust to handle these edge cases, to make sure we start subscription only after we get the initial user state returned or process events only after the initial state is set.
One more issue that made debugging harder (multiple accounts switching) was the problem with
hasSubscribed
flag which on the logout wasn't being cleared correctly and it resulted with stale app date unless we manually refreshed the page.