fix: processing events, stale sigits #227
Loading…
x
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.